Lines 39-47
KOHA.Tags = {
Link Here
|
39 |
}, |
39 |
}, |
40 |
common_status : function(addcount, delcount, errcount) { |
40 |
common_status : function(addcount, delcount, errcount) { |
41 |
var cstat = ""; |
41 |
var cstat = ""; |
42 |
if (addcount && addcount > 0) {cstat += MSG_TAGS_ADDED + addcount + ". " ;} |
42 |
if (addcount && addcount > 0) {cstat += __("Tags added: ") + addcount + ". " ;} |
43 |
if (delcount && delcount > 0) {cstat += MSG_TAGS_DELETED + delcount + ". " ;} |
43 |
if (delcount && delcount > 0) {cstat += __("Tags deleted: ") + delcount + ". " ;} |
44 |
if (errcount && errcount > 0) {cstat += MSG_TAGS_ERRORS + errcount + ". " ;} |
44 |
if (errcount && errcount > 0) {cstat += __("Errors: ") + errcount + ". " ;} |
45 |
return cstat; |
45 |
return cstat; |
46 |
}, |
46 |
}, |
47 |
set_tag_status : function(tagid, newstatus) { |
47 |
set_tag_status : function(tagid, newstatus) { |
Lines 57-69
KOHA.Tags = {
Link Here
|
57 |
}, |
57 |
}, |
58 |
|
58 |
|
59 |
tag_message: { |
59 |
tag_message: { |
60 |
tagsdisabled : function(arg) {return (MSG_TAGS_DISABLED);}, |
60 |
tagsdisabled : function(arg) {return ( __("Sorry, tags are not enabled on this system.") );}, |
61 |
scrubbed_all_bad : function(arg) {return (MSG_TAG_ALL_BAD);}, |
61 |
scrubbed_all_bad : function(arg) {return ( __("Error! Your tag was entirely markup code. It was NOT added. Please try again with plain text.") );}, |
62 |
badparam : function(arg) {return (MSG_ILLEGAL_PARAMETER+" "+arg);}, |
62 |
badparam : function(arg) {return ( __("Error! Illegal parameter") +" "+arg);}, |
63 |
scrubbed : function(arg) {return (MSG_TAG_SCRUBBED+" "+arg);}, |
63 |
scrubbed : function(arg) {return ( __("Note: your tag contained markup code that was removed. The tag was added as ") +" "+arg);}, |
64 |
failed_add_tag : function(arg) {return (MSG_ADD_TAG_FAILED+ " '"+arg+"'. \n"+MSG_ADD_TAG_FAILED_NOTE);}, |
64 |
failed_add_tag : function(arg) {return ( __("Error! Adding tags failed at") + " '"+arg+"'. \n"+ __("Note: you can only tag an item with a given term once. Check 'Tags' to see your current tags.") );}, |
65 |
failed_delete : function(arg) {return (MSG_DELETE_TAG_FAILED+ " '"+arg+"'. \n"+MSG_DELETE_TAG_FAILED_NOTE);}, |
65 |
failed_delete : function(arg) {return ( __("Error! You cannot delete the tag") + " '"+arg+"'. \n"+ __("Note: you can only delete your own tags.") );}, |
66 |
login : function(arg) {return (MSG_LOGIN_REQUIRED);} |
66 |
login : function(arg) {return ( __("You must be logged in to add tags.") );} |
67 |
}, |
67 |
}, |
68 |
|
68 |
|
69 |
// Used to tag multiple items at once. The main difference |
69 |
// Used to tag multiple items at once. The main difference |
Lines 93-99
KOHA.Tags = {
Link Here
|
93 |
if (response[bib]) { |
93 |
if (response[bib]) { |
94 |
var added = response[bib]["added"]; |
94 |
var added = response[bib]["added"]; |
95 |
if (added > 0) { |
95 |
if (added > 0) { |
96 |
status = MSG_TAGS_ADDED + added + ". "; |
96 |
status = __("Tags added: ") + added + ". "; |
97 |
KOHA.Tags.set_tag_status(mytagid + "_status", status); |
97 |
KOHA.Tags.set_tag_status(mytagid + "_status", status); |
98 |
} |
98 |
} |
99 |
|
99 |
|
Lines 103-109
KOHA.Tags = {
Link Here
|
103 |
bibErrors = true; |
103 |
bibErrors = true; |
104 |
var errid = "tagerr_" + bib; |
104 |
var errid = "tagerr_" + bib; |
105 |
var errstat = "<a id=\"" + errid + "\" class=\"tagerror\" href=\"#\">"; |
105 |
var errstat = "<a id=\"" + errid + "\" class=\"tagerror\" href=\"#\">"; |
106 |
errstat += MSG_TAGS_ERRORS + errors.length + ". "; |
106 |
errstat += __("Errors: ") + errors.length + ". "; |
107 |
errstat += "</a>"; |
107 |
errstat += "</a>"; |
108 |
KOHA.Tags.append_tag_status(mytagid + "_status", errstat); |
108 |
KOHA.Tags.append_tag_status(mytagid + "_status", errstat); |
109 |
var errmsg = ""; |
109 |
var errmsg = ""; |
Lines 123-129
KOHA.Tags = {
Link Here
|
123 |
if (bibErrors || response["global_errors"]) { |
123 |
if (bibErrors || response["global_errors"]) { |
124 |
var msg = ""; |
124 |
var msg = ""; |
125 |
if (bibErrors) { |
125 |
if (bibErrors) { |
126 |
msg = MSG_MULTI_ADD_TAG_FAILED; |
126 |
msg = __("Unable to add one or more tags."); |
127 |
} |
127 |
} |
128 |
|
128 |
|
129 |
// Show global errors in a dialog. |
129 |
// Show global errors in a dialog. |
130 |
- |
|
|