From 884621825cece9bb683d164d25a5afbc09b572c8 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 12 Jun 2023 17:21:02 +0000 Subject: [PATCH] Bug 33912: Improve translation of title tags: Cataloging This patch updates cataloging templates, including cataloging "value builder" plugins, so that title tags can be more easily translated. To test, apply the patch and confirm that the following cataloging pages have the correct title tags: - Cataloging home page - Catalog concerns - Cataloging search results - Select two results -> - Merge selected - Basic MARC editor (Add, edit) - Replace via Z39.50 - Advanced MARC editor - Item editor - Bibliographic detail page -> - Edit -> - Attach item - Edit -> - Link to host record (with EasyAnalytics enabled) - Authorities -> New from Z39.50/SRU The patch updates 81 different cataloging plugins. It's not necessary to configure your MARC framework to use any particular plugin. The plugins can be loaded in their own tab for the purpose of testing just the title. I've made a list of direct links here: https://gitlab.com/-/snippets/2555254 Signed-off-by: Phil Ringnalda Signed-off-by: Jonathan Druart Signed-off-by: Tomas Cohen Arazi --- .../intranet-tmpl/prog/en/includes/cateditor-ui.inc | 2 +- .../prog/en/modules/cataloguing/addbiblio.tt | 11 ++++++++++- .../prog/en/modules/cataloguing/addbooks.tt | 11 ++++++++++- .../prog/en/modules/cataloguing/additem.tt | 12 +++++++++++- .../prog/en/modules/cataloguing/cataloging-home.tt | 6 +++++- .../prog/en/modules/cataloguing/concerns.tt | 7 ++++++- .../prog/en/modules/cataloguing/editor.tt | 7 ++++++- .../prog/en/modules/cataloguing/linkitem.tt | 7 ++++++- .../prog/en/modules/cataloguing/merge.tt | 8 ++++++-- .../prog/en/modules/cataloguing/moveitem.tt | 7 ++++++- .../en/modules/cataloguing/value_builder/EXAMPLE.tt | 8 +++++++- .../modules/cataloguing/value_builder/cn_browser.tt | 8 +++++++- .../cataloguing/value_builder/marc21_field_006.tt | 7 ++++++- .../cataloguing/value_builder/marc21_field_007.tt | 8 +++++++- .../cataloguing/value_builder/marc21_field_008.tt | 7 ++++++- .../value_builder/marc21_field_008_authorities.tt | 8 +++++++- .../marc21_field_008_classifications.tt | 8 +++++++- .../cataloguing/value_builder/marc21_leader.tt | 10 ++++++++-- .../value_builder/marc21_leader_authorities.tt | 8 +++++++- .../value_builder/marc21_linking_section.tt | 8 +++++++- .../cataloguing/value_builder/unimarc_field_100.tt | 6 +++++- .../value_builder/unimarc_field_100_authorities.tt | 6 +++++- .../cataloguing/value_builder/unimarc_field_105.tt | 6 +++++- .../cataloguing/value_builder/unimarc_field_106.tt | 8 +++++++- .../cataloguing/value_builder/unimarc_field_110.tt | 8 +++++++- .../cataloguing/value_builder/unimarc_field_115a.tt | 8 +++++++- .../cataloguing/value_builder/unimarc_field_115b.tt | 8 +++++++- .../cataloguing/value_builder/unimarc_field_116.tt | 8 +++++++- .../cataloguing/value_builder/unimarc_field_117.tt | 8 +++++++- .../cataloguing/value_builder/unimarc_field_120.tt | 8 +++++++- .../cataloguing/value_builder/unimarc_field_121a.tt | 8 +++++++- .../cataloguing/value_builder/unimarc_field_121b.tt | 8 +++++++- .../cataloguing/value_builder/unimarc_field_122.tt | 8 +++++++- .../cataloguing/value_builder/unimarc_field_123a.tt | 8 +++++++- .../cataloguing/value_builder/unimarc_field_123d.tt | 8 +++++++- .../cataloguing/value_builder/unimarc_field_123e.tt | 8 +++++++- .../cataloguing/value_builder/unimarc_field_123f.tt | 8 +++++++- .../cataloguing/value_builder/unimarc_field_123g.tt | 8 +++++++- .../value_builder/unimarc_field_123i_j.tt | 8 +++++++- .../cataloguing/value_builder/unimarc_field_124a.tt | 8 +++++++- .../cataloguing/value_builder/unimarc_field_124b.tt | 8 +++++++- .../cataloguing/value_builder/unimarc_field_124c.tt | 8 +++++++- .../cataloguing/value_builder/unimarc_field_124d.tt | 8 +++++++- .../cataloguing/value_builder/unimarc_field_124e.tt | 8 +++++++- .../cataloguing/value_builder/unimarc_field_124f.tt | 8 +++++++- .../cataloguing/value_builder/unimarc_field_124g.tt | 8 +++++++- .../cataloguing/value_builder/unimarc_field_125a.tt | 8 +++++++- .../cataloguing/value_builder/unimarc_field_125b.tt | 8 +++++++- .../cataloguing/value_builder/unimarc_field_126a.tt | 8 +++++++- .../cataloguing/value_builder/unimarc_field_126b.tt | 8 +++++++- .../cataloguing/value_builder/unimarc_field_127.tt | 8 +++++++- .../cataloguing/value_builder/unimarc_field_128a.tt | 8 +++++++- .../cataloguing/value_builder/unimarc_field_128b.tt | 8 +++++++- .../cataloguing/value_builder/unimarc_field_128c.tt | 8 +++++++- .../cataloguing/value_builder/unimarc_field_130.tt | 8 +++++++- .../cataloguing/value_builder/unimarc_field_135a.tt | 6 +++++- .../cataloguing/value_builder/unimarc_field_140.tt | 8 +++++++- .../cataloguing/value_builder/unimarc_field_141.tt | 8 +++++++- .../cataloguing/value_builder/unimarc_field_146a.tt | 8 +++++++- .../cataloguing/value_builder/unimarc_field_146b.tt | 8 +++++++- .../cataloguing/value_builder/unimarc_field_146c.tt | 8 +++++++- .../cataloguing/value_builder/unimarc_field_146d.tt | 8 +++++++- .../cataloguing/value_builder/unimarc_field_146e.tt | 8 +++++++- .../cataloguing/value_builder/unimarc_field_146f.tt | 8 +++++++- .../cataloguing/value_builder/unimarc_field_146h.tt | 8 +++++++- .../cataloguing/value_builder/unimarc_field_146i.tt | 8 +++++++- .../cataloguing/value_builder/unimarc_field_181-2.tt | 8 +++++++- .../cataloguing/value_builder/unimarc_field_181a.tt | 8 +++++++- .../cataloguing/value_builder/unimarc_field_181b.tt | 8 +++++++- .../cataloguing/value_builder/unimarc_field_181c.tt | 8 +++++++- .../cataloguing/value_builder/unimarc_field_182-2.tt | 8 +++++++- .../cataloguing/value_builder/unimarc_field_182a.tt | 8 +++++++- .../cataloguing/value_builder/unimarc_field_182c.tt | 8 +++++++- .../cataloguing/value_builder/unimarc_field_183-2.tt | 8 +++++++- .../cataloguing/value_builder/unimarc_field_183a.tt | 8 +++++++- .../cataloguing/value_builder/unimarc_field_210c.tt | 7 ++++++- .../value_builder/unimarc_field_210c_bis.tt | 8 +++++++- .../cataloguing/value_builder/unimarc_field_225a.tt | 6 +++++- .../value_builder/unimarc_field_225a_bis.tt | 8 +++++++- .../cataloguing/value_builder/unimarc_field_283-2.tt | 8 +++++++- .../cataloguing/value_builder/unimarc_field_283a.tt | 8 +++++++- .../cataloguing/value_builder/unimarc_field_325h.tt | 10 +++++++--- .../cataloguing/value_builder/unimarc_field_325j.tt | 8 +++++++- .../cataloguing/value_builder/unimarc_field_4XX.tt | 9 +++++++-- .../cataloguing/value_builder/unimarc_field_686a.tt | 8 +++++++- .../cataloguing/value_builder/unimarc_field_700-4.tt | 8 +++++++- .../cataloguing/value_builder/unimarc_leader.tt | 8 +++++++- .../value_builder/unimarc_leader_authorities.tt | 8 +++++++- .../prog/en/modules/cataloguing/z3950_auth_search.tt | 12 ++++++++---- .../prog/en/modules/cataloguing/z3950_search.tt | 8 ++++++-- 90 files changed, 615 insertions(+), 99 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc index 13322d92e1..4e26c58aac 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc @@ -367,7 +367,7 @@ require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr $.each( backend.links || [], function( i, link ) { $('#title').append(' (' + link.title + ')' ); } ); - $( 'title', document.head ).html( _("Koha › Cataloging › ") + backend.titleForRecord.replace( '{ID}', parts[1] ) ); + $( 'title', document.head ).html( backend.titleForRecord.replace( '{ID}', parts[1] ) + " › " + _("Cataloging") + " › " + _("Koha") ); $('#save-record span').text( backends[ state.saveBackend ].saveLabel ); } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt index 438445fdde..787d19cb56 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt @@ -2,8 +2,17 @@ [% USE Asset %] [% USE Koha %] [% USE HtmlTags %] +[% PROCESS 'i18n.inc' %] [% INCLUDE 'doc-head-open.inc' %] -[% IF ( biblionumber ) %]Editing [% title | html %] (Record number [% biblionumber | html %])[% ELSE %]Add MARC record[% END %] › Cataloging › Koha +[% FILTER collapse %] + [% IF( biblionumber ) %] + [% tx("Editing {title} (Record number {biblionumber})", { title = title, biblionumber = biblionumber }) | html %] + [% ELSE %] + [% t("Add MARC record") | html %] + [% END %] › + [% t("Cataloging") | html %] › + [% t("Koha") | html %] +[% END %] [% INCLUDE 'doc-head-close.inc' %] [% INCLUDE 'calendar.inc' %] [% Asset.js("lib/hc-sticky.js") | $raw %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt index f720449c7f..7ad2ee5c58 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt @@ -2,9 +2,18 @@ [% USE Koha %] [% USE KohaDates %] [% USE TablesSettings %] +[% PROCESS 'i18n.inc' %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] -Cataloging [% IF ( total || breeding_loop ) %] › Search results [% ELSIF ( query ) %] › No results found [% END %] › Koha +[% FILTER collapse %] + [% IF ( total || breeding_loop ) %] + [% t("Search results") | html %] + [% ELSIF ( query ) %] + [% t("No results found") | html %] + [% END %] › + [% t("Cataloging") | html %] › + [% t("Koha") | html %] +[% END %] [% INCLUDE 'doc-head-close.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt index 950c68572b..9326db28b6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt @@ -7,7 +7,17 @@ [% USE TablesSettings %] [% PROCESS 'i18n.inc' %] [% INCLUDE 'doc-head-open.inc' %] -Items › [% biblio.title | html %] [% IF ( biblio.author ) %] by [% biblio.author | html %][% END %] (Record #[% biblio.biblionumber | html %]) › Cataloging › Koha +[% FILTER collapse %] + [% t("Items") | html %] › + [% IF ( biblio.author ) %] + [% tx("{title} by {author}", { title = biblio.title, author = biblio.author }) | html %] + [% ELSE %] + [% biblio.title | html %] + [% END %] + [% tx("(Record #{biblionumber})", { biblionumber = biblio.biblionumber }) | html %] › + [% t("Cataloging") | html %] › + [% t("Koha") | html %] +[% END %] [% INCLUDE 'doc-head-close.inc' %] [% Asset.css("css/addbiblio.css") | $raw %] [% INCLUDE 'datatables.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/cataloging-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/cataloging-home.tt index ba47129601..9ba30c5aa1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/cataloging-home.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/cataloging-home.tt @@ -1,9 +1,13 @@ [% USE raw %] [% USE Koha %] [% USE Branches %] +[% PROCESS 'i18n.inc' %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] -Cataloging › Koha +[% FILTER collapse %] + [% t("Cataloging") | html %] › + [% t("Koha") | html %] +[% END %] [% INCLUDE 'doc-head-close.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/concerns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/concerns.tt index d78be16f0d..2a9336cc29 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/concerns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/concerns.tt @@ -1,9 +1,14 @@ [% USE raw %] [% USE Asset %] +[% PROCESS 'i18n.inc' %] [% SET footerjs = 1 %] [% USE TablesSettings %] [% INCLUDE 'doc-head-open.inc' %] -Catalog concerns › Cataloging › Koha +[% FILTER collapse %] + [% t("Catalog concerns") | html %] › + [% t("Cataloging") | html %] › + [% t("Koha") | html %] +[% END %] [% INCLUDE 'doc-head-close.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/editor.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/editor.tt index 29df5435ea..1824673fc2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/editor.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/editor.tt @@ -1,7 +1,12 @@ [% USE raw %] [% USE Asset %] +[% PROCESS 'i18n.inc' %] [% INCLUDE 'doc-head-open.inc' %] -Editor › Cataloging › Koha +[% FILTER collapse %] + [% t("Editor") | html %] › + [% t("Cataloging") | html %] › + [% t("Koha") | html %] +[% END %] [% INCLUDE 'doc-head-close.inc' %] [% Asset.css("css/cateditor.css") | $raw %] [% Asset.css("lib/codemirror/codemirror.min.css") | $raw %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/linkitem.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/linkitem.tt index b74519b122..03e7f2b4b5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/linkitem.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/linkitem.tt @@ -1,7 +1,12 @@ [% USE raw %] [% USE HtmlTags %] +[% PROCESS 'i18n.inc' %] [% INCLUDE 'doc-head-open.inc' %] -Link to host record › Cataloging › Koha +[% FILTER collapse %] + [% t("Link to host record") | html %] › + [% t("Cataloging") | html %] › + [% t("Koha") | html %] +[% END %] [% INCLUDE 'doc-head-close.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/merge.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/merge.tt index 1dce7fe145..9ed117f7c6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/merge.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/merge.tt @@ -1,10 +1,14 @@ [% USE raw %] [% USE Asset %] +[% PROCESS 'i18n.inc' %] [% SET footerjs = 1 %] [% PROCESS 'merge-record.inc' %] - [% INCLUDE 'doc-head-open.inc' %] -Merging records › Cataloging › Koha +[% FILTER collapse %] + [% t("Merging records") | html %] › + [% t("Cataloging") | html %] › + [% t("Koha") | html %] +[% END %] [% INCLUDE 'doc-head-close.inc' %]