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 <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Owen Leonard 2023-10-06 17:16:20 +00:00 committed by Tomas Cohen Arazi
parent 81b062ffcb
commit 1ff0181227
No known key found for this signature in database
GPG Key ID: 0A272EA1B2F3C15F
4 changed files with 46 additions and 16 deletions

View File

@ -3,9 +3,13 @@
[% USE Koha %]
[% USE Asset %]
[% USE KohaDates %]
[% PROCESS 'i18n.inc' %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>About Koha &rsaquo; Koha</title>
<title>[% FILTER collapse %]
[% t("About Koha") | html %] &rsaquo;
[% t("Koha") | html %]
[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
</head>
<body id="about_about" class="about">

View File

@ -6,19 +6,38 @@
[% USE Categories %]
[% USE Registers %]
[% USE AuthClient %]
[% PROCESS 'i18n.inc' %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>
[% 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 %] &rsaquo; Koha
</title>
<title>[% FILTER collapse %]
[% IF TwoFA_prompt %]
[% t("Two-factor authentication") | html %] &rsaquo;
[% END %]
[% IF TwoFA_setup %]
[% t("Two-factor authentication setup") | html %] &rsaquo;
[% END %]
[% IF too_many_login_attempts %]
[% t("This account has been locked.") | html %] &rsaquo;
[% ELSIF invalid_username_or_password %]
[% t("Invalid username or password") | html %] &rsaquo;
[% END %]
[% IF ( different_ip ) %]
[% t("IP address change") | html %] &rsaquo;
[% END %]
[% IF ( timed_out ) %]
[% t("Session timed out") | html %] &rsaquo;
[% END %]
[% IF ( nopermission ) %]
[% t("Access denied") | html %] &rsaquo;
[% END %]
[% IF ( auth_error ) %]
[% t("Error authenticating with external provider") | html %] &rsaquo;
[% END %]
[% IF ( loginprompt ) %]
[% t("Log in to Koha") | html %] &rsaquo;
[% END %]
[% t("Koha") | html %]
[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
[% PROCESS 'auth-two-factor.inc' %]
</head>

View File

@ -1,6 +1,10 @@
[% USE raw %]
[% PROCESS 'i18n.inc' %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Error [% errno | html %] &rsaquo; Koha</title>
<title>[% FILTER collapse %]
[% tx("Error {error_number}", {error_number = errno }) | html %] &rsaquo;
[% t("Koha") | html %]
[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
</head>
<body id="err_[% errno | html %]" class="err">
@ -13,7 +17,7 @@
[% WRAPPER breadcrumbs %]
[% WRAPPER breadcrumb_item %]
<a href="#" aria-current="page">
Error [% errno | html %]
[% tx("Error {error_number}", {error_number = errno }) | html %]
</a>
[% END %]
[% END #/ WRAPPER breadcrumbs %]
@ -24,7 +28,7 @@
<div class="col-md-8 col-md-offset-2">
<h1>An error has occurred!</h1>
<h2><em>Error [% errno | html %]</em></h2>
<h2><em>[% tx("Error {error_number}", {error_number = errno }) | html %]</em></h2>
<h3>This message may have been caused by any of the following reasons:</h3>
<ul style="padding-bottom: 0.5em;">
<li>You made use of an external link to an item that is no longer available</li>

View File

@ -3,9 +3,12 @@
[% USE Koha %]
[% USE Branches %]
[% USE KohaDates %]
[% PROCESS 'i18n.inc' %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha staff interface</title>
<title>[% FILTER collapse %]
[% t("Koha staff interface") | html %]
[% END %]</title>
[% Asset.css("css/mainpage.css") | $raw %]
[% INCLUDE 'doc-head-close.inc' %]
</head>