From 33ec7ad5222c677f67a33ecab96ff89efee6fd20 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 --- .../prog/en/includes/html_helpers.inc | 10 +++++----- koha-tmpl/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 ++++++-- .../en/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, 43 insertions(+), 33 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 e2230dd631..d1ae2ce519 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc @@ -360,8 +360,8 @@ [%# 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 ] + [ 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 ] @@ -428,7 +428,7 @@ Module page [ END ] [ WRAPPER breadcrumb_item bc_active = 1 ] - Add form + Add form [ END ] [ ELSIF op == 'delete_confirm' ] @@ -436,12 +436,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 81ddc19e61..888feaacea 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 57aa5336d4..b6a51308eb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt @@ -137,8 +137,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 f97c98c41e..8ff2374722 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 @@ -115,8 +115,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 8fac9a8cfc..7aa1b6c8d8 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.34.1