From 14b799655cfcb28ad4a76d565dc0cd96aff0f902 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 7 Mar 2023 11:15:07 +0000 Subject: [PATCH] Bug 33154: Tab WRAPPER follow-up: label text must be translatable This patch updates templates which have already been updated to use the new tab WRAPPER system for generating tab markup. Templates are changed so that tab label strings are wrapped in to make them translatable. The html_helpers include file is also updated so that the example code in comments shows the right pattern (the breadcrumb example is similarly corrected). To test apply the patch and run the translation script to update the .po files, e.g. perl misc/translator/translate update fr-FR Check the updated .po files for some of the lines modified in the patch: - koha-tmpl/intranet-tmpl/prog/en/modules/about.tt:31 - koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt:69 - koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt:330 - koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt:141 - koha-tmpl/intranet-tmpl/prog/en/modules/admin/item_circulation_alerts.tt:118 - koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt:259 - koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt:455 - koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt:98 Signed-off-by: Caroline Cyr La Rose Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi (cherry picked from commit ca80bf67cea41613248d8e932e4dbdb5b232b5ca) Signed-off-by: Matt Blenkinsop --- .../prog/en/includes/html_helpers.inc | 32 +++++++++---------- .../intranet-tmpl/prog/en/modules/about.tt | 16 +++++----- .../prog/en/modules/acqui/addorderiso2709.tt | 6 ++-- .../prog/en/modules/acqui/basketgroup.tt | 4 +-- .../prog/en/modules/acqui/invoices.tt | 8 +++-- .../modules/admin/item_circulation_alerts.tt | 4 +-- .../prog/en/modules/serials/serials-search.tt | 6 ++-- .../en/modules/serials/subscription-detail.tt | 10 +++--- .../prog/en/modules/tools/letter.tt | 12 +++++-- 9 files changed, 54 insertions(+), 44 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc index ae95ded846..9e2bb66190 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc @@ -351,19 +351,19 @@ [% END %] -[% # BOOTSTRAP TAB WRAPPER USAGE %] -[% # [ WRAPPER tabs id= "tabs_container_id" ] %] -[% # [ WRAPPER tabs_nav ] %] -[% # [ WRAPPER tab_item tabname= "tab_name_1" bt_active= 1 ] Tab text 1 [ END ] %] -[% # [ WRAPPER tab_item tabname= "tab_name_2" ] Tab text 2 [ END ] %] -[% # ... %] -[% # [ END ] %] -[% # [ WRAPPER tab_panels ] %] -[% # [ WRAPPER tab_panel tabname="tab_name_1" bt_active= 1 ] Panel contents 1 [ END ] %] -[% # [ WRAPPER tab_panel tabname="tab_name_2" ] Panel contents 2 [ END ] %] -[% # ... %] -[% # [ END ] %] -[% # [ END ] %] +[% # BOOTSTRAP TAB WRAPPER USAGE %] +[% # [ WRAPPER tabs id= "tabs_container_id" ] %] +[% # [ WRAPPER tabs_nav ] %] +[% # [ WRAPPER tab_item tabname= "tab_name_1" bt_active= 1 ] Tab text 1 [ END ] %] +[% # [ WRAPPER tab_item tabname= "tab_name_2" ] Tab text 2 [ END ] %] +[% # ... %] +[% # [ END ] %] +[% # [ WRAPPER tab_panels ] %] +[% # [ WRAPPER tab_panel tabname="tab_name_1" bt_active= 1 ] Panel contents 1 [ END ] %] +[% # [ WRAPPER tab_panel tabname="tab_name_2" ] Panel contents 2 [ END ] %] +[% # ... %] +[% # [ END ] %] +[% # [ END ] %] [% BLOCK tabs %] [% IF ( id ) %] @@ -421,7 +421,7 @@ [% # Module page %] [% # [ END ] %] [% # [ WRAPPER breadcrumb_item bc_active = 1 ] %] -[% # Add form %] +[% # Add form %] [% # [ END ] %] [% # [ ELSIF op == 'delete_confirm' ] %] @@ -429,12 +429,12 @@ [% # Module page %] [% # [ END ] %] [% # [ WRAPPER breadcrumb_item bc_active = 1 ] %] -[% # Confirm deletion %] +[% # Confirm deletion %] [% # [ END ] %] [% # [ ELSE ] %] [% # [ WRAPPER breadcrumb_item bc_active = 1 ] %] -[% # Module page %] +[% # Module page %] [% # [ END ] %] [% # [ END #/IF op = add_form ] %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt index f78486da9e..2422fc9cc7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt @@ -28,14 +28,14 @@ [% WRAPPER tabs id= "abouttabs" %] [% WRAPPER tabs_nav %] - [% WRAPPER tab_item tabname= "about" bt_active= 1 %] Server information [% END %] - [% WRAPPER tab_item tabname= "perl" %] Perl modules [% END %] - [% WRAPPER tab_item tabname= "sysinfo" %] System information [% END %] - [% WRAPPER tab_item tabname= "team" %] Koha team [% END %] - [% WRAPPER tab_item tabname= "licenses" %] Licenses [% END %] - [% WRAPPER tab_item tabname= "translations" %] Translations [% END %] - [% WRAPPER tab_item tabname= "history" %] Timeline [% END %] - [% WRAPPER tab_item tabname= "dedications" %] Dedications [% END %] + [% WRAPPER tab_item tabname= "about" bt_active= 1 %] Server information [% END %] + [% WRAPPER tab_item tabname= "perl" %] Perl modules [% END %] + [% WRAPPER tab_item tabname= "sysinfo" %] System information [% END %] + [% WRAPPER tab_item tabname= "team" %] Koha team [% END %] + [% WRAPPER tab_item tabname= "licenses" %] Licenses [% END %] + [% WRAPPER tab_item tabname= "translations" %] Translations [% END %] + [% WRAPPER tab_item tabname= "history" %] Timeline [% END %] + [% WRAPPER tab_item tabname= "dedications" %] Dedications [% END %] [% END %] [% WRAPPER tab_panels %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt index 8724346cb9..04a9096731 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt @@ -66,11 +66,11 @@
[% WRAPPER tabs id= "tabs" %] [% WRAPPER tabs_nav %] - [% WRAPPER tab_item tabname= "records_to_import" bt_active= 1 %] Select to import [% END %] + [% WRAPPER tab_item tabname= "records_to_import" bt_active= 1 %] Select to import [% END %] [% IF items %] - [% WRAPPER tab_item tabname= "items_info" %] Item information [% END %] + [% WRAPPER tab_item tabname= "items_info" %] Item information [% END %] [% END %] - [% WRAPPER tab_item tabname= "accounting_details" %] Default accounting details [% END %] + [% WRAPPER tab_item tabname= "accounting_details" %] Default accounting details [% END %] [% END %] [% WRAPPER tab_panels %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt index ce72d07c75..5bfb734285 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt @@ -327,8 +327,8 @@ [% WRAPPER tabs id= "basket_groups" %] [% WRAPPER tabs_nav %] - [% WRAPPER tab_item tabname= "opened" bt_active= 1 %] Open [% END %] - [% WRAPPER tab_item tabname= "closed" %] Closed [% END %] + [% WRAPPER tab_item tabname= "opened" bt_active= 1 %] Open [% END %] + [% WRAPPER tab_item tabname= "closed" %] Closed [% END %] [% END %] [% WRAPPER tab_panels %] [% WRAPPER tab_panel tabname="opened" bt_active= 1 %] 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 dcf0c3e0c3..2429dd5f19 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt @@ -131,8 +131,12 @@ [% WRAPPER tabs id= "invoicestabs" %] [% WRAPPER tabs_nav %] - [% WRAPPER tab_item tabname= "opened" bt_active= 1 %] Open invoices ([% openedinvoices.size || 0 | html %]) [% END %] - [% WRAPPER tab_item tabname= "closed" %] Closed invoices ([% closedinvoices.size || 0 | html %]) [% END %] + [% WRAPPER tab_item tabname= "opened" bt_active= 1 %] + Open invoices ([% openedinvoices.size || 0 | html %]) + [% END %] + [% WRAPPER tab_item tabname= "closed" %] + Closed invoices ([% closedinvoices.size || 0 | html %]) + [% END %] [% END %] [% WRAPPER tab_panels %] [% WRAPPER tab_panel tabname="opened" bt_active= 1 %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/item_circulation_alerts.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/item_circulation_alerts.tt index 00330ffc34..3030a3b2a7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/item_circulation_alerts.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/item_circulation_alerts.tt @@ -108,8 +108,8 @@ [% WRAPPER tabs id= "alerttabs" %] [% WRAPPER tabs_nav %] - [% WRAPPER tab_item tabname= "checkout" bt_active= 1 %] Checkout [% END %] - [% WRAPPER tab_item tabname= "checkin" %] Check-in [% END %] + [% WRAPPER tab_item tabname= "checkout" bt_active= 1 %] Checkout [% END %] + [% WRAPPER tab_item tabname= "checkin" %] Check-in [% END %] [% END %] [% WRAPPER tab_panels %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt index 50a21dc9a5..8e008c5328 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt @@ -256,10 +256,10 @@ [% WRAPPER tabs id= "serialstabs" %] [% WRAPPER tabs_nav %] [% IF mana %] - [% WRAPPER tab_item tabname= "mana" bt_active= 1 %] Mana ([% total || 0 | html %]) [% END %] + [% WRAPPER tab_item tabname= "mana" bt_active= 1 %] Mana ([% total || 0 | html %]) [% END %] [% ELSE %] - [% WRAPPER tab_item tabname= "opened" bt_active= 1 %] Open ([% openedsubscriptions.size || 0 | html %]) [% END %] - [% WRAPPER tab_item tabname= "closed" %] Closed ([% closedsubscriptions.size || 0 | html %]) [% END %] + [% WRAPPER tab_item tabname= "opened" bt_active= 1 %] Open ([% openedsubscriptions.size || 0 | html %]) [% END %] + [% WRAPPER tab_item tabname= "closed" %] Closed ([% closedsubscriptions.size || 0 | html %]) [% END %] [% END %] [% END # /WRAPPER tabs_nav %] [% WRAPPER tab_panels %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt index d093249b0d..353a9b877b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt @@ -95,12 +95,12 @@ [% WRAPPER tabs id= "subscription_description" %] [% WRAPPER tabs_nav %] - [% WRAPPER tab_item tabname= "subscription_info" bt_active= 1 %] Information [% END %] - [% WRAPPER tab_item tabname= "subscription_planning" %] Planning [% END %] - [% WRAPPER tab_item tabname= "subscription_issues" %] Issues [% END %] - [% WRAPPER tab_item tabname= "subscription_summary" %] Summary [% END %] + [% WRAPPER tab_item tabname= "subscription_info" bt_active= 1 %] Information [% END %] + [% WRAPPER tab_item tabname= "subscription_planning" %] Planning [% END %] + [% WRAPPER tab_item tabname= "subscription_issues" %] Issues [% END %] + [% WRAPPER tab_item tabname= "subscription_summary" %] Summary [% END %] [% IF orders_grouped.size %] - [% WRAPPER tab_item tabname= "acquisition_details" %] Acquisition details [% END %] + [% WRAPPER tab_item tabname= "acquisition_details" %] Acquisition details [% END %] [% END %] [% END # /WRAPPER tabs_nav %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt index 1dc23f228e..910deebfef 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt @@ -283,7 +283,13 @@ [% END # /IF no_op_set %] [% IF add_form or copy_form %] -

[% IF ( modify ) %]Modify notice[% ELSE %]Add notice[% END %]

+

+ [% IF ( modify ) %] + Modify notice + [% ELSE %] + Add notice + [% END %] +

@@ -435,7 +441,7 @@ [% CASE 'HOLD_SLIP' %] [% CASE %] - Not supported yet. + Not supported yet. [% END %] [% END # /IF code %] @@ -446,7 +452,7 @@
[% WRAPPER tabs id= "tabs" %] [% WRAPPER tabs_nav %] - [% WRAPPER tab_item tabname= "lang_default" bt_active= 1 %] Default [% END %] + [% WRAPPER tab_item tabname= "lang_default" bt_active= 1 %] Default [% END %] [% FOR language IN languages %] [% FOR sublanguage IN language.sublanguages_loop %] [% IF language.plural %] -- 2.20.1