From 08a54db8163715a0e37b0cf9704f1bcd6cd9b125 Mon Sep 17 00:00:00 2001 From: Caroline Cyr La Rose Date: Thu, 29 Aug 2024 16:36:15 -0400 Subject: [PATCH] Bug 37781: Add translation context for "On" (when used alone) This patch adds context to the string "On" used alone in the item search page, to mean "On a specific date". To test: 1. Update translation files gulp po:update --lang fr-CA 2. Check the staff-prog.po file and search for "On". vi misc/translator/po/fr-CA-staff-prog.po /"On" --> It should be in three places, two in itemsearch.tt and one in smtp_servers.tt 38415 #. For the first occurrence, 38416 #. SCRIPT 38417 #: koha-tmpl/intranet-tmpl/prog/en/modules/admin/smtp_servers.tt:327 38418 #: koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt:322 38419 #: koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt:324 38420 #, c-format 38421 msgid "On" 38422 msgstr "Sur " 3. Apply patch 4. Reupdate po files gulp po:update --lang fr-CA 5. Check the messages.po file and search for "On" --> There should be a msgctxt line that adds context to the "On" (please ignore the translated msgstr, I have no idea how it decides what to put in there!) 6266 #: koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt:322 6267 #: koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt:324 6268 #, fuzzy 6269 msgctxt "On specific date" 6270 msgid "On" 6271 msgstr "Oman" 6. Also check the item search page --> It should still work and the "On" in the last borrowed date drop-down should still say "On" 7. Optionally, translate the string and remove the "#fuzzy", install the translation and check the item search page --> It should use the string you put in --- .../intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt index 3e8215a0af..7153dbf3c9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt @@ -319,9 +319,9 @@ [% END %] [% IF query.param('datelastborrowed_op') == '=' %] - + [% ELSE %] - + [% END %] -- 2.34.1