Bug 33921: Improve translation of title tags: Plugins and Point of sale

This patch updates plugin and point of sale 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:

- Administration ->
  - Manage plugins
  - Upload plugin

  * With 'useplugins' set to 0 in koha-conf.xml you can navigate
  directly to /cgi-bin/koha/plugins/plugins-home.pl to confirm that
  the "Plugins disabled" page is shown.

With EnablePointOfSale and UseCashRegisters enabled:

- Point of sale
  - Make a sale and print a receipt for the transaction
  - Transaction history for [register]
  - Cash summary for [library]

Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Owen Leonard 2023-06-06 15:24:02 +00:00 committed by Tomas Cohen Arazi
parent 7e87e39040
commit e433a92d51
No known key found for this signature in database
GPG Key ID: 0A272EA1B2F3C15F
7 changed files with 42 additions and 22 deletions

View File

@ -1,6 +1,11 @@
[% USE raw %]
[% PROCESS 'i18n.inc' %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Upload plugin &rsaquo; Plugins &rsaquo; Tools &rsaquo; Koha</title>
<title>[% FILTER collapse %]
[% t("Plugins disabled") | html %] &rsaquo;
[% t("Plugins") | html %] &rsaquo;
[% t("Koha") | html %]
[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
[% INCLUDE 'calendar.inc' %]
</head>
@ -24,7 +29,7 @@
<div class="container-fluid">
<div class="row">
<div class="col-sm-6 col-sm-offset-3 col-md-6 col-md-offset-3">
<h1>Plugins disabled!</h1>
<h1>Plugins disabled</h1>
<p>To enable Koha plugins, the flag enable_plugins must be set in the Koha configuration file</p>
</div>

View File

@ -1,17 +1,18 @@
[% USE raw %]
[% USE Asset %]
[% USE KohaDates %]
[% PROCESS 'i18n.inc' %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>
Plugins &rsaquo;
<title>[% FILTER collapse %]
[% t("Plugins") | html %] &rsaquo;
[% IF ( method == 'tool' ) %]
Tools
[% t("Tools") | html %]
[% ELSE %]
Administration
[% END %]
&rsaquo; Koha
</title>
[% t("Administration") | html %]
[% END %] &rsaquo;
[% t("Koha") | html %]
[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
</head>

View File

@ -1,6 +1,11 @@
[% USE raw %]
[% PROCESS 'i18n.inc' %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Upload plugin &rsaquo; Plugins &rsaquo; Tools &rsaquo; Koha </title>
<title>[% FILTER collapse %]
[% t("Upload plugin") | html %] &rsaquo;
[% t("Plugins") | html %] &rsaquo;
[% t("Koha") | html %]
[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
[% INCLUDE 'calendar.inc' %]
</head>
@ -16,7 +21,7 @@
<a href="/cgi-bin/koha/plugins/plugins-home.pl">Plugins</a>
[% END %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<wrap>Upload plugins</wrap>
<span>Upload plugin</span>
[% END %]
[% END #/ WRAPPER breadcrumbs %]
[% END #/ WRAPPER sub-header.inc %]
@ -25,7 +30,7 @@
<div class="row">
<div class="col-sm-6 col-sm-offset-3 col-md-6 col-md-offset-3">
<h1>Upload Koha plugin</h1>
<h1>Upload plugin</h1>
[% IF ( ERRORS ) %]
<div class="dialog alert">
[% FOREACH ERROR IN ERRORS %]

View File

@ -5,10 +5,14 @@
[% USE Price %]
[% USE TablesSettings %]
[% USE Registers %]
[% PROCESS 'i18n.inc' %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
[% SET registers = Registers.all( filters => { current_branch => 1 } ) %]
<title>Payments &rsaquo; Koha</title>
<title>[% FILTER collapse %]
[% t("Point of sale") | html %] &rsaquo;
[% t("Koha") | html %]
[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
</head>

View File

@ -1,10 +1,13 @@
[% USE raw %]
[% USE Asset %]
[% USE Koha %]
[% PROCESS 'i18n.inc' %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Print receipt</title>
<title>[% FILTER collapse %]
[% t("Print receipt") | html %]
[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

View File

@ -4,10 +4,14 @@
[% USE KohaDates %]
[% USE AuthorisedValues %]
[% USE Price %]
[% PROCESS 'i18n.inc' %]
[% SET footerjs = 1 %]
[% PROCESS 'accounts.inc' %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Cashup &rsaquo; Koha</title>
<title>[% FILTER collapse %]
[% tx("Transaction history for {register}", { register = register.name }) | html %] &rsaquo;
[% t("Koha") | html %]
[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
[% Asset.css("lib/jquery/plugins/rowGroup/stylesheets/rowGroup.dataTables.min.css") | $raw %]
</head>
@ -19,9 +23,6 @@
[% WRAPPER 'sub-header.inc' %]
[% WRAPPER breadcrumbs %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/pos/pay.pl">Cash management</a>
[% END %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Transaction history for [% register.name | html %]</span>
[% END %]

View File

@ -3,9 +3,13 @@
[% USE Koha %]
[% USE KohaDates %]
[% USE Price %]
[% PROCESS 'i18n.inc' %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Cashup &rsaquo; Koha</title>
<title>[% FILTER collapse %]
[% tx("Cash summary for {library}", { library = library.branchname }) | html %] &rsaquo;
[% t("Koha") | html %]
[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
</head>
@ -16,9 +20,6 @@
[% WRAPPER 'sub-header.inc' %]
[% WRAPPER breadcrumbs %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/pos/pay.pl">Cash management</a>
[% END %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Cash summary for [% library.branchname | html %]</span>
[% END %]