From 1da66ccc1429d815c341faa7e789e9e7649fd24a Mon Sep 17 00:00:00 2001 From: Caroline Cyr La Rose Date: Wed, 5 Oct 2022 15:48:46 -0400 Subject: [PATCH] Bug 31694: MARC overlay rules presets don't change anything if presets are translated This patch corrects option value names in MARC overlay rules to prevent them from being translated. To test: 1. Install a new language 1.1. In a terminal, run the following commands gulp po:update cd misc/translator ./translate install xx-XX 1.2. Go to Administration > Global system preferences 1.3. Search for language 1.4. In the language syspref check the box for the language you just installed 1.5. Save 2. In the staff interface in English, go to Administration > Record overlay rules 3. In the column 'Preset' try the various options, note that the 'Added', 'Appended', 'Removed', and 'Deleted' settings change depending on the chosen preset 4. Change the interface language 5. Redo step 3, notice that if the preset name is translated, the other settings don't change 6. Apply patch 7. Redo step 3, the presets should now change the settings Signed-off-by: David Nind Signed-off-by: Jan Kissig Signed-off-by: Julian Maurice Signed-off-by: Katrin Fischer (cherry picked from commit c5a98fe574d3b50382d5e0abaf1313b9317ad88f) Signed-off-by: Fridolin Somers --- .../en/modules/admin/marc-overlay-rules.tt | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc-overlay-rules.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc-overlay-rules.tt index a772fb08b2..64ec9b5943 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc-overlay-rules.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc-overlay-rules.tt @@ -108,11 +108,11 @@ @@ -173,11 +173,11 @@ @@ -371,31 +371,31 @@ })); var overlay_rules_presets = {}; - overlay_rules_presets[_("Protect")] = { + overlay_rules_presets[_("protect")] = { 'add': 0, 'append': 0, 'remove': 0, 'delete': 0 }; - overlay_rules_presets[_("Overwrite")] = { + overlay_rules_presets[_("overwrite")] = { 'add': 1, 'append': 1, 'remove': 1, 'delete': 1 }; - overlay_rules_presets[_("Add new")] = { + overlay_rules_presets[_("add")] = { 'add': 1, 'append': 0, 'remove': 0, 'delete': 0 }; - overlay_rules_presets[_("Add and append")] = { + overlay_rules_presets[_("addappend")] = { 'add': 1, 'append': 1, 'remove': 0, 'delete': 0 }; - overlay_rules_presets[_("Protect from deletion")] = { + overlay_rules_presets[_("protectfromdeletion")] = { 'add': 1, 'append': 1, 'remove': 1, -- 2.39.5