Bug 33918: Improve translation of title tags: Patron card creator

This patch updates patron card creator 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:

- Tools -> Patron card creator home page
  - New -> Card batch
  - New -> Image
  - New -> Layout
  - New -> Card template
  - New -> Printer profile
  - Manage -> Card batches
  - Manage -> Images
  - Manage -> Layouts
  - Manage -> Card templates
  - Manage -> Printer profiles

Signed-off-by: Émily-Rose Francoeur <emily-rose.francoeur@inLibro.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-06-06 15:20:38 +00:00 committed by Tomas Cohen Arazi
parent 0f3a1fe137
commit 8ff6189c2a
No known key found for this signature in database
GPG Key ID: 0A272EA1B2F3C15F
8 changed files with 107 additions and 36 deletions

View File

@ -1,8 +1,19 @@
[% USE raw %]
[% USE Asset %]
[% PROCESS 'i18n.inc' %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>[% IF batch_id %]Edit ([% batch_id | html %])[% ELSE %]New[% END %] &rsaquo; Batches &rsaquo; Patron card creator &rsaquo; Tools &rsaquo; Koha</title>
<title>[% FILTER collapse %]
[% IF ( batch_id ) %]
[% t("Edit patron card batch") | html %] ([% batch_id | html %])
[% ELSE %]
[% t("New patron card batch") | html %]
[% END %] &rsaquo;
[% t("Batches") | html %] &rsaquo;
[% t("Patron card creator") | html %] &rsaquo;
[% t("Tools") | html %] &rsaquo;
[% t("Koha") | html %]
[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
</head>
@ -28,7 +39,7 @@
[% ELSIF batch_id %]
<span>Edit ([% batch_id | html %])</span>
[% ELSE %]
<span>New</span>
<span>New patron card batch</span>
[% END %]
[% END %]
[% END #/ WRAPPER breadcrumbs %]

View File

@ -1,7 +1,18 @@
[% USE raw %]
[% PROCESS 'i18n.inc' %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>[% IF ( layout_id ) %]Edit ([% layout_id | html %])[% ELSE %]New[% END %] &rsaquo; Layout &rsaquo; Patron card creator &rsaquo; Tools &rsaquo; Koha</title>
<title>[% FILTER collapse %]
[% IF( layout_id ) %]
[% t("Edit patron card layout") | html %] ([% layout_id | html %])
[% ELSE %]
[% t("New patron card layout") | html %]
[% END %] &rsaquo;
[% t("Layout") | html %] &rsaquo;
[% t("Patron card creator") | html %] &rsaquo;
[% t("Tools") | html %] &rsaquo;
[% t("Koha") | html %]
[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
</head>
@ -25,7 +36,7 @@
[% IF ( layout_id ) %]
<span>Edit ([% layout_id | html %])</span>
[% ELSE %]
<span>New</span>
<span>New patron card layout</span>
[% END %]
[% END %]
[% END #/ WRAPPER breadcrumbs %]
@ -38,8 +49,12 @@
[% INCLUDE 'patroncards-toolbar.inc' %]
<h1>[% IF ( layout_id ) %]<span>Edit patron card layout</span> [% layout_id | html %]
[% ELSE %]<span>Create patron card layout</span>[% END %]
<h1>
[% IF ( layout_id ) %]
<span>Edit patron card layout [% layout_id | html %]</span>
[% ELSE %]
<span>New patron card layout</span>
[% END %]
</h1>
<!-- NOTE: The order of the elements on this form is crictical to correct processing. You've been warned... -->
@ -47,7 +62,7 @@
<div class="row">
<div class="col-sm-6">
<fieldset class="rows">
<legend>[% IF ( layout_id ) %]Edit[% ELSE %]Create[% END %] patron card text layout</legend>
<legend>Patron card text layout</legend>
<ol>
<li>
<fieldset>
@ -278,9 +293,7 @@
</div>
<div class="col-sm-6">
<fieldset class="rows">
<legend>[% IF ( layout_id ) %]<span>Edit patron card graphic layout</span>
[% ELSE %]<span>Create patron card graphic layout</span>[% END %]
</legend>
<legend>Patron card graphic layout</legend>
<ol>
<!--
<li>

View File

@ -1,7 +1,18 @@
[% USE raw %]
[% PROCESS 'i18n.inc' %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>[% IF ( profile_id ) %]Edit ([% profile_id | html %])[% ELSE %]New[% END%] &rsaquo; Profiles &rsaquo; Patron card creator &rsaquo; Tools &rsaquo; Koha</title>
<title>[% FILTER collapse %]
[% IF( profile_id ) %]
[% t("Edit printer profile") | html %] ([% profile_id | html %])
[% ELSE %]
[% t("New printer profile") | html %]
[% END %] &rsaquo;
[% t("Profiles") | html %] &rsaquo;
[% t("Patron card creator") | html %] &rsaquo;
[% t("Tools") | html %] &rsaquo;
[% t("Koha") | html %]
[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
</head>
@ -23,9 +34,9 @@
[% END %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
[% IF ( profile_id ) %]
<span>Edit ([% profile_id | html %])</span>
<span>Edit printer profile ([% profile_id | html %])</span>
[% ELSE %]
<span>New</span>
<span>New printer profile</span>
[% END%]
[% END %]
[% END #/ WRAPPER breadcrumbs %]
@ -40,11 +51,10 @@
<h1>
[% IF (profile_id) %]
<span>Edit printer profile</span>
<span>Edit printer profile ([% profile_id | html %])</span>
[% ELSE %]
<span>Create printer profile</span>
<span>New printer profile</span>
[% END%]
[% IF (profile_id) %] ([% profile_id | html %])[% END %]
</h1>
<form name="input" action="/cgi-bin/koha/patroncards/edit-profile.pl" method="get">
<fieldset class="rows"><legend>Profile settings</legend>

View File

@ -1,8 +1,19 @@
[% USE raw %]
[% USE Asset %]
[% PROCESS 'i18n.inc' %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>[% IF (template_id) %]Edit ([% template_id | html %])[% ELSE %]New[% END %] &rsaquo; Templates &rsaquo; Patron card creator &rsaquo; Tools &rsaquo; Koha</title>
<title>[% FILTER collapse %]
[% IF ( template_id ) %]
[% t("Edit patron card template") | html %] ([% template_id | html %])
[% ELSE %]
[% t("New patron card template") | html %]
[% END %] &rsaquo;
[% t("Templates") | html %] &rsaquo;
[% t("Patron card creator") | html %] &rsaquo;
[% t("Tools") | html %] &rsaquo;
[% t("Koha") | html %]
[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
</head>
@ -24,9 +35,9 @@
[% END %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
[% IF (template_id) %]
<span>Edit ([% template_id | html %])</span>
<span>Edit patron card template ([% template_id | html %])</span>
[% ELSE %]
<span>New</span>
<span>New patron card template</span>
[% END %]
[% END %]
[% END #/ WRAPPER breadcrumbs %]
@ -42,7 +53,7 @@
[% IF (template_id) %]
<span>Edit patron card template</span>
[% ELSE %]
<span>Create patron card template</span>
<span>New patron card template</span>
[% END %]
[% IF (template_id) %] ([% template_id | html %])[% END %]
</h1>

View File

@ -1,6 +1,11 @@
[% USE raw %]
[% PROCESS 'i18n.inc' %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Patron card creator &rsaquo; Tools &rsaquo; Koha</title>
<title>[% FILTER collapse %]
[% t("Patron card creator") | html %] &rsaquo;
[% t("Tools") | html %] &rsaquo;
[% t("Koha") | html %]
[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
</head>
<body id="pcard_home" class="tools pcard">

View File

@ -1,7 +1,13 @@
[% USE raw %]
[% PROCESS 'i18n.inc' %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Images &rsaquo; Patron card creator &rsaquo; Tools &rsaquo; Koha</title>
<title>[% FILTER collapse %]
[% t("Image manager") | html %] &rsaquo;
[% t("Patron card creator") | html %] &rsaquo;
[% t("Tools") | html %] &rsaquo;
[% t("Koha") | html %]
[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
</head>
@ -20,7 +26,7 @@
<a href="/cgi-bin/koha/patroncards/home.pl">Patron card creator</a>
[% END %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Images</span>
<span>Image manager</span>
[% END %]
[% END #/ WRAPPER breadcrumbs %]
[% END #/ WRAPPER sub-header.inc %]

View File

@ -1,16 +1,17 @@
[% USE raw %]
[% USE CGI %]
[% PROCESS 'i18n.inc' %]
[% SET footerjs = 1 %]
[% BLOCK translate_card_element %]
[%- SWITCH element -%]
[%- CASE 'layout' -%][% t('layout') | html %]
[%- CASE 'Layouts' -%][% t('Layouts') | html %]
[%- CASE 'Layouts' -%][% t('Patron card layouts') | html %]
[%- CASE 'template' -%][% t('template') | html %]
[%- CASE 'Templates' -%][% t('Templates') | html %]
[%- CASE 'Templates' -%][% t('Patron card templates') | html %]
[%- CASE 'profile' -%][% t('profile') | html %]
[%- CASE 'Profiles' -%][% t('Profiles') | html %]
[%- CASE 'Profiles' -%][% t('Patron card printer profiles') | html %]
[%- CASE 'batch' -%][% t('batch') | html %]
[%- CASE 'Batches' -%][% t('Batches') | html %]
[%- CASE 'Batches' -%][% t('Patron card batches') | html %]
[%- CASE 'Actions' -%][% t('Actions') | html %]
[%- END -%]
[% END %]
@ -24,7 +25,12 @@
[% END %]
[% INCLUDE 'doc-head-open.inc' %]
<title>[% PROCESS translate_card_element element=card_element_title %] &rsaquo; Patron card creator &rsaquo; Tools &rsaquo; Koha</title>
<title>[% FILTER collapse %]
[% PROCESS translate_card_element element=card_element_title %] &rsaquo;
[% t("Patron card creator") | html %] &rsaquo;
[% t("Tools") | html %] &rsaquo;
[% t("Koha") | html %]
[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
</head>
@ -54,14 +60,13 @@
[% INCLUDE 'patroncards-toolbar.inc' %]
<h1>Patron card templates</h1>
<h1>[% PROCESS translate_card_element element=card_element_title %]</h1>
[% INCLUDE 'patroncards-errors.inc' %]
<div id="manage-patroncards-layouts">
[% IF ( table_loop ) %]
<form name="layouts" action="/cgi-bin/koha/manage.pl?card_element=[% card_element | html %]">
<div class="page-section">
<h2>Currently available [% PROCESS translate_card_element element=card_element_title FILTER lower %]</h2>
<table>
[% FOREACH table_loo IN table_loop %]
[% IF ( table_loo.header_fields ) %]
@ -105,13 +110,16 @@
[% END %]
[% END %]
</table>
<fieldset class="action">
[% IF ( print ) %]<input type="button" id="print" value="Export selected batches" />[% END %]
</fieldset>
</div> <!-- /.page-section -->
[% IF ( print ) %]
<fieldset class="action">
<input class="btn btn-primary" type="button" id="print" value="Export selected batches" />
</fieldset>
[% END %]
[% IF patron_lists %]
<fieldset class="rows">
<legend>Or use a patron list</legend>
<legend>Export by patron list</legend>
<ol>
<li>
<label for="patron_list_id">Patron list: </label>
@ -125,7 +133,7 @@
</ol>
</fieldset>
<fieldset class="action">
<input type="button" id="printlist" value="Export from patron list" />
<input class="btn btn-primary" type="button" id="printlist" value="Export from patron list" />
</fieldset>
[% END %]
</form>

View File

@ -1,7 +1,14 @@
[% USE raw %]
[% USE Asset %]
[% PROCESS 'i18n.inc' %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Patron card printing/exporting &rsaquo; Patron cards &rsaquo; Tools &rsaquo; Koha</title>
<title>[% FILTER collapse %]
[% t("Patron card printing/exporting") | html %] &rsaquo;
[% t("Patron cards") | html %] &rsaquo;
[% t("Tools") | html %] &rsaquo;
[% t("Koha") | html %]
[% END %]</title>
[% INCLUDE 'doc-head-close.inc' popup => 1%]
</head>