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 <span>

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 <andrew.auld@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f24771ad2e)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
This commit is contained in:
Owen Leonard 2023-02-24 13:09:56 +00:00 committed by Jacob O'Mara
parent a4d12f7cde
commit b427fd5876
10 changed files with 71 additions and 117 deletions

View file

@ -33,11 +33,11 @@
[% END %]
[% IF field %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
Modify field '[% field.name | html %]'
<span>Modify field '[% field.name | html %]'</span>
[% END %]
[% ELSE %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
Add field
<span>Add field</span>
[% END %]
[% END %]
@ -46,12 +46,12 @@
<a href="/cgi-bin/koha/admin/additional-fields.pl">Manage additional fields</a>
[% END %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
Modify fields for '[% tablename | html %]'
<span>Modify fields for '[% tablename | html %]'</span>
[% END %]
[% CASE %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
Manage additional fields
<span>Manage additional fields</span>
[% END %]
[% END %]

View file

@ -14,7 +14,7 @@
[% WRAPPER 'sub-header.inc' %]
[% WRAPPER breadcrumbs %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
Administration
<span>Administration</span>
[% END %]
[% END #/ WRAPPER breadcrumbs %]
[% END #/ WRAPPER sub-header.inc %]

View file

@ -18,7 +18,7 @@
<a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
[% END %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
Advanced editor shortcuts
<span>Advanced editor shortcuts</span>
[% END %]
[% END #/ WRAPPER breadcrumbs %]
[% END #/ WRAPPER sub-header.inc %]

View file

@ -82,66 +82,55 @@
<a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
[% END %]
[% IF ( add_form ) %]
[% IF ( else ) %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Budgets administration</span>
[% END %]
[% ELSE %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Budgets</a>
[% END %]
[% END %]
[% IF ( add_form ) %]
[% IF ( budget_period_id ) %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
Modify budget '[% budget_period_description | html %]'
<span>Modify budget '[% budget_period_description | html %]'</span>
[% END %]
[% ELSE %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
Add budget
<span>Add budget</span>
[% END %]
[% END %]
[% END %]
[% IF ( delete_confirm ) %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Budgets</a>
[% END %]
[% IF ( total || funds_exist ) %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
Cannot delete budget '[% budget_period_description | html %]'
<span>Cannot delete budget '[% budget_period_description | html %]'</span>
[% END %]
[% ELSE %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
Delete budget '[% budget_period_description | html %]'?
<span>Delete budget '[% budget_period_description | html %]'?</span>
[% END %]
[% END %]
[% END %]
[% IF ( duplicate_form ) %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Budgets</a>
[% END %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
Duplicate budget
<span>Duplicate budget</span>
[% END %]
[% END %]
[% IF close_form %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Budgets</a>
[% END %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
Close budget [% budget_period_description | html %]
<span>Close budget [% budget_period_description | html %]</span>
[% END %]
[% END %]
[% IF closed %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Budgets</a>
[% 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
<span>Budget [% budget_period_description | html %] closed</span>
[% END %]
[% END %]
[% END #/ WRAPPER breadcrumbs %]

View file

@ -31,11 +31,11 @@
[% IF op == 'list' %]
[% IF budget_period_id %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
Funds for '[% budget_period_description | html %]'
<span>Funds for '[% budget_period_description | html %]'</span>
[% END %]
[% ELSE %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
All funds
<span>All funds</span>
[% 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 ) %]
<span>Modify fund '[% budget_name | html %]'</span>
[% ELSE %]
<span>Modify fund</span>
[% END %]
[% END %]
[% ELSE %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
Add fund
<span>Add fund</span>
[% END %]
[% END %]
[% END %]
@ -61,7 +64,7 @@
<a href="/cgi-bin/koha/admin/aqbudgets.pl">Funds</a>
[% END %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
Delete fund?
<span>Delete fund?</span>
[% END %]
[% END %]
[% END #/ WRAPPER breadcrumbs %]

View file

@ -31,51 +31,43 @@
<a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% booksellername | html %]</a>
[% END %]
[% IF ( add_form ) %]
[% IF ( else ) %]
[% WRAPPER breadcrumb_item bc_active=1 %]
<span>Contracts</span>
[% END %]
[% ELSE %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/admin/aqcontract.pl?booksellerid=[% booksellerid | uri %]">Contracts</a>
[% END %]
[% END %]
[% IF ( add_form ) %]
[% IF ( contractnumber ) %]
[% WRAPPER breadcrumb_item bc_active=1 %]
Modify contract '[% contractname | html %]'
<span>Modify contract '[% contractname | html %]'</span>
[% END %]
[% ELSE %]
[% WRAPPER breadcrumb_item bc_active=1 %]
New contract
<span>New contract</span>
[% END %]
[% END %]
[% END %]
[% IF ( add_validate ) %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/admin/aqcontract.pl?booksellerid=[% booksellerid | uri %]">Contracts</a>
[% END %]
[% WRAPPER breadcrumb_item bc_active=1 %]
Data recorded
<span>Data recorded</span>
[% END %]
[% END %]
[% IF ( delete_confirm ) %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/admin/aqcontract.pl?booksellerid=[% booksellerid | uri %]">Contracts</a>
[% END %]
[% WRAPPER breadcrumb_item bc_active=1 %]
Confirm deletion of contract [% contractnumber | html %]
<span>Confirm deletion of contract [% contractnumber | html %]</span>
[% END %]
[% END %]
[% IF ( delete_confirmed ) %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/admin/aqcontract.pl?booksellerid=[% booksellerid | uri %]">Contracts</a>
[% END %]
[% WRAPPER breadcrumb_item bc_active=1 %]
Contract deleted
[% END %]
[% END %]
[% IF ( else ) %]
[% WRAPPER breadcrumb_item bc_active=1 %]
Contracts
<span>Contract deleted</span>
[% END %]
[% END %]
[% END #/ WRAPPER breadcrumbs %]

View file

@ -26,7 +26,7 @@
<a href="/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=[% budget_period_id | uri %]">Funds</a>
[% END %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
Planning
<span>Planning</span>
[% END %]
[% END #/ WRAPPER breadcrumbs %]
[% END #/ WRAPPER sub-header.inc %]

View file

@ -18,7 +18,7 @@
<a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
[% END %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
Audio alerts
<span>Audio alerts</span>
[% END %]
[% END #/ WRAPPER breadcrumbs %]
[% END #/ WRAPPER sub-header.inc %]

View file

@ -35,7 +35,7 @@
[% IF ( else ) %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
Authority MARC subfield structure for [% tagfield | html %]
<span>Authority MARC subfield structure for [% tagfield | html %]</span>
[% END %]
[% ELSE %]
[% WRAPPER breadcrumb_item %]
@ -45,7 +45,7 @@
[% IF ( delete_confirm ) %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
Confirm deletion of subfield [% tagsubfield | html %]?
<span>Confirm deletion of subfield [% tagsubfield | html %]?</span>
[% 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
<span>Edit MARC subfields constraints</span>
[% END %]
[% END %]
[% ELSE %]

View file

@ -51,49 +51,33 @@ Authority MARC framework &rsaquo; Administration &rsaquo; Koha
<a href="/cgi-bin/koha/admin/authtypes.pl">Authority types</a>
[% END %]
[% IF ( add_form || delete_confirm || delete_confirmed ) %]
[% IF ( authtypecode ) %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/admin/auth_tag_structure.pl?authtypecode=[% authtypecode | uri %]">[% authtypecode | html %] Framework</a>
[% END %]
[% ELSE %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/admin/auth_tag_structure.pl">Default framework</a>
[% END %]
[% END %]
[% END %]
[% IF ( add_form ) %]
[% IF ( use_heading_flags_p ) %]
[% IF ( heading_modify_tag_p ) %]
[% IF ( authtypecode ) %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/admin/auth_tag_structure.pl?authtypecode=[% authtypecode | uri %]">[% authtypecode | html %] Framework</a>
[% END %]
[% ELSE %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/admin/auth_tag_structure.pl">Default framework</a>
[% END %]
[% END %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
Modify tag
<span>Modify tag</span>
[% END %]
[% END %]
[% IF ( heading_add_tag_p ) %]
[% IF ( authtypecode ) %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/admin/auth_tag_structure.pl?authtypecode=[% authtypecode | uri %]">[% authtypecode | html %] framework</a>
[% END %]
[% ELSE %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/admin/auth_tag_structure.pl">Default framework</a>
[% END %]
[% END %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
New tag
<span>New tag</span>
[% END %]
[% END %]
[% ELSE %]
[% IF ( authtypecode ) %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/admin/auth_tag_structure.pl?authtypecode=[% authtypecode | uri %]">[% authtypecode | html %] Framework</a>
[% END %]
[% ELSE %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/admin/auth_tag_structure.pl">Default framework</a>
[% END %]
[% END %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
[% action | html %]
[% END %]
@ -101,31 +85,13 @@ Authority MARC framework &rsaquo; Administration &rsaquo; Koha
[% ELSE %]
[% IF ( delete_confirm ) %]
[% IF ( authtypecode ) %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/admin/auth_tag_structure.pl?authtypecode=[% authtypecode | uri %]">[% authtypecode | html %] framework</a>
[% END %]
[% ELSE %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/admin/auth_tag_structure.pl">Default framework</a>
[% END %]
[% END %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
Confirm deletion
<span>Confirm deletion</span>
[% END %]
[% ELSE %]
[% IF ( delete_confirmed ) %]
[% IF ( authtypecode ) %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/admin/auth_tag_structure.pl?authtypecode=[% authtypecode | uri %]">[% authtypecode | html %] framework</a>
[% END %]
[% ELSE %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/admin/auth_tag_structure.pl">Default framework</a>
[% END %]
[% END %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
Data deleted
<span>Data deleted</span>
[% END %]
[% ELSE %]
[% IF ( authtypecode ) %]
@ -134,7 +100,7 @@ Authority MARC framework &rsaquo; Administration &rsaquo; Koha
[% END %]
[% ELSE %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
Default framework
<span>Default framework</span>
[% END %]
[% END %]
[% END %]
@ -155,8 +121,12 @@ Authority MARC framework &rsaquo; Administration &rsaquo; Koha
[% IF ( add_form ) %]
<h2>
[% IF ( heading_modify_tag_p ) %]Modify tag[% END %]
[% IF ( heading_add_tag_p ) %]New tag[% END %]
[% IF ( heading_modify_tag_p ) %]
<span>Modify tag</span>
[% END %]
[% IF ( heading_add_tag_p ) %]
<span>New tag</span>
[% END %]
</h2>
<form action="[% script_name | html %]" name="Aform" method="post" class="validated">
<input type="hidden" name="op" value="add_validate" />