From 425f26f2aff568e29ca3e6a29941daf9d2ea06ee Mon Sep 17 00:00:00 2001 From: Caroline Cyr La Rose Date: Fri, 14 Oct 2022 16:34:33 -0400 Subject: [PATCH] Bug 31807: Context for translation: Filter (verb) vs. Filter (noun) This patch add the context 'noun' to the 'Filter' string in marc-overlay-rules.tt. This will separate that instance of 'Filter' from the other ones, where it is meant as a verb. To test: 1. Apply patch 2. Visit Administration > MARC overlay rules, make sure the page works (no errors) and that there is a column called 'Filter' 3. Update the po files gulp po:update --lang xx-XX for example, gulp po:update --lang fr-CA 4. Check the xx-XX-messages.po file (e.g. misc/translator/po/fr-CA-messages.po), there should be an entry for 'Filter', with a line msgctxt that gives the 'noun' context 5. Update the file with a random word for the 'Filter' translation for example, I translated 'Filter' by 'Filter as a noun', just to see the difference \#: koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc-overlay-rules.tt:83 msgctxt "noun" msgid "Filter" msgstr "Filter as a noun" 6. Install a new language 6.1. Run the following commands in the terminal, replacing xx-XX with the language code (e.g. fr-CA) cd misc/translator ./translate install xx-XX 6.2. In the Koha staff interface, go to Administration > Global system preferences 6.3. Search for language 6.4. Check the box next to the new language 6.5. Save 7. View the MARC overlay rules page in the new language, the 'Filter' column heading should be whatever you put in step 5 Optional test 8. In the staff interface in English, view one or more of these pages, the 'Filter' should be unchanged - Acquisitions > Late orders (Filter button) - Aquisitions > Search for vendor > Receive shipments (Filter heading on the left and Filter button) - Acquisitions > Search for vendor > Click vendor's name > Uncertain prices (Filter button) - Administration > Budgets > Click budget's name > Planning > Plan by ... (any option) (Filter heading on the left) - Reports > Use saved (Filter heading on the left) - Reports > Acquisitions statistics wizard (Filter column heading) - Reports > Patrons statistics wizard (Filter column heading) - Reports > Catalog statistics wizard (Filter column heading) - Reports > Circulation statistics wizard (Filter column heading) - Reports > Holds statistics wizard (Filter column heading) - Reports > Average loan time (Filter column heading) - Tools > News (Filter heading on the left) 9. View these same pages in the other language, the Filter should NOT be changed to whatever you put in step 5 Signed-off-by: David Nind --- .../intranet-tmpl/prog/en/modules/admin/marc-overlay-rules.tt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 25b329111f..49e9441c88 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 @@ -3,6 +3,7 @@ [% SET footerjs = 1 %] [% USE Koha %] [% USE KohaSpan %] +[% PROCESS 'i18n.inc' %] [% INCLUDE 'doc-head-open.inc' %] MARC overlay rules › Koha › Administration [% INCLUDE 'doc-head-close.inc' %] @@ -79,7 +80,7 @@ Rule Module - Filter + [% tp('noun', 'Filter') | html %] Tag Preset Added -- 2.30.2