@@ -, +, @@ and into tags-review.js - Go to Tools -> Tags and perform some actions which will trigger the use of translated strings in the interface. For instance: - Approving and rejecting tags - Testing tags which are approved, rejected, or unclassified. - Status messages for these operations should work correctly. - Update a translation, e.g. fr-FR: +cd misc/translator +perl translate update fr-FR - Open the corresponding .po file for JavaScript strings, e.g. misc/translator/po/fr-FR-messages-js.po - Locate strings pulled from koha-tmpl/intranet-tmpl/prog/js/pages/tags-review.js for translation, e.g.: msgid "Both subfield values should be filled or empty." msgstr "" - Edit the "msgstr" string however you want (it's just for testing). - Install the updated translation: +perl translate install fr-FR - Switch to your newly translated language in the staff client and repeat the test plan above. The translated strings should appear. --- .../intranet-tmpl/prog/en/modules/tags/review.tt | 16 ------------- .../intranet-tmpl/prog/js/pages/tags-review.js | 28 +++++++++++----------- 2 files changed, 14 insertions(+), 30 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt @@ -230,22 +230,6 @@ tr > td input,td input[type="submit"] { font-size: 85%; padding: 1px; } [% INCLUDE 'calendar.inc' %] [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %] [% Asset.js("js/pages/tags-review.js") | $raw %] - [% END %] [% INCLUDE 'intranet-bottom.inc' %] --- a/koha-tmpl/intranet-tmpl/prog/js/pages/tags-review.js +++ a/koha-tmpl/intranet-tmpl/prog/js/pages/tags-review.js @@ -35,22 +35,22 @@ var success_approve = function(tag){ // window.alert(_("AJAX approved tag: ") + tag); }; var failure_approve = function(tag){ - window.alert(MSG_AJAX_APPROVE_FAILED.format(decodeURIComponent( tag ))); + window.alert( __("AJAX failed to approve tag: %s").format(decodeURIComponent(tag)) ); }; var success_reject = function(tag){ // window.alert(_("AJAX rejected tag: ") + tag); }; var failure_reject = function(tag){ - window.alert(MSG_AJAX_REJECTION_FAILED.format(decodeURIComponent( tag ))); + window.alert( __("AJAX failed to reject tag: %s").format(decodeURIComponent(tag)) ); }; var success_test = function(tag){ - $('#verdict').html(MSG_AJAX_TAG_PERMITTED.format( decodeURIComponent( tag ) )); + $('#verdict').html( __("%s is permitted!").format(decodeURIComponent(tag)) ); }; var failure_test = function(tag){ - $('#verdict').html(MSG_AJAX_TAG_PROHIBITED.format( decodeURIComponent( tag ) )); + $('#verdict').html( __("%s is prohibited!").format(decodeURIComponent(tag)) ); }; var indeterminate_test = function(tag){ - $('#verdict').html(MSG_AJAX_TAG_UNCLASSIFIED.format( decodeURIComponent( tag ) )); + $('#verdict').html( __("%s is neither permitted nor prohibited!").format(decodeURIComponent(tag)) ); }; var success_test_call = function() { @@ -69,7 +69,7 @@ $(document).ready(function() { "sPaginationType": "full" })); $('.ajax_buttons' ).css({visibility:"visible"}); - $("p.check").html("