Bug 20147: Allow translating prompt in label edit batch
authorPasi Kallinen <pasi.kallinen@joensuu.fi>
Tue, 6 Feb 2018 12:17:45 +0000 (14:17 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 27 Feb 2018 14:37:35 +0000 (11:37 -0300)
Fix one untranslatable prompt in the label batch edit.

Test plan:

1) Go to Home -> Tools -> Label creator
2) Click on New -> Label batch
3) Add items to the batch
4) Select any of the items
5) Click on "Remove selected items"
6) Note the popup text
7) Apply patch, update a language, translate the msgid
   "Are you sure you want to remove label number(s): %s from this batch?"
8) Repeat 1-6. The popup text should now be translated.

Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt

index 62e8d4f..417024a 100644 (file)
@@ -41,7 +41,7 @@
                     }
                     getstr = items.join("&");
                     item_msg = item_num.join(", ");
-                    var msg = "Are you sure you want to remove label number(s): " + item_msg + " from this batch?"
+                    var msg = _("Are you sure you want to remove label number(s): %s from this batch?").format(item_msg);
                 } else if (document.items.action.checked) {
                    alert(_("Deletion of label from a batch with only one label will delete the batch.") + "\n\n" + _("If this is what you want, select the 'Delete batch' option from the toolbar"));
                     return; // no deletion for single item batch