From 3be7ff56795b3e2728a6153e400b61451b5fb897 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 6 Jun 2023 15:16:45 +0000 Subject: [PATCH] Bug 33916: Improve translation of title tags: Labels This patch label creator templates so that title tags can be more easily translated. The patch also makes some minor changes to some templates to improve consistency between page title, breadcrumb navigation, and page heading. To test, apply the patch and confirm that the following pages have the correct title tags: - Cataloging -> Label creator home - Manage -> Label batches - Edit -> - Click the "Add item(s)" button without entering any barcodes or item numbers in the form. - Test the search form and search results - Manage -> Layouts - Manage -> Label templates - Manage -> Printer profiles - New -> Label batch - New -> Layout - New -> Label template - New -> Printer profile - New -> Barcode range - Cataloging -> Barcode image generator - Cataloging -> Quick spine label creator Signed-off-by: Salah Ghedda Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- .../prog/en/modules/labels/barcode-print.tt | 8 ++++- .../en/modules/labels/label-edit-batch.tt | 13 ++++++- .../en/modules/labels/label-edit-layout.tt | 13 ++++++- .../en/modules/labels/label-edit-profile.tt | 13 ++++++- .../en/modules/labels/label-edit-range.tt | 8 ++++- .../en/modules/labels/label-edit-template.tt | 13 ++++++- .../prog/en/modules/labels/label-home.tt | 7 +++- .../prog/en/modules/labels/label-manage.tt | 34 +++++++++++-------- .../prog/en/modules/labels/label-print.tt | 7 +++- .../prog/en/modules/labels/result.tt | 7 +++- .../prog/en/modules/labels/search.tt | 9 +++-- .../prog/en/modules/labels/spinelabel-home.tt | 10 ++++-- .../en/modules/labels/spinelabel-print.tt | 7 +++- 13 files changed, 120 insertions(+), 29 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/barcode-print.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/barcode-print.tt index e2e7d0ebb4..9d96db2b4d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/barcode-print.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/barcode-print.tt @@ -1,7 +1,13 @@ [% USE raw %] [% USE Asset %] +[% PROCESS 'i18n.inc' %] [% SET footerjs = 1 %] -[% INCLUDE 'doc-head-open.inc' %]Barcode image generator › Cataloging › Koha +[% INCLUDE 'doc-head-open.inc' %] +[% FILTER collapse %] + [% t("Barcode image generator") | html %] › + [% t("Cataloging") | html %] › + [% t("Koha") | html %] +[% END %] [% INCLUDE 'doc-head-close.inc' %] [% Asset.css("css/humanmsg.css") | $raw %] [% FILTER collapse %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt index cae46b81a4..75dc6b41aa 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt @@ -1,9 +1,20 @@ [% USE raw %] [% USE Asset %] [% USE ItemTypes %] +[% PROCESS 'i18n.inc' %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] - [% IF batch_id %]Edit label batch ([% batch_id | html %])[% ELSE %]New label batch[% END %]› Batches › Label creator › Cataloging › Koha + [% FILTER collapse %] + [% IF ( batch_id ) %] + [% tx("Edit label batch {batch_id}", { batch_id = batch_id }) | html %] + [% ELSE %] + [% t("New label batch") | html %] + [% END %] › + [% t("Batches") | html %] › + [% t("Label creator") | html %] › + [% t("Cataloging") | html %] › + [% t("Koha") | html %] + [% END %] [% INCLUDE 'doc-head-close.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-layout.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-layout.tt index 6dbf2d8031..a73d2572a6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-layout.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-layout.tt @@ -1,4 +1,5 @@ [% USE raw %] +[% PROCESS 'i18n.inc' %] [% SET footerjs = 1 %] [%- BLOCK translate_label_types -%] [%- SWITCH type -%] @@ -10,7 +11,17 @@ [%- END -%] [%- END -%] [% INCLUDE 'doc-head-open.inc' %] - [% IF ( layout_id ) %]Edit label layout [% layout_id | html %] [% ELSE %] New label layout [% END %] › Layouts › Label creator › Cataloging › Koha + [% FILTER collapse %] + [% IF( layout_id ) %] + [% tx("Edit label layout {layout_id}", { layout_id = layout_id }) | html %] + [% ELSE %] + [% t("New label layout") | html %] + [% END %] › + [% t("Layouts") | html %] › + [% t("Label creator") | html %] › + [% t("Cataloging") | html %] › + [% t("Koha") | html %] + [% END %] [% INCLUDE 'doc-head-close.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-profile.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-profile.tt index 9be72df403..5299bd496b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-profile.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-profile.tt @@ -1,7 +1,18 @@ [% USE raw %] +[% PROCESS 'i18n.inc' %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] - [% IF ( profile_id ) %]Edit printer profile [% profile_id | html %] [% ELSE %] New printer profile [% END%] › Profiles › Label creator › Cataloging › Koha + [% FILTER collapse %] + [% IF( profile_id ) %] + [% tx("Edit printer profile {profile_id}", { profile_id = profile_id }) | html %] + [% ELSE %] + [% t("New printer profile") | html %] + [% END%] › + [% t("Profiles") | html %] › + [% t("Label creator") | html %] › + [% t("Cataloging") | html %] › + [% t("Koha") | html %] + [% END %] [% INCLUDE 'doc-head-close.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-range.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-range.tt index e15fe31d4f..21e5c17914 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-range.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-range.tt @@ -1,7 +1,13 @@ [% USE raw %] +[% PROCESS 'i18n.inc' %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] - Print barcode range › Label creator › Cataloging › Koha + [% FILTER collapse %] + [% t("Print barcode range") | html %] › + [% t("Label creator") | html %] › + [% t("Cataloging") | html %] › + [% t("Koha") | html %] + [% END %] [% INCLUDE 'doc-head-close.inc' %] [% INCLUDE 'greybox.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-template.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-template.tt index 5ee5b03c7d..40a751b573 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-template.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-template.tt @@ -1,7 +1,18 @@ [% USE raw %] +[% PROCESS 'i18n.inc' %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] - [% IF ( template_id ) %]Edit label template [% template_id | html %] [% ELSE %] New label template [% END %] › Templates › Label creator › Cataloging › Koha + [% FILTER collapse %] + [% IF( template_id ) %] + [% tx("Edit label template {template_id}", { template_id = template_id }) | html %] + [% ELSE %] + [% t("New label template") | html %] + [% END %] › + [% t("Templates") | html %] › + [% t("Label creator") | html %] › + [% t("Cataloging") | html %] › + [% t("Koha") | html %] + [% END %] [% INCLUDE 'doc-head-close.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-home.tt index 57a77ee233..7147e73dfc 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-home.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-home.tt @@ -1,8 +1,13 @@ [% USE raw %] [% USE Asset %] +[% PROCESS 'i18n.inc' %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] - Label creator › Cataloging › Koha + [% FILTER collapse %] + [% t("Label creator") | html %] › + [% t("Cataloging") | html %] › + [% t("Koha") | html %] + [% END %] [% INCLUDE 'doc-head-close.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-manage.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-manage.tt index 6819ec064b..d6175f4c46 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-manage.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-manage.tt @@ -5,17 +5,22 @@ [% BLOCK translate_label_element %] [%- SWITCH element -%] [%- CASE 'layout' -%][% t('layout') | html %] -[%- CASE 'Layouts' -%][% t('Layouts') | html %] +[%- CASE 'Layouts' -%][% t('Label layouts') | html %] [%- CASE 'template' -%][% t('template') | html %] -[%- CASE 'Templates' -%][% t('Templates') | html %] +[%- CASE 'Templates' -%][% t('Label templates') | html %] [%- CASE 'profile' -%][% t('profile') | html %] -[%- CASE 'Profiles' -%][% t('Profiles') | html %] +[%- CASE 'Profiles' -%][% t('Label profiles') | html %] [%- CASE 'batch' -%][% t('batch') | html %] -[%- CASE 'Batches' -%][% t('Batches') | html %] +[%- CASE 'Batches' -%][% t('Label batches') | html %] [%- END -%] [% END %] [% INCLUDE 'doc-head-open.inc' %] - [% PROCESS translate_label_element element=label_element_title %] › Label creator › Cataloging › Koha + [% FILTER collapse %] + [% PROCESS translate_label_element element=label_element_title %] › + [% t("Label creator") | html %] › + [% t("Cataloging") | html %] › + [% t("Koha") | html %] + [% END %] [% INCLUDE 'doc-head-close.inc' %] @@ -44,7 +49,15 @@
[% INCLUDE 'labels-toolbar.inc' %] -

Manage labels

+ [% IF ( label_element == 'layout' ) %] +

[% PROCESS translate_label_element element=label_element_title %]

+ [% ELSIF ( label_element == 'template' ) %] +

[% PROCESS translate_label_element element=label_element_title %]

+ [% ELSIF ( label_element == 'profile' ) %] +

[% PROCESS translate_label_element element=label_element_title %]

+ [% ELSIF ( label_element == 'batch' ) %] +

[% PROCESS translate_label_element element=label_element_title %]

+ [% END %] [% IF ( error ) %]
@@ -55,15 +68,6 @@
[% IF ( table_loop ) %]
- [% IF ( label_element == 'layout' ) %] -

Currently available layouts

- [% ELSIF ( label_element == 'template' ) %] -

Currently available templates

- [% ELSIF ( label_element == 'profile' ) %] -

Currently available profiles

- [% ELSIF ( label_element == 'batch' ) %] -

Currently available batches

- [% END %]
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-print.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-print.tt index 04d910c739..8f930f0fb6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-print.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-print.tt @@ -1,7 +1,12 @@ [% USE raw %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] - Label printing/exporting › Label creator › Tools › Koha + [% FILTER collapse %] + [% t("Label printing/exporting") | html %] › + [% t("Label creator") | html %] › + [% t("Tools") | html %] › + [% t("Koha") | html %] + [% END %] [% INCLUDE 'doc-head-close.inc' popup => 1 %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/result.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/result.tt index a8d3f3a4a3..e6b44617da 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/result.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/result.tt @@ -1,4 +1,5 @@ [% USE raw %] +[% PROCESS 'i18n.inc' %] [% BLOCK pagination %]