From b4285dc01cd90d9bfe87296efdb4d5dbcd5837f5 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 6 Jun 2023 15:24:02 +0000 Subject: [PATCH] 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 --- .../prog/en/modules/plugins/plugins-disabled.tt | 9 +++++++-- .../prog/en/modules/plugins/plugins-home.tt | 15 ++++++++------- .../prog/en/modules/plugins/plugins-upload.tt | 11 ++++++++--- .../intranet-tmpl/prog/en/modules/pos/pay.tt | 6 +++++- .../prog/en/modules/pos/printreceipt.tt | 5 ++++- .../intranet-tmpl/prog/en/modules/pos/register.tt | 9 +++++---- .../prog/en/modules/pos/registers.tt | 9 +++++---- 7 files changed, 42 insertions(+), 22 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-disabled.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-disabled.tt index 9b799ccae2..e23fe82069 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-disabled.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-disabled.tt @@ -1,6 +1,11 @@ [% USE raw %] +[% PROCESS 'i18n.inc' %] [% INCLUDE 'doc-head-open.inc' %] -Upload plugin › Plugins › Tools › Koha +[% FILTER collapse %] + [% t("Plugins disabled") | html %] › + [% t("Plugins") | html %] › + [% t("Koha") | html %] +[% END %] [% INCLUDE 'doc-head-close.inc' %] [% INCLUDE 'calendar.inc' %] @@ -24,7 +29,7 @@
-

Plugins disabled!

+

Plugins disabled

To enable Koha plugins, the flag enable_plugins must be set in the Koha configuration file

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-home.tt index 3dad8c1ea9..1ee0768912 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-home.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-home.tt @@ -1,17 +1,18 @@ [% USE raw %] [% USE Asset %] [% USE KohaDates %] +[% PROCESS 'i18n.inc' %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] - - Plugins › +<title>[% FILTER collapse %] + [% t("Plugins") | html %] › [% IF ( method == 'tool' ) %] - Tools + [% t("Tools") | html %] [% ELSE %] - Administration - [% END %] - › Koha - + [% t("Administration") | html %] + [% END %] › + [% t("Koha") | html %] +[% END %] [% INCLUDE 'doc-head-close.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-upload.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-upload.tt index 96e74dc7f6..3756de7f78 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-upload.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-upload.tt @@ -1,6 +1,11 @@ [% USE raw %] +[% PROCESS 'i18n.inc' %] [% INCLUDE 'doc-head-open.inc' %] -Upload plugin › Plugins › Tools › Koha +[% FILTER collapse %] + [% t("Upload plugin") | html %] › + [% t("Plugins") | html %] › + [% t("Koha") | html %] +[% END %] [% INCLUDE 'doc-head-close.inc' %] [% INCLUDE 'calendar.inc' %] @@ -16,7 +21,7 @@ Plugins [% END %] [% WRAPPER breadcrumb_item bc_active= 1 %] - Upload plugins + Upload plugin [% END %] [% END #/ WRAPPER breadcrumbs %] [% END #/ WRAPPER sub-header.inc %] @@ -25,7 +30,7 @@
-

Upload Koha plugin

+

Upload plugin

[% IF ( ERRORS ) %]
[% FOREACH ERROR IN ERRORS %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt index 62893aca8c..0b97e03303 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt @@ -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 } ) %] -Payments › Koha +[% FILTER collapse %] + [% t("Point of sale") | html %] › + [% t("Koha") | html %] +[% END %] [% INCLUDE 'doc-head-close.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/printreceipt.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/printreceipt.tt index 581d5668fb..7374498b32 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/printreceipt.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/printreceipt.tt @@ -1,10 +1,13 @@ [% USE raw %] [% USE Asset %] [% USE Koha %] +[% PROCESS 'i18n.inc' %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] -Print receipt +[% FILTER collapse %] + [% t("Print receipt") | html %] +[% END %] [% INCLUDE 'doc-head-close.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt index 81178fad67..bb00da9cc2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt @@ -4,10 +4,14 @@ [% USE KohaDates %] [% USE AuthorisedValues %] [% USE Price %] +[% PROCESS 'i18n.inc' %] [% SET footerjs = 1 %] [% PROCESS 'accounts.inc' %] [% INCLUDE 'doc-head-open.inc' %] -Cashup › Koha +[% FILTER collapse %] + [% tx("Transaction history for {register}", { register = register.name }) | html %] › + [% t("Koha") | html %] +[% END %] [% INCLUDE 'doc-head-close.inc' %] [% Asset.css("lib/jquery/plugins/rowGroup/stylesheets/rowGroup.dataTables.min.css") | $raw %] @@ -19,9 +23,6 @@ [% WRAPPER 'sub-header.inc' %] [% WRAPPER breadcrumbs %] - [% WRAPPER breadcrumb_item %] - Cash management - [% END %] [% WRAPPER breadcrumb_item bc_active= 1 %] Transaction history for [% register.name | html %] [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/registers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/registers.tt index 9a0764a8c9..61a053e987 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/registers.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/registers.tt @@ -3,9 +3,13 @@ [% USE Koha %] [% USE KohaDates %] [% USE Price %] +[% PROCESS 'i18n.inc' %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] -Cashup › Koha +[% FILTER collapse %] + [% tx("Cash summary for {library}", { library = library.branchname }) | html %] › + [% t("Koha") | html %] +[% END %] [% INCLUDE 'doc-head-close.inc' %] @@ -16,9 +20,6 @@ [% WRAPPER 'sub-header.inc' %] [% WRAPPER breadcrumbs %] - [% WRAPPER breadcrumb_item %] - Cash management - [% END %] [% WRAPPER breadcrumb_item bc_active= 1 %] Cash summary for [% library.branchname | html %] [% END %] -- 2.30.2