From 5d70f71774df525e80c4b62e0321403cab5e9f8a Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 6 Jun 2023 15:27:49 +0000 Subject: [PATCH] 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 Signed-off-by: Lucas Gass Signed-off-by: Tomas Cohen Arazi --- .../modules/rotating_collections/addItems.tt | 13 ++++++++--- .../rotating_collections/editCollections.tt | 23 ++++++++++++------- .../rotatingCollections.tt | 7 +++++- .../transferCollection.tt | 13 ++++++++--- 4 files changed, 41 insertions(+), 15 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/addItems.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/addItems.tt index 01d9086ff1..a13bc572d0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/addItems.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/addItems.tt @@ -1,8 +1,15 @@ [% USE raw %] [% USE Asset %] +[% PROCESS 'i18n.inc' %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] -Add or remove items › Collection [% colTitle | html %] › Rotating collections › Tools › Koha +[% FILTER collapse %] + [% t("Manage items") | html %] › + [% tx("Collection '{collection_title}'", { collection_title = colTitle }) | html %] › + [% t("Rotating collections") | html %] › + [% t("Tools") | html %] › + [% t("Koha") | html %] +[% END %] [% INCLUDE 'doc-head-close.inc' %] @@ -20,7 +27,7 @@ Rotating collections [% END %] [% WRAPPER breadcrumb_item %] - Collection [% colTitle | html %] + [% tx("Collection '{collection_title}'", { collection_title = colTitle }) | html %] [% END %] [% WRAPPER breadcrumb_item bc_active= 1 %] Manage items @@ -39,7 +46,7 @@ [% ELSE %] [% INCLUDE 'rotating-collections-toolbar.inc' %] -

Manage items for [% colTitle | html %]

+

[% tx("Manage items for '{collection_title}'", { collection_title = colTitle }) | html %]

[% IF ( previousActionAdd ) %] [% IF ( addSuccess ) %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/editCollections.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/editCollections.tt index 001558e1f6..bf4370550b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/editCollections.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/editCollections.tt @@ -1,14 +1,21 @@ [% USE raw %] [% USE Asset %] +[% PROCESS 'i18n.inc' %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] - - [%- 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 -%] › Rotating collections › Tools › Koha - + [% t("Edit collection") | html %] › + [% tx("Collection '{collection_title}'", { collection_title = editColTitle }) | html %] + [% END %] › + [% t("Rotating collections") | html %] › + [% t("Tools") | html %] › + [% t("Koha") | html %] +[% END %] [% INCLUDE 'doc-head-close.inc' %] @@ -35,10 +42,10 @@ [% END %] [% ELSE %] [% WRAPPER breadcrumb_item %] - Collection [% editColTitle | html %] + [% tx("Collection '{collection_title}'", { collection_title = editColTitle }) | html %] [% END %] [% WRAPPER breadcrumb_item bc_active= 1 %] - Edit collection + [% t("Edit collection") | html %] [% END %] [% END -%] [% END #/ WRAPPER breadcrumbs %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/rotatingCollections.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/rotatingCollections.tt index 2ed6ded2cc..1fadd9c4f5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/rotatingCollections.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/rotatingCollections.tt @@ -1,9 +1,14 @@ [% USE raw %] [% USE Asset %] [% USE Branches %] +[% PROCESS 'i18n.inc' %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] -Rotating collections › Tools › Koha +[% FILTER collapse %] + [% t("Rotating collections") | html %] › + [% t("Tools") | html %] › + [% t("Koha") | html %] +[% END %] [% INCLUDE 'doc-head-close.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/transferCollection.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/transferCollection.tt index 994604372e..fb54c8f80a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/transferCollection.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/transferCollection.tt @@ -1,9 +1,16 @@ [% USE raw %] [% USE Asset %] [% USE Branches %] +[% PROCESS 'i18n.inc' %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] -Transfer collection › Rotating collections › Tools › Koha +[% FILTER collapse %] + [% t("Transfer collection") | html %] › + [% tx("Collection '{collection_title}'", { collection_title = colTitle }) | html %] › + [% t("Rotating collections") | html %] › + [% t("Tools") | html %] › + [% t("Koha") | html %] +[% END %] [% INCLUDE 'doc-head-close.inc' %] @@ -20,7 +27,7 @@ Rotating collections [% END %] [% WRAPPER breadcrumb_item %] - Collection [% colTitle | html %] + [% tx("Collection '{collection_title}'", { collection_title = colTitle }) | html %] [% END %] [% WRAPPER breadcrumb_item bc_active= 1 %] Transfer collection @@ -33,7 +40,7 @@
-

Transfer collection [% colTitle | html %]

+

[% tx("Transfer collection '{collection_title}'", { collection_title = colTitle }) | html %]

[% IF ( messages ) %] [% FOREACH message IN messages %] -- 2.39.5