Bugzilla – Attachment 147338 Details for
Bug 33006
Use template wrapper for breadcrumbs: Administration part 1
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33006: (follow-up) Add spans for translatability
Bug-33006-follow-up-Add-spans-for-translatability.patch (text/plain), 20.89 KB, created by
Owen Leonard
on 2023-02-24 15:02:22 UTC
(
hide
)
Description:
Bug 33006: (follow-up) Add spans for translatability
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2023-02-24 15:02:22 UTC
Size:
20.89 KB
patch
obsolete
>From ca3aa07c15fab3a651257cadf0755d71ed2bd5b3 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >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 <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. >--- > .../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 %]' >+ <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 %] >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 >+ <span>Administration</span> > [% 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 @@ > <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 %] >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 @@ > <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 %] >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 a9d23c5143..a91654b0d8 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 %]' >+ <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 %] >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 fc62a847e1..e267b9fcbc 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 @@ > <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 %] >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 @@ > <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 %] >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 @@ > <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 %] >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 %] >+ <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 %] >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 > <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 › Administration › 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 › Administration › 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 › Administration › 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" /> >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 33006
:
146923
|
146924
|
147092
|
147338
|
149053
|
149338
|
149339