@@ -, +, @@ into serials-toolbar.js - Apply the patch and go to Serials and search for a subscription. - Open the detail page for an open subscription. - Click the "Close" button. You should get a confirmation, "Are you sure you want to close this subscription?" - Confirm that you want to close it. - When the page reloads, click the "Reopen" button. You should get a confirmation, "Are you sure you want to reopen this subscription?" - Cancel. - Choose Edit -> Delete subscription. You should get a confirmation, "Are you sure you want to delete this subscription?" - Perform the same tests from the "Serial collection" page. - 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/serials-toolbar.js for translation, e.g.: msgid "Are you sure you want to delete this subscription?" 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. --- .../prog/en/modules/serials/serials-collection.tt | 3 --- .../intranet-tmpl/prog/en/modules/serials/serials-home.tt | 5 +---- .../prog/en/modules/serials/serials-search.tt | 3 --- .../prog/en/modules/serials/subscription-detail.tt | 3 --- koha-tmpl/intranet-tmpl/prog/js/serials-toolbar.js | 8 ++++---- 5 files changed, 5 insertions(+), 17 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt @@ -305,9 +305,6 @@ [% INCLUDE 'datatables.inc' %] [% Asset.js("js/serials-toolbar.js") | $raw %] [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-home.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-home.tt @@ -33,11 +33,8 @@ [% MACRO jsinclude BLOCK %] [% Asset.js("js/serials-toolbar.js") | $raw %] - [% END %] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt @@ -410,9 +410,6 @@ [% INCLUDE 'datatables.inc' %] [% Asset.js("js/serials-toolbar.js") | $raw %] [% Asset.js("js/serials-toolbar.js") | $raw %] [% Asset.js("js/mana.js") | $raw %] --- a/koha-tmpl/intranet-tmpl/prog/js/serials-toolbar.js +++ a/koha-tmpl/intranet-tmpl/prog/js/serials-toolbar.js @@ -1,20 +1,20 @@ -/* global MSG_CLOSE_SUBSCRIPTION MSG_REOPEN_SUBSCRIPTION CONFIRM_DELETE_SUBSCRIPTION subscriptionid */ +/* global subscriptionid */ function confirm_close() { - var is_confirmed = confirm( MSG_CLOSE_SUBSCRIPTION ); + var is_confirmed = confirm( __("Are you sure you want to close this subscription?") ); if (is_confirmed) { window.location="subscription-detail.pl?subscriptionid=" + subscriptionid + "&op=close"; } } function confirm_reopen() { - var is_confirmed = confirm( MSG_REOPEN_SUBSCRIPTION ); + var is_confirmed = confirm( __("Are you sure you want to reopen this subscription?") ); if (is_confirmed) { window.location="subscription-detail.pl?subscriptionid=" + subscriptionid + "&op=reopen"; } } function confirm_deletion() { - var is_confirmed = confirm( CONFIRM_DELETE_SUBSCRIPTION ); + var is_confirmed = confirm( __("Are you sure you want to delete this subscription?") ); if (is_confirmed) { window.location="subscription-detail.pl?subscriptionid=" + subscriptionid + "&op=del"; } --