From 283900cd45fcd9ee28a7db62cf817d3d3f694424 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 24 Feb 2023 13:09:56 +0000 Subject: [PATCH] Bug 33006: (follow-up) Add spans for translatability This patch finds places in the updated breadcrumbs markup where a translatable string is isolated in a way that makes it hard for the translation script to find it, and wraps these strings with This patch also modifies some of the templates to simplify the logic controlling how different elements of the breadcrumbs are shown or not. This patch also modifies another problematic set of strings in auth_tag_structure.tt outside the breadcrumbs. Signed-off-by: Andrew Auld Signed-off-by: Katrin Fischer --- .../en/modules/admin/additional-fields.tt | 8 +- .../prog/en/modules/admin/admin-home.tt | 2 +- .../en/modules/admin/adveditorshortcuts.tt | 2 +- .../prog/en/modules/admin/aqbudgetperiods.tt | 41 ++++------ .../prog/en/modules/admin/aqbudgets.tt | 15 ++-- .../prog/en/modules/admin/aqcontract.tt | 34 ++++----- .../prog/en/modules/admin/aqplan.tt | 2 +- .../prog/en/modules/admin/audio_alerts.tt | 2 +- .../modules/admin/auth_subfields_structure.tt | 6 +- .../en/modules/admin/auth_tag_structure.tt | 76 ++++++------------- 10 files changed, 71 insertions(+), 117 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/additional-fields.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/additional-fields.tt index 58cbff59eb..9e51a13787 100755 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/additional-fields.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/additional-fields.tt @@ -33,11 +33,11 @@ [% END %] [% IF field %] [% WRAPPER breadcrumb_item bc_active= 1 %] - Modify field '[% field.name | html %]' + Modify field '[% field.name | html %]' [% END %] [% ELSE %] [% WRAPPER breadcrumb_item bc_active= 1 %] - Add field + Add field [% END %] [% END %] @@ -46,12 +46,12 @@ Manage additional fields [% END %] [% WRAPPER breadcrumb_item bc_active= 1 %] - Modify fields for '[% tablename | html %]' + Modify fields for '[% tablename | html %]' [% END %] [% CASE %] [% WRAPPER breadcrumb_item bc_active= 1 %] - Manage additional fields + Manage additional fields [% END %] [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt index d27a03250e..1ba35ac919 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt @@ -14,7 +14,7 @@ [% WRAPPER 'sub-header.inc' %] [% WRAPPER breadcrumbs %] [% WRAPPER breadcrumb_item bc_active= 1 %] - Administration + Administration [% END %] [% END #/ WRAPPER breadcrumbs %] [% END #/ WRAPPER sub-header.inc %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/adveditorshortcuts.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/adveditorshortcuts.tt index dea5c51ac6..85784a2e84 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/adveditorshortcuts.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/adveditorshortcuts.tt @@ -18,7 +18,7 @@ Administration [% END %] [% WRAPPER breadcrumb_item bc_active= 1 %] - Advanced editor shortcuts + Advanced editor shortcuts [% END %] [% END #/ WRAPPER breadcrumbs %] [% END #/ WRAPPER sub-header.inc %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt index 1a2a4a0c0e..8815ce8250 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt @@ -82,66 +82,55 @@ Administration [% END %] - [% IF ( add_form ) %] + [% IF ( else ) %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + Budgets administration + [% END %] + [% ELSE %] [% WRAPPER breadcrumb_item %] Budgets [% END %] + [% END %] + + [% IF ( add_form ) %] [% IF ( budget_period_id ) %] [% WRAPPER breadcrumb_item bc_active= 1 %] - Modify budget '[% budget_period_description | html %]' + Modify budget '[% budget_period_description | html %]' [% END %] [% ELSE %] [% WRAPPER breadcrumb_item bc_active= 1 %] - Add budget + Add budget [% END %] [% END %] [% END %] [% IF ( delete_confirm ) %] - [% WRAPPER breadcrumb_item %] - Budgets - [% END %] [% IF ( total || funds_exist ) %] [% WRAPPER breadcrumb_item bc_active= 1 %] - Cannot delete budget '[% budget_period_description | html %]' + Cannot delete budget '[% budget_period_description | html %]' [% END %] [% ELSE %] [% WRAPPER breadcrumb_item bc_active= 1 %] - Delete budget '[% budget_period_description | html %]'? + Delete budget '[% budget_period_description | html %]'? [% END %] [% END %] [% END %] [% IF ( duplicate_form ) %] - [% WRAPPER breadcrumb_item %] - Budgets - [% END %] [% WRAPPER breadcrumb_item bc_active= 1 %] - Duplicate budget + Duplicate budget [% END %] [% END %] [% IF close_form %] - [% WRAPPER breadcrumb_item %] - Budgets - [% END %] [% WRAPPER breadcrumb_item bc_active= 1 %] - Close budget [% budget_period_description | html %] + Close budget [% budget_period_description | html %] [% END %] [% END %] [% IF closed %] - [% WRAPPER breadcrumb_item %] - Budgets - [% END %] - [% WRAPPER breadcrumb_item bc_active= 1 %] - Budget [% budget_period_description | html %] closed - [% END %] - [% END %] - - [% IF ( else ) %] [% WRAPPER breadcrumb_item bc_active= 1 %] - Budgets administration + Budget [% budget_period_description | html %] closed [% END %] [% END %] [% END #/ WRAPPER breadcrumbs %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt index d2e68e9747..b46f418541 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt @@ -31,11 +31,11 @@ [% IF op == 'list' %] [% IF budget_period_id %] [% WRAPPER breadcrumb_item bc_active= 1 %] - Funds for '[% budget_period_description | html %]' + Funds for '[% budget_period_description | html %]' [% END %] [% ELSE %] [% WRAPPER breadcrumb_item bc_active= 1 %] - All funds + All funds [% END %] [% END %] [% END %] @@ -46,12 +46,15 @@ [% END %] [% IF ( budget_id ) %] [% WRAPPER breadcrumb_item bc_active= 1 %] - Modify fund - [% IF ( budget_name ) %] '[% budget_name | html %]'[% END %] + [% IF ( budget_name ) %] + Modify fund '[% budget_name | html %]' + [% ELSE %] + Modify fund + [% END %] [% END %] [% ELSE %] [% WRAPPER breadcrumb_item bc_active= 1 %] - Add fund + Add fund [% END %] [% END %] [% END %] @@ -61,7 +64,7 @@ Funds [% END %] [% WRAPPER breadcrumb_item bc_active= 1 %] - Delete fund? + Delete fund? [% END %] [% END %] [% END #/ WRAPPER breadcrumbs %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqcontract.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqcontract.tt index 0c3b06d680..91435a27a4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqcontract.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqcontract.tt @@ -31,51 +31,43 @@ [% booksellername | html %] [% END %] - [% IF ( add_form ) %] + [% IF ( else ) %] + [% WRAPPER breadcrumb_item bc_active=1 %] + Contracts + [% END %] + [% ELSE %] [% WRAPPER breadcrumb_item %] Contracts [% END %] + [% END %] + + [% IF ( add_form ) %] [% IF ( contractnumber ) %] [% WRAPPER breadcrumb_item bc_active=1 %] - Modify contract '[% contractname | html %]' + Modify contract '[% contractname | html %]' [% END %] [% ELSE %] [% WRAPPER breadcrumb_item bc_active=1 %] - New contract + New contract [% END %] [% END %] [% END %] [% IF ( add_validate ) %] - [% WRAPPER breadcrumb_item %] - Contracts - [% END %] [% WRAPPER breadcrumb_item bc_active=1 %] - Data recorded + Data recorded [% END %] [% END %] [% IF ( delete_confirm ) %] - [% WRAPPER breadcrumb_item %] - Contracts - [% END %] [% WRAPPER breadcrumb_item bc_active=1 %] - Confirm deletion of contract [% contractnumber | html %] + Confirm deletion of contract [% contractnumber | html %] [% END %] [% END %] [% IF ( delete_confirmed ) %] - [% WRAPPER breadcrumb_item %] - Contracts - [% END %] - [% WRAPPER breadcrumb_item bc_active=1 %] - Contract deleted - [% END %] - [% END %] - - [% IF ( else ) %] [% WRAPPER breadcrumb_item bc_active=1 %] - Contracts + Contract deleted [% END %] [% END %] [% END #/ WRAPPER breadcrumbs %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tt index a65b9a3b09..22a1eca100 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tt @@ -26,7 +26,7 @@ Funds [% END %] [% WRAPPER breadcrumb_item bc_active= 1 %] - Planning + Planning [% END %] [% END #/ WRAPPER breadcrumbs %] [% END #/ WRAPPER sub-header.inc %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/audio_alerts.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/audio_alerts.tt index 253eafd5f2..02f6d1bba4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/audio_alerts.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/audio_alerts.tt @@ -18,7 +18,7 @@ Administration [% END %] [% WRAPPER breadcrumb_item bc_active= 1 %] - Audio alerts + Audio alerts [% END %] [% END #/ WRAPPER breadcrumbs %] [% END #/ WRAPPER sub-header.inc %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_subfields_structure.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_subfields_structure.tt index 4061006a67..5a0f035fc6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_subfields_structure.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_subfields_structure.tt @@ -35,7 +35,7 @@ [% IF ( else ) %] [% WRAPPER breadcrumb_item bc_active= 1 %] - Authority MARC subfield structure for [% tagfield | html %] + Authority MARC subfield structure for [% tagfield | html %] [% END %] [% ELSE %] [% WRAPPER breadcrumb_item %] @@ -45,7 +45,7 @@ [% IF ( delete_confirm ) %] [% WRAPPER breadcrumb_item bc_active= 1 %] - Confirm deletion of subfield [% tagsubfield | html %]? + Confirm deletion of subfield [% tagsubfield | html %]? [% END %] [% END %] @@ -53,7 +53,7 @@ [% IF ( use_heading_flags_p ) %] [% IF ( heading_edit_subfields_p ) %] [% WRAPPER breadcrumb_item bc_active= 1 %] - Edit MARC subfields constraints + Edit MARC subfields constraints [% END %] [% END %] [% ELSE %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_tag_structure.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_tag_structure.tt index b40eac911e..c97d5c62e9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_tag_structure.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_tag_structure.tt @@ -51,49 +51,33 @@ Authority MARC framework › Administration › Koha Authority types [% END %] + [% IF ( add_form || delete_confirm || delete_confirmed ) %] + [% IF ( authtypecode ) %] + [% WRAPPER breadcrumb_item %] + [% authtypecode | html %] Framework + [% END %] + [% ELSE %] + [% WRAPPER breadcrumb_item %] + Default framework + [% END %] + [% END %] + [% END %] + [% IF ( add_form ) %] [% IF ( use_heading_flags_p ) %] - [% IF ( heading_modify_tag_p ) %] - [% IF ( authtypecode ) %] - [% WRAPPER breadcrumb_item %] - [% authtypecode | html %] Framework - [% END %] - [% ELSE %] - [% WRAPPER breadcrumb_item %] - Default framework - [% END %] - [% END %] [% WRAPPER breadcrumb_item bc_active= 1 %] - Modify tag + Modify tag [% END %] [% END %] [% IF ( heading_add_tag_p ) %] - [% IF ( authtypecode ) %] - [% WRAPPER breadcrumb_item %] - [% authtypecode | html %] framework - [% END %] - [% ELSE %] - [% WRAPPER breadcrumb_item %] - Default framework - [% END %] - [% END %] [% WRAPPER breadcrumb_item bc_active= 1 %] - New tag + New tag [% END %] [% END %] [% ELSE %] - [% IF ( authtypecode ) %] - [% WRAPPER breadcrumb_item %] - [% authtypecode | html %] Framework - [% END %] - [% ELSE %] - [% WRAPPER breadcrumb_item %] - Default framework - [% END %] - [% END %] [% WRAPPER breadcrumb_item bc_active= 1 %] [% action | html %] [% END %] @@ -101,31 +85,13 @@ Authority MARC framework › Administration › Koha [% ELSE %] [% IF ( delete_confirm ) %] - [% IF ( authtypecode ) %] - [% WRAPPER breadcrumb_item %] - [% authtypecode | html %] framework - [% END %] - [% ELSE %] - [% WRAPPER breadcrumb_item %] - Default framework - [% END %] - [% END %] [% WRAPPER breadcrumb_item bc_active= 1 %] - Confirm deletion + Confirm deletion [% END %] [% ELSE %] [% IF ( delete_confirmed ) %] - [% IF ( authtypecode ) %] - [% WRAPPER breadcrumb_item %] - [% authtypecode | html %] framework - [% END %] - [% ELSE %] - [% WRAPPER breadcrumb_item %] - Default framework - [% END %] - [% END %] [% WRAPPER breadcrumb_item bc_active= 1 %] - Data deleted + Data deleted [% END %] [% ELSE %] [% IF ( authtypecode ) %] @@ -134,7 +100,7 @@ Authority MARC framework › Administration › Koha [% END %] [% ELSE %] [% WRAPPER breadcrumb_item bc_active= 1 %] - Default framework + Default framework [% END %] [% END %] [% END %] @@ -155,8 +121,12 @@ Authority MARC framework › Administration › Koha [% IF ( add_form ) %]

- [% IF ( heading_modify_tag_p ) %]Modify tag[% END %] - [% IF ( heading_add_tag_p ) %]New tag[% END %] + [% IF ( heading_modify_tag_p ) %] + Modify tag + [% END %] + [% IF ( heading_add_tag_p ) %] + New tag + [% END %]

-- 2.30.2