From a9f794a9c89465bdbf1b54ecd1c683c7825c8ae3 Mon Sep 17 00:00:00 2001 From: Bernardo Gonzalez Kriegel Date: Sat, 22 Mar 2014 14:50:03 -0300 Subject: [PATCH] Bug 11646: fix untranslatable confirm popup in field 006 and 008 builders This patch MARC21 modifies value builders 006 and 008 to make confirm popup translatable To test: 1) Update po files for your preferred language, xx-YY cd misc/translator; perl translate update xx-YY 2) Check that confirm string is NOT present egrep -B3 "Show values for|material type\?" po/xx-YY*po 3) Apply the patch 4) Repeat 1) 5) Repeat 2), now the strings are present Also check that english or translated popup is right Signed-off-by: Owen Leonard Signed-off-by: Katrin Fischer Works as described. Signed-off-by: Galen Charlton --- .../en/modules/cataloguing/value_builder/marc21_field_006.tt | 2 +- .../en/modules/cataloguing/value_builder/marc21_field_008.tt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_006.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_006.tt index 4a2263aedb..37524ff238 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_006.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_006.tt @@ -24,7 +24,7 @@ function changeTypeofMaterial(form) { - if (form.material_type.options[form.material_type.selectedIndex].value != "" && confirm('Show values for \'' + form.material_type.options[form.material_type.selectedIndex].text + '\' material type?')) { + if (form.material_type.options[form.material_type.selectedIndex].value != "" && confirm(_("Show values for") +' \'' + form.material_type.options[form.material_type.selectedIndex].text + '\' ' +_("material type?"))) { objXmlControlField.setIdMaterial(form.material_type.options[form.material_type.selectedIndex].value); objXmlControlField.renderTemplate(); renderResult(tr_result, form.result.value, true); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_008.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_008.tt index 6e5acb9a72..4a5b8f8072 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_008.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_008.tt @@ -24,7 +24,7 @@ function changeTypeofMaterial(form) { - if (form.material_type.options[form.material_type.selectedIndex].value != "" && confirm('Show values for \'' + form.material_type.options[form.material_type.selectedIndex].text + '\' material type?')) { + if (form.material_type.options[form.material_type.selectedIndex].value != "" && confirm(_("Show values for") + ' \'' + form.material_type.options[form.material_type.selectedIndex].text + '\' ' + _("material type?"))) { objXmlControlField.setIdMaterial(form.material_type.options[form.material_type.selectedIndex].value); objXmlControlField.renderTemplate(); renderResult(tr_result, form.result.value, true); -- 2.39.5