Bug 33924: Improve translation of title tags: Rotating collections

This patch updates rotating collection templates so that title tags can
be more easily translated.

The patch also makes some corrections to breadcrumb navigation and page
headers to make sure they are consistent with titles.

To test, apply the patch and confirm that the following rotating
collection pages have the correct title tags:

- Tools -> Rotating collections
  - Rotating collections list
  -> New collection
  -> Edit collection
  -> Delete collection -> Confirmation page
  -> Transfer collection

Signed-off-by: Salah Ghedda <salah.ghedda@inLibro.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Owen Leonard 2023-06-06 15:27:49 +00:00 committed by Tomas Cohen Arazi
parent 5f6e1a1cf7
commit 5d70f71774
No known key found for this signature in database
GPG Key ID: 0A272EA1B2F3C15F
4 changed files with 41 additions and 15 deletions

View File

@ -1,8 +1,15 @@
[% USE raw %]
[% USE Asset %]
[% PROCESS 'i18n.inc' %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Add or remove items &rsaquo; Collection [% colTitle | html %] &rsaquo; Rotating collections &rsaquo; Tools &rsaquo; Koha</title>
<title>[% FILTER collapse %]
[% t("Manage items") | html %] &rsaquo;
[% tx("Collection '{collection_title}'", { collection_title = colTitle }) | html %] &rsaquo;
[% t("Rotating collections") | html %] &rsaquo;
[% t("Tools") | html %] &rsaquo;
[% t("Koha") | html %]
[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
</head>
@ -20,7 +27,7 @@
<a href="/cgi-bin/koha/rotating_collections/rotatingCollections.pl">Rotating collections</a>
[% END %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/rotating_collections/addItems.pl?colId=[% colId | uri %]">Collection <em>[% colTitle | html %]</em></a>
<a href="/cgi-bin/koha/rotating_collections/addItems.pl?colId=[% colId | uri %]">[% tx("Collection '{collection_title}'", { collection_title = colTitle }) | html %]</a>
[% END %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Manage items</span>
@ -39,7 +46,7 @@
</div>
[% ELSE %]
[% INCLUDE 'rotating-collections-toolbar.inc' %]
<h1>Manage items for <em>[% colTitle | html %]</em></h1>
<h1>[% tx("Manage items for '{collection_title}'", { collection_title = colTitle }) | html %]</h1>
[% IF ( previousActionAdd ) %]
[% IF ( addSuccess ) %]

View File

@ -1,14 +1,21 @@
[% USE raw %]
[% USE Asset %]
[% PROCESS 'i18n.inc' %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>
[%- IF ( action == "new" ) %]
Add a new collection
<title>[% FILTER collapse %]
[% IF ( action == "new" ) %]
[% t("Add a new collection") | html %]
[% ELSIF ( action == "delete" ) %]
[% t("Collection deleted") | html %]
[% ELSE %]
Edit collection [% editColTitle | html %]
[% END -%] &rsaquo; Rotating collections &rsaquo; Tools &rsaquo; Koha
</title>
[% t("Edit collection") | html %] &rsaquo;
[% tx("Collection '{collection_title}'", { collection_title = editColTitle }) | html %]
[% END %] &rsaquo;
[% t("Rotating collections") | html %] &rsaquo;
[% t("Tools") | html %] &rsaquo;
[% t("Koha") | html %]
[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
</head>
<body id="rcoll_editCollections" class="tools rcoll">
@ -35,10 +42,10 @@
[% END %]
[% ELSE %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/rotating_collections/addItems.pl?colId=[% editColId | uri %]">Collection <em>[% editColTitle | html %]</em></a>
<a href="/cgi-bin/koha/rotating_collections/addItems.pl?colId=[% editColId | uri %]">[% tx("Collection '{collection_title}'", { collection_title = editColTitle }) | html %]</em></a>
[% END %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Edit collection</span>
[% t("Edit collection") | html %]
[% END %]
[% END -%]
[% END #/ WRAPPER breadcrumbs %]

View File

@ -1,9 +1,14 @@
[% USE raw %]
[% USE Asset %]
[% USE Branches %]
[% PROCESS 'i18n.inc' %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Rotating collections &rsaquo; Tools &rsaquo; Koha</title>
<title>[% FILTER collapse %]
[% t("Rotating collections") | html %] &rsaquo;
[% t("Tools") | html %] &rsaquo;
[% t("Koha") | html %]
[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
</head>

View File

@ -1,9 +1,16 @@
[% USE raw %]
[% USE Asset %]
[% USE Branches %]
[% PROCESS 'i18n.inc' %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Transfer collection &rsaquo; Rotating collections &rsaquo; Tools &rsaquo; Koha</title>
<title>[% FILTER collapse %]
[% t("Transfer collection") | html %] &rsaquo;
[% tx("Collection '{collection_title}'", { collection_title = colTitle }) | html %] &rsaquo;
[% t("Rotating collections") | html %] &rsaquo;
[% t("Tools") | html %] &rsaquo;
[% t("Koha") | html %]
[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
</head>
<body id="rcoll_transferCollection" class="tools rcoll">
@ -20,7 +27,7 @@
<a href="/cgi-bin/koha/rotating_collections/rotatingCollections.pl">Rotating collections</a>
[% END %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/rotating_collections/addItems.pl?colId=[% colId | uri %]">Collection <em>[% colTitle | html %]</em></a>
<a href="/cgi-bin/koha/rotating_collections/addItems.pl?colId=[% colId | uri %]">[% tx("Collection '{collection_title}'", { collection_title = colTitle }) | html %]</em></a>
[% END %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Transfer collection</span>
@ -33,7 +40,7 @@
<div class="col-sm-10 col-sm-push-2">
<main>
<h1>Transfer collection <em>[% colTitle | html %]</em></h1>
<h1>[% tx("Transfer collection '{collection_title}'", { collection_title = colTitle }) | html %]</h1>
[% IF ( messages ) %]
[% FOREACH message IN messages %]