From aa82a487a18216493bba7334100b29ed472c2f38 Mon Sep 17 00:00:00 2001 From: Caroline Cyr La Rose Date: Mon, 10 Jul 2023 16:52:40 -0400 Subject: [PATCH] Bug 31736: Context for translation: 'All' (All libraries) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch adds context for translators for the term 'All' when it refers to 'All libraries'. 1. Apply patch 2. View the following pages --> The pages work (no errors) --> No spelling errors in 'All' libraries - Acquisitions > Invoices (Library filter on the left) - Circulation > Holds queue (Library filter) - Reports > Cash register (Transaction library filter) - Reports > Items lost (Library filter) - Serials > Check expiration (Library filter) - Serials > Search settings icon in the search bar > Advanced search (Library filter) - Acquisitions > Add to basket > From a subscription (Library filter on the left) - Installer > Onboarding > New circulation rule (Library) 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 'All' with a line msgctxt that gives the 'All libraries/branches' context 5. Update the file with a random word or phrase for the 'All' translation For example, I translated 'All' by 'Toutes les bibliothèques' \#: koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt:383 \#: koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt:254 \#: koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep5.tt:64 \#: koha-tmpl/intranet-tmpl/prog/en/modules/reports/cash_register_stats.tt:115 \#: koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemslost.tt:146 \#: koha-tmpl/intranet-tmpl/prog/en/modules/serials/checkexpiration.tt:48 \#: koha-tmpl/intranet-tmpl/prog/en/includes/serials-advsearch.inc:41 \#: koha-tmpl/intranet-tmpl/prog/en/includes/subscriptions-search.inc:34 msgctxt "All libraries/branches" msgid "All" msgstr "Toutes les bibliothèques" 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) ./misc/translator/translate install xx-XX 6.2. In the Koha staff interface, go to Administration > System preferences 6.3. Search for language 6.4. Check the box next to the new language 6.5. Save 7. Switch the language of the interface 8. Redo step 2 --> The pages still work (no errors) --> The 'All' libraries string should be replaced by whatever you put in step 5 --- koha-tmpl/intranet-tmpl/prog/en/includes/serials-advsearch.inc | 3 ++- .../intranet-tmpl/prog/en/includes/subscriptions-search.inc | 3 ++- koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt | 3 ++- .../intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt | 3 ++- .../prog/en/modules/onboarding/onboardingstep5.tt | 3 ++- .../prog/en/modules/reports/cash_register_stats.tt | 3 ++- koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemslost.tt | 3 ++- .../intranet-tmpl/prog/en/modules/serials/checkexpiration.tt | 3 ++- 8 files changed, 16 insertions(+), 8 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/serials-advsearch.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/serials-advsearch.inc index ec34b6f073..757ee265fa 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/serials-advsearch.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/serials-advsearch.inc @@ -1,3 +1,4 @@ +[% PROCESS 'i18n.inc' %] [% PROCESS 'html_helpers.inc' %]
@@ -37,7 +38,7 @@
  • diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/subscriptions-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/subscriptions-search.inc index 5e1275d249..ff8707323f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/subscriptions-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/subscriptions-search.inc @@ -1,3 +1,4 @@ +[% PROCESS 'i18n.inc' %] [% PROCESS 'html_helpers.inc' %]
    @@ -30,7 +31,7 @@
  • diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt index 91cc429b7e..21f8651d01 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt @@ -3,6 +3,7 @@ [% USE AuthorisedValues %] [% USE KohaDates %] [% USE Branches %] +[% PROCESS 'i18n.inc' %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Invoices › Acquisitions › Koha @@ -379,7 +380,7 @@
  • diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt index fb87fa514b..66f2c93399 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt @@ -8,6 +8,7 @@ [% USE TablesSettings %] [% USE Koha %] [% SET footerjs = 1 %] +[% PROCESS 'i18n.inc' %] [% INCLUDE 'doc-head-open.inc' %] Holds queue › Circulation › Koha [% INCLUDE 'doc-head-close.inc' %] @@ -250,7 +251,7 @@ diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep5.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep5.tt index 9daf2d73c9..dc40fd09a3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep5.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep5.tt @@ -1,3 +1,4 @@ +[% PROCESS 'i18n.inc' %] [% INCLUDE 'doc-head-open.inc' %] [% IF all_done %] @@ -60,7 +61,7 @@ <label for="branchname" class="required"> Library branch</label> <select name="branch" id="branchname" required="required"> <option value=""> Choose</option> - <option value="*" selected="selected">All</option> + <option value="*" selected="selected">[% tp('All libraries/branches', 'All') | html %]</option> [% FOREACH library IN libraries %] <option value="[% library.branchcode | html %]"> [% library.branchname | html %]</option> [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/cash_register_stats.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/cash_register_stats.tt index b785a1ab82..4f8d369679 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/cash_register_stats.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/cash_register_stats.tt @@ -8,6 +8,7 @@ [% USE Registers %] [% SET footerjs = 1 %] [% PROCESS 'accounts.inc' %] +[% PROCESS 'i18n.inc' %] [% INCLUDE 'doc-head-open.inc' %] <title>[% IF ( do_it ) %]Cash register statistics › Results[% ELSE %]Cash register statistics[% END %] › Reports › Koha [% INCLUDE 'doc-head-close.inc' %] @@ -111,7 +112,7 @@
  • - + [% PROCESS options_for_libraries libraries => Branches.all( selected => branch ) %]
  • -- 2.34.1