From 01d014234508bd8b509f2c8e045f3375091e9d57 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 14 Sep 2023 16:33:48 +0000 Subject: [PATCH] Bug 34796: Improve translation of title tags: Tools - Additional tools This patch modifies templates for tools under the "Additional tools" heading so that title tags can be more easily translated. The patch also makes some modifications to titles, breadcrumb navigation, and page headers in order to make them more consistent with each other and with other similar pages. To test, apply the patch and go to Tools. Test each page below and each variation of the page to confirm that titles, breadcrumbs, and page headers look correct. - Calendar - CSV profiles - Main page - New CSV profile - Modify CSV profile - Confirm deletion of CSV profile - Log viewer - Search results - News, HTML customizations, and pages - Create and modify each content type: news, pages, HTML customizations - Task scheduler - Quote editor - Main page - New quote - Edit quote - Import quotes - Uploads - Main page - Upload file - Delete file - Search for file - Access files - OPAC problem reports (with OPACReportProblem enabled) --- .../prog/en/modules/tools/access_files.tt | 6 +- .../en/modules/tools/additional-contents.tt | 93 ++++++++++++------- .../prog/en/modules/tools/csv-profiles.tt | 39 +++++--- .../prog/en/modules/tools/holidays.tt | 11 ++- .../prog/en/modules/tools/page.tt | 11 ++- .../prog/en/modules/tools/problem-reports.tt | 7 +- .../prog/en/modules/tools/quotes-upload.tt | 8 +- .../prog/en/modules/tools/quotes.tt | 20 +++- .../prog/en/modules/tools/scheduler.tt | 11 ++- .../prog/en/modules/tools/upload.tt | 48 ++++++---- .../prog/en/modules/tools/viewlog.tt | 19 ++-- 11 files changed, 187 insertions(+), 86 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/access_files.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/access_files.tt index 886d8a4ee3..5d4bfb72d9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/access_files.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/access_files.tt @@ -1,9 +1,13 @@ [% USE raw %] [% USE Asset %] [% USE KohaDates %] +[% PROCESS 'i18n.inc' %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] -Access files +[% FILTER collapse %] + [% t("Access files") | html %] › + [% t("Koha") | html %] +[% END %] [% INCLUDE 'doc-head-close.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt index dbf97f69f0..79db09ef31 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt @@ -3,9 +3,46 @@ [% USE Koha %] [% USE KohaDates %] [% USE Branches %] +[% PROCESS 'i18n.inc' %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] -Additional contents › Tools › Koha +[% BLOCK page_heading %] + [% IF additional_content.idnew %] + [% IF category == 'news' %] + [% t("Modify news item") | html %] + [% ELSIF category == 'pages' %] + [% t("Modify page") | html %] + [% ELSE %] + [% t("Modify HTML customization") | html %] + [% END %] + [% ELSE %] + [% IF category == 'news' %] + [% t("New news item") | html %] + [% ELSIF category == 'pages' %] + [% t("New page") | html %] + [% ELSE %] + [% t("New HTML customization") | html %] + [% END %] + [% END %] +[% END %] +[% BLOCK page_section %] + [% IF category == 'news' %] + [% t("News") | html %] + [% ELSIF category == 'pages' %] + [% t("Pages") | html %] + [% ELSE %] + [% t("HTML customizations") | html %] + [% END %] +[% END %] +[% FILTER collapse %] + [% IF op == 'add_form' %] + [% PROCESS page_heading %] › + [% END %] + [% PROCESS page_section %] › + [% t("Additional content") | html %] › + [% t("Tools") | html %] › + [% t("Koha") | html %] +[% END %] [% INCLUDE 'doc-head-close.inc' %] [% IF ( wysiwyg ) %] [% SET editmode = "wysiwyg" %] @@ -24,10 +61,10 @@ .syspref-link::before { content: " | "; } - .customisation-link::before { + .customization-link::before { content: " | "; } - .customisation-link:first-child::before { + .customization-link:first-child::before { content: none; } label[for^="title_"], @@ -47,7 +84,9 @@ [% WRAPPER breadcrumb_item %] Tools [% END %] - + [% WRAPPER breadcrumb_item %] + Additional content + [% END %] [% IF op == 'add_form' %] [% WRAPPER breadcrumb_item %] [% IF category == 'news' %] @@ -58,29 +97,12 @@ HTML customizations [% END %] [% END %] - [% WRAPPER breadcrumb_item bc_active= 1 %] - [% IF additional_content.idnew %] - Modify additional content - [% ELSE %] - Add additional content - [% END %] - [% IF category == 'news' %] - (News) - [% ELSIF category == 'pages' %] - (Pages) - [% ELSE %] - (HTML customizations) - [% END %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + [% PROCESS page_heading %] [% END %] [% ELSE %] [% WRAPPER breadcrumb_item bc_active= 1 %] - [% IF category == 'news' %] - News - [% ELSIF category == 'pages' %] - Pages - [% ELSE %] - HTML customizations - [% END %] + [% PROCESS page_section %] [% END %] [% END %] [% END #/ WRAPPER breadcrumbs %] @@ -175,11 +197,7 @@ [% BLOCK add_form %] - [% IF additional_content %] -

Modify an additional content

- [% ELSE %] -

New additional content ([% IF category == 'news' %]News[% ELSIF category == 'pages' %]Pages[% ELSE %]HTML customizations[% END %])

- [% END %] +

[% PROCESS page_heading %]

@@ -327,12 +345,21 @@
-

Additional contents ([% IF category == 'news' %]News[% ELSIF category == 'pages' %]Pages[% ELSE %]HTML customizations[% END %])

+

+ Additional content: + [% IF category == 'news' %] + [% t("News") | html %] + [% ELSIF category == 'pages' %] + [% t("Pages") | html %] + [% ELSE %] + [% t("HTML customizations") | html %] + [% END %] +

See - News - HTML customizations - Pages + News + HTML customizations + Pages [% IF ( CAN_user_parameters_manage_sysprefs ) %] OPACUserJS OPACUserCSS diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/csv-profiles.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/csv-profiles.tt index 6b604e77f2..b14ca1ec8e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/csv-profiles.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/csv-profiles.tt @@ -1,17 +1,22 @@ [% USE raw %] [% USE Asset %] +[% PROCESS 'i18n.inc' %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] - +<title>[% FILTER collapse %] [% IF op == 'add_form' %] [% IF csv_profile %] - Modify a CSV profile › + [% tx("Modify CSV profile '{csv_profile_name}'", {csv_profile_name = csv_profile.profile }) | html %] › [% ELSE %] - New CSV profile › + [% t("New CSV profile") | html %] › [% END %] + [% ELSIF ( op == 'delete_confirm' ) %] + [% tx("Confirm deletion of CSV profile '{csv_profile_name}'", {csv_profile_name = csv_profile.profile }) | html %] › [% END %] - CSV export profiles › Tools › Koha - + [% t("CSV profiles") | html %] › + [% t("Tools") | html %] › + [% t("Koha") | html %] +[% END %] [% INCLUDE 'doc-head-close.inc' %] @@ -25,23 +30,29 @@ [% WRAPPER breadcrumb_item %] Tools [% END %] - [% IF op == 'add_form' %] + [% IF op == 'add_form' || op == 'delete_confirm' %] [% WRAPPER breadcrumb_item %] CSV profiles [% END %] + [% END %] + [% IF op == 'add_form' %] [% IF csv_profile %] [% WRAPPER breadcrumb_item bc_active= 1 %] - Modify a CSV profile + [% tx("Modify CSV profile '{csv_profile_name}'", {csv_profile_name = csv_profile.profile }) | html %] [% END %] [% ELSE %] [% WRAPPER breadcrumb_item bc_active= 1 %] New CSV profile [% END %] [% END %] + [% ELSIF ( op == 'delete_confirm') %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + [% tx("Confirm deletion of CSV profile '{csv_profile_name}'", {csv_profile_name = csv_profile.profile }) | html %] + [% END %] [% ELSE %] - [% WRAPPER breadcrumb_item bc_active= 1 %] - CSV profiles - [% END %] + [% WRAPPER breadcrumb_item bc_active= 1 %] + CSV profiles + [% END %] [% END %] [% END #/ WRAPPER breadcrumbs %] [% END #/ WRAPPER sub-header.inc %] @@ -131,7 +142,7 @@ [% IF op == 'add_form' %] [% IF csv_profile %] -

Modify a CSV profile

+

[% tx("Modify CSV profile '{csv_profile_name}'", {csv_profile_name = csv_profile.profile }) | html %]

[% ELSE %]

New CSV profile

[% END %] @@ -263,14 +274,14 @@ [% IF op == 'delete_confirm' %]
[% IF csv_profile %] -

Delete CSV Profile "[% csv_profile.profile | html %]?"

+

[% tx("Delete CSV profile '{csv_profile_name}'?", {csv_profile_name = csv_profile.profile }) | html %]

- +
- +
[% ELSE %] This CSV Profile does not exist. diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/holidays.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/holidays.tt index f03db0c0ff..99eb3ab438 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/holidays.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/holidays.tt @@ -2,9 +2,14 @@ [% USE Asset %] [% USE KohaDates %] [% USE Branches %] +[% PROCESS 'i18n.inc' %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] -[% Branches.GetName( branch ) | html %] calendar › Tools › Koha +[% FILTER collapse %] + [% tx("{library} calendar", { library = Branches.GetName( branch ) }) | html %] › + [% t("Tools") | html %] › + [% t("Koha") | html %] +[% END %] [% INCLUDE 'doc-head-close.inc' %] [% Asset.css("css/calendar.css") | $raw %] @@ -19,7 +24,7 @@ Tools [% END %] [% WRAPPER breadcrumb_item bc_active= 1 %] - [% Branches.GetName( branch ) | html %] calendar + [% tx("{library} calendar", { library = Branches.GetName( branch ) }) | html %] [% END %] [% END #/ WRAPPER breadcrumbs %] [% END #/ WRAPPER sub-header.inc %] @@ -29,7 +34,7 @@
-

[% Branches.GetName( branch ) | html %] calendar

+

[% tx("{library} calendar", { library = Branches.GetName( branch ) }) | html %]

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/page.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/page.tt index 634ce415a4..4efcca1f52 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/page.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/page.tt @@ -1,8 +1,17 @@ [% USE raw %] [% USE Asset %] +[% PROCESS 'i18n.inc' %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] -[% IF page %][% page.title | html %][% ELSE %]Page error[% END %] › Tools › Koha +[% FILTER collapse %] + [% IF ( page ) %] + [% page.title | html %] + [% ELSE %] + [% t("Page error") | html %] + [% END %] › + [% t("Tools") | html %] › + [% t("Koha") | html %] +[% END %] [% INCLUDE 'doc-head-close.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/problem-reports.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/problem-reports.tt index 5d6da9b627..ec97040298 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/problem-reports.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/problem-reports.tt @@ -2,9 +2,14 @@ [% USE Asset %] [% USE Koha %] [% USE KohaDates %] +[% PROCESS 'i18n.inc' %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] -OPAC problem reports › Administration › Koha +[% FILTER collapse %] + [% t("OPAC problem reports") | html %] › + [% t("Tools") | html %] › + [% t("Koha") | html %] +[% END %] [% INCLUDE 'doc-head-close.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes-upload.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes-upload.tt index 583de621d6..9f0ec860c2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes-upload.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes-upload.tt @@ -1,8 +1,14 @@ [% USE raw %] [% USE Asset %] +[% PROCESS 'i18n.inc' %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] - Quote uploader › Tools › Koha + [% FILTER collapse %] + [% t("Quote uploader") | html %] › + [% t("Quote editor") | html %] › + [% t("Tools") | html %] › + [% t("Koha") | html %] + [% END %] [% INCLUDE 'doc-head-close.inc' %] [% Asset.css("css/uploader.css") | $raw %]