From 1ff0181227002e8dcea0a3be0176a0cfc8c3fa2b Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 6 Oct 2023 17:16:20 +0000 Subject: [PATCH] Bug 33928: Improve translation of title tags: Various This patch updates various templates so that title tags can be more easily translated. Some templates have been updated for consistency as well: Harmonizing page title, breaddrumb navigation, and page headers. To test, apply the patch and confirm that the following pages have the correct title tags: - Staff interface -> Log in - Staff interface home page - Error page (e.g. for a missing page 404 error) - About page Signed-off-by: Lucas Gass Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- .../intranet-tmpl/prog/en/modules/about.tt | 6 ++- .../intranet-tmpl/prog/en/modules/auth.tt | 41 ++++++++++++++----- .../prog/en/modules/errors/errorpage.tt | 10 +++-- .../prog/en/modules/intranet-main.tt | 5 ++- 4 files changed, 46 insertions(+), 16 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt index da6183cbbd..df6cca50a4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt @@ -3,9 +3,13 @@ [% USE Koha %] [% USE Asset %] [% USE KohaDates %] +[% PROCESS 'i18n.inc' %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] -About Koha › Koha +[% FILTER collapse %] + [% t("About Koha") | html %] › + [% t("Koha") | html %] +[% END %] [% INCLUDE 'doc-head-close.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt index e87cb438c4..e7b6e0ac5d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt @@ -6,19 +6,38 @@ [% USE Categories %] [% USE Registers %] [% USE AuthClient %] +[% PROCESS 'i18n.inc' %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] - - [% IF TwoFA_prompt %]Two-factor authentication[% END %] - [% IF TwoFA_setup %]Two-factor authentication setup[% END %] - [% IF ( loginprompt ) %]Log in to Koha[% END %] - [% IF too_many_login_attempts %]This account has been locked. - [% ELSIF invalid_username_or_password %]Invalid username or password[% END %] - [% IF ( different_ip ) %]IP address change[% END %] - [% IF ( timed_out ) %]Session timed out[% END %] - [% IF ( nopermission ) %]Access denied[% END %] - [% IF ( auth_error ) %]Error authenticating with external provider[% END %] › Koha - +[% FILTER collapse %] + [% IF TwoFA_prompt %] + [% t("Two-factor authentication") | html %] › + [% END %] + [% IF TwoFA_setup %] + [% t("Two-factor authentication setup") | html %] › + [% END %] + [% IF too_many_login_attempts %] + [% t("This account has been locked.") | html %] › + [% ELSIF invalid_username_or_password %] + [% t("Invalid username or password") | html %] › + [% END %] + [% IF ( different_ip ) %] + [% t("IP address change") | html %] › + [% END %] + [% IF ( timed_out ) %] + [% t("Session timed out") | html %] › + [% END %] + [% IF ( nopermission ) %] + [% t("Access denied") | html %] › + [% END %] + [% IF ( auth_error ) %] + [% t("Error authenticating with external provider") | html %] › + [% END %] + [% IF ( loginprompt ) %] + [% t("Log in to Koha") | html %] › + [% END %] + [% t("Koha") | html %] +[% END %] [% INCLUDE 'doc-head-close.inc' %] [% PROCESS 'auth-two-factor.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/errors/errorpage.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/errors/errorpage.tt index 0d5e45b90e..2d84003291 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/errors/errorpage.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/errors/errorpage.tt @@ -1,6 +1,10 @@ [% USE raw %] +[% PROCESS 'i18n.inc' %] [% INCLUDE 'doc-head-open.inc' %] -Error [% errno | html %] › Koha +[% FILTER collapse %] + [% tx("Error {error_number}", {error_number = errno }) | html %] › + [% t("Koha") | html %] +[% END %] [% INCLUDE 'doc-head-close.inc' %] @@ -13,7 +17,7 @@ [% WRAPPER breadcrumbs %] [% WRAPPER breadcrumb_item %] - Error [% errno | html %] + [% tx("Error {error_number}", {error_number = errno }) | html %] [% END %] [% END #/ WRAPPER breadcrumbs %] @@ -24,7 +28,7 @@

An error has occurred!

-

Error [% errno | html %]

+

[% tx("Error {error_number}", {error_number = errno }) | html %]

This message may have been caused by any of the following reasons:

  • You made use of an external link to an item that is no longer available
  • diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt index 85feef5609..c066fe3ace 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt @@ -3,9 +3,12 @@ [% USE Koha %] [% USE Branches %] [% USE KohaDates %] +[% PROCESS 'i18n.inc' %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] -Koha staff interface +[% FILTER collapse %] + [% t("Koha staff interface") | html %] +[% END %] [% Asset.css("css/mainpage.css") | $raw %] [% INCLUDE 'doc-head-close.inc' %] -- 2.39.5