Bug 34796: Improve translation of title tags: Tools - Additional tools

This patch modifies templates for tools under the "Additional tools"
heading so that title tags can be more easily translated. The patch also
makes some modifications to titles, breadcrumb navigation, and page
headers in order to make them more consistent with each other and with
other similar pages.

To test, apply the patch and go to Tools. Test each page below and each
variation of the page to confirm that titles, breadcrumbs, and page
headers look correct.

- Calendar
- CSV profiles
  - Main page
    - New CSV profile
    - Modify CSV profile
    - Confirm deletion of CSV profile
- Log viewer
  - Search results
- News, HTML customizations, and pages
  - Create and modify each content type: news, pages, HTML
    customizations
- Task scheduler
- Quote editor
  - Main page
  - New quote
  - Edit quote
  - Import quotes
- Uploads
  - Main page
  - Upload file
  - Delete file
  - Search for file
- Access files
- OPAC problem reports (with OPACReportProblem enabled)

Signed-off-by: Stina Hallin <stina.hallin@ub.lu.se>
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-09-14 16:33:48 +00:00 committed by Tomas Cohen Arazi
parent 1a0ccaa991
commit 2813e1e276
No known key found for this signature in database
GPG Key ID: 0A272EA1B2F3C15F
11 changed files with 187 additions and 86 deletions

View File

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

View File

@ -3,9 +3,46 @@
[% USE Koha %]
[% USE KohaDates %]
[% USE Branches %]
[% PROCESS 'i18n.inc' %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Additional contents &rsaquo; Tools &rsaquo; Koha</title>
[% BLOCK page_heading %]
[% IF additional_content.idnew %]
[% IF category == 'news' %]
[% t("Modify news item") | html %]
[% ELSIF category == 'pages' %]
[% t("Modify page") | html %]
[% ELSE %]
[% t("Modify HTML customization") | html %]
[% END %]
[% ELSE %]
[% IF category == 'news' %]
[% t("New news item") | html %]
[% ELSIF category == 'pages' %]
[% t("New page") | html %]
[% ELSE %]
[% t("New HTML customization") | html %]
[% END %]
[% END %]
[% END %]
[% BLOCK page_section %]
[% IF category == 'news' %]
[% t("News") | html %]
[% ELSIF category == 'pages' %]
[% t("Pages") | html %]
[% ELSE %]
[% t("HTML customizations") | html %]
[% END %]
[% END %]
<title>[% FILTER collapse %]
[% IF op == 'add_form' %]
[% PROCESS page_heading %] &rsaquo;
[% END %]
[% PROCESS page_section %] &rsaquo;
[% t("Additional content") | html %] &rsaquo;
[% t("Tools") | html %] &rsaquo;
[% t("Koha") | html %]
[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
[% IF ( wysiwyg ) %]
[% SET editmode = "wysiwyg" %]
@ -24,10 +61,10 @@
.syspref-link::before {
content: " | ";
}
.customisation-link::before {
.customization-link::before {
content: " | ";
}
.customisation-link:first-child::before {
.customization-link:first-child::before {
content: none;
}
label[for^="title_"],
@ -47,7 +84,9 @@
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a>
[% END %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/tools/additional-contents.pl">Additional content</a>
[% END %]
[% IF op == 'add_form' %]
[% WRAPPER breadcrumb_item %]
[% IF category == 'news' %]
@ -58,29 +97,12 @@
<a href="/cgi-bin/koha/tools/additional-contents.pl?category=html_customizations">HTML customizations</a>
[% END %]
[% END %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
[% IF additional_content.idnew %]
<span>Modify additional content</span>
[% ELSE %]
<span>Add additional content</span>
[% END %]
[% IF category == 'news' %]
<span>(News)</span>
[% ELSIF category == 'pages' %]
<span>(Pages)</span>
[% ELSE %]
<span>(HTML customizations)</span>
[% END %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
[% PROCESS page_heading %]
[% END %]
[% ELSE %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
[% IF category == 'news' %]
<span>News</span>
[% ELSIF category == 'pages' %]
<span>Pages</span>
[% ELSE %]
<span>HTML customizations</span>
[% END %]
[% PROCESS page_section %]
[% END %]
[% END %]
[% END #/ WRAPPER breadcrumbs %]
@ -175,11 +197,7 @@
</div> <!-- /.main.container-fluid -->
[% BLOCK add_form %]
[% IF additional_content %]
<h1>Modify an additional content</h1>
[% ELSE %]
<h1>New additional content ([% IF category == 'news' %]News[% ELSIF category == 'pages' %]Pages[% ELSE %]HTML customizations[% END %])</h1>
[% END %]
<h1>[% PROCESS page_heading %]</h1>
<div id="toolbar" class="btn-toolbar">
<div class="btn-group">
@ -329,12 +347,21 @@
</div>
</div>
<h2>Additional contents ([% IF category == 'news' %]News[% ELSIF category == 'pages' %]Pages[% ELSE %]HTML customizations[% END %])</h2>
<h2>
Additional content:
[% IF category == 'news' %]
[% t("News") | html %]
[% ELSIF category == 'pages' %]
[% t("Pages") | html %]
[% ELSE %]
[% t("HTML customizations") | html %]
[% END %]
</h2>
<span id="additional_contents_links">
See
<a class="customisation-link" href="/cgi-bin/koha/tools/additional-contents.pl?category=news">News</a>
<a class="customisation-link" href="/cgi-bin/koha/tools/additional-contents.pl?category=html_customizations">HTML customizations</a>
<a class="customisation-link" href="/cgi-bin/koha/tools/additional-contents.pl?category=pages">Pages</a>
<a class="customization-link" href="/cgi-bin/koha/tools/additional-contents.pl?category=news">News</a>
<a class="customization-link" href="/cgi-bin/koha/tools/additional-contents.pl?category=html_customizations">HTML customizations</a>
<a class="customization-link" href="/cgi-bin/koha/tools/additional-contents.pl?category=pages">Pages</a>
[% IF ( CAN_user_parameters_manage_sysprefs ) %]
<a class="syspref-link" href='/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=OPACUserJS'>OPACUserJS</a>
<a class="syspref-link" href='/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=OPACUserCSS'>OPACUserCSS</a>

View File

@ -1,17 +1,22 @@
[% USE raw %]
[% USE Asset %]
[% PROCESS 'i18n.inc' %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>
<title>[% FILTER collapse %]
[% IF op == 'add_form' %]
[% IF csv_profile %]
Modify a CSV profile &rsaquo;
[% tx("Modify CSV profile '{csv_profile_name}'", {csv_profile_name = csv_profile.profile }) | html %] &rsaquo;
[% ELSE %]
New CSV profile &rsaquo;
[% t("New CSV profile") | html %] &rsaquo;
[% END %]
[% ELSIF ( op == 'delete_confirm' ) %]
[% tx("Confirm deletion of CSV profile '{csv_profile_name}'", {csv_profile_name = csv_profile.profile }) | html %] &rsaquo;
[% END %]
CSV export profiles &rsaquo; Tools &rsaquo; Koha
</title>
[% t("CSV profiles") | html %] &rsaquo;
[% t("Tools") | html %] &rsaquo;
[% t("Koha") | html %]
[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
</head>
@ -25,23 +30,29 @@
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a>
[% END %]
[% IF op == 'add_form' %]
[% IF op == 'add_form' || op == 'delete_confirm' %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/tools/csv-profiles.pl">CSV profiles</a>
[% END %]
[% END %]
[% IF op == 'add_form' %]
[% IF csv_profile %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Modify a CSV profile</span>
[% tx("Modify CSV profile '{csv_profile_name}'", {csv_profile_name = csv_profile.profile }) | html %]
[% END %]
[% ELSE %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>New CSV profile</span>
[% END %]
[% END %]
[% ELSIF ( op == 'delete_confirm') %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
[% tx("Confirm deletion of CSV profile '{csv_profile_name}'", {csv_profile_name = csv_profile.profile }) | html %]
[% END %]
[% ELSE %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>CSV profiles</span>
[% END %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>CSV profiles</span>
[% END %]
[% END %]
[% END #/ WRAPPER breadcrumbs %]
[% END #/ WRAPPER sub-header.inc %]
@ -131,7 +142,7 @@
[% IF op == 'add_form' %]
[% IF csv_profile %]
<h1>Modify a CSV profile</h1>
<h1>[% tx("Modify CSV profile '{csv_profile_name}'", {csv_profile_name = csv_profile.profile }) | html %]</h1>
[% ELSE %]
<h1>New CSV profile</h1>
[% END %]
@ -263,14 +274,14 @@
[% IF op == 'delete_confirm' %]
<div class="dialog alert">
[% IF csv_profile %]
<h1>Delete CSV Profile "[% csv_profile.profile | html %]?"</h1>
<h1>[% tx("Delete CSV profile '{csv_profile_name}'?", {csv_profile_name = csv_profile.profile }) | html %]</h1>
<form action="/cgi-bin/koha/tools/csv-profiles.pl" method="post">
<input type="hidden" name="op" value="delete_confirmed" />
<input type="hidden" name="export_format_id" value="[% csv_profile.export_format_id | html %]" />
<input type="submit" class="approve" value="Yes, delete" />
<button type="submit" class="approve"><i class="fa fa-check" aria-hidden="true"></i> Yes, delete</button>
</form>
<form action="/cgi-bin/koha/tools/csv-profiles.pl" method="get">
<input type="submit" class="deny" value="No, do not Delete" />
<button type="submit" class="deny"><i class="fa fa-remove" aria-hidden="true"></i> No, do not delete</button>
</form>
[% ELSE %]
This CSV Profile does not exist.

View File

@ -2,9 +2,14 @@
[% USE Asset %]
[% USE KohaDates %]
[% USE Branches %]
[% PROCESS 'i18n.inc' %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>[% Branches.GetName( branch ) | html %] calendar &rsaquo; Tools &rsaquo; Koha</title>
<title>[% FILTER collapse %]
[% tx("{library} calendar", { library = Branches.GetName( branch ) }) | html %] &rsaquo;
[% t("Tools") | html %] &rsaquo;
[% t("Koha") | html %]
[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
[% Asset.css("css/calendar.css") | $raw %]
</head>
@ -19,7 +24,7 @@
<a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a>
[% END %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>[% Branches.GetName( branch ) | html %] calendar</span>
[% tx("{library} calendar", { library = Branches.GetName( branch ) }) | html %]
[% END %]
[% END #/ WRAPPER breadcrumbs %]
[% END #/ WRAPPER sub-header.inc %]
@ -29,7 +34,7 @@
<div class="col-sm-10 col-sm-push-2">
<main>
<h1>[% Branches.GetName( branch ) | html %] calendar</h1>
<h1>[% tx("{library} calendar", { library = Branches.GetName( branch ) }) | html %]</h1>
<div class="row">
<div class="col-sm-6">

View File

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

View File

@ -2,9 +2,14 @@
[% USE Asset %]
[% USE Koha %]
[% USE KohaDates %]
[% PROCESS 'i18n.inc' %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>OPAC problem reports &rsaquo; Administration &rsaquo; Koha</title>
<title>[% FILTER collapse %]
[% t("OPAC problem reports") | html %] &rsaquo;
[% t("Tools") | html %] &rsaquo;
[% t("Koha") | html %]
[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
</head>

View File

@ -1,8 +1,14 @@
[% USE raw %]
[% USE Asset %]
[% PROCESS 'i18n.inc' %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Quote uploader &rsaquo; Tools &rsaquo; Koha</title>
<title>[% FILTER collapse %]
[% t("Quote uploader") | html %] &rsaquo;
[% t("Quote editor") | html %] &rsaquo;
[% t("Tools") | html %] &rsaquo;
[% t("Koha") | html %]
[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
[% Asset.css("css/uploader.css") | $raw %]
<style>

View File

@ -1,8 +1,20 @@
[% USE raw %]
[% USE Asset %]
[% PROCESS 'i18n.inc' %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Quote editor &rsaquo; Tools &rsaquo; Koha</title>
<title>[% FILTER collapse %]
[% IF op == 'add_form' %]
[% IF ( quote ) %]
[% t("Modify quote") | html %]
[% ELSE %]
[% t("New quote") | html %]
[% END %] &rsaquo;
[% END %]
[% t("Quote editor") | html %] &rsaquo;
[% t("Tools") | html %] &rsaquo;
[% t("Koha") | html %]
[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
</head>
@ -21,7 +33,11 @@
<a href="/cgi-bin/koha/tools/quotes.pl">Quote editor</a>
[% END %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Add quote</span>
[% IF ( quote ) %]
[% t("Modify quote") | html %]
[% ELSE %]
[% t("New quote") | html %]
[% END %]
[% END %]
[% ELSE %]
[% WRAPPER breadcrumb_item bc_active= 1 %]

View File

@ -1,8 +1,13 @@
[% USE raw %]
[% USE Asset %]
[% PROCESS 'i18n.inc' %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Task scheduler &rsaquo; Tools &rsaquo; Koha</title>
<title>[% FILTER collapse %]
[% t("Task scheduler") | html %] &rsaquo;
[% t("Tools") | html %] &rsaquo;
[% t("Koha") | html %]
[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
</head>
@ -74,7 +79,7 @@
<fieldset class="action"><input class="btn btn-primary" type="submit" value="Save" /></fieldset>
</form>
[% IF ( JOBS ) %]<h2>Jobs already entered</h2>
[% IF ( JOBS ) %]<h2>Scheduled tasks</h2>
<table>
<tr>
<th>Date/Time</th>
@ -88,7 +93,7 @@
<tr>
<td>[% JOB.TIME | html %]</td>
<td>[% JOB.TAG | html %]</td>
<td><input type="submit" name="delete" class="btn btn-primary" value="Delete" /></td>
<td><input type="submit" name="delete" class="btn btn-xs btn-default" value="Delete" /></td>
</tr>
<input type="hidden" name="jobid" value="[% JOB.JOBID | html %]" />
</form>

View File

@ -5,13 +5,21 @@
[% USE TablesSettings %]
[% USE AuthorisedValues %]
[%- USE KohaSpan -%]
[% PROCESS 'i18n.inc' %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
[% IF plugin %]
<title>Upload plugin</title>
[% ELSE %]
<title>Upload &rsaquo; Tools &rsaquo; Koha</title>
[% END %]
<title>[% FILTER collapse %]
[% IF mode == 'new' || mode == 'deleted' %]
[% t("Uploads") | html %] &rsaquo;
[% ELSE %]
[% END %]
[% IF mode == 'report' %]
[% t("Results") | html %] &rsaquo;
[% t("Uploads") | html %] &rsaquo;
[% END %]
[% t("Tools") | html %] &rsaquo;
[% t("Koha") | html %]
[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
[% BLOCK plugin_pars %]
@ -75,7 +83,7 @@
</fieldset>
<fieldset class="action">
<button id="fileuploadbutton" class="btn btn-primary">Upload</button>
<button id="fileuploadcancel">Cancel</button>
<button id="fileuploadcancel" class="btn btn-link">Cancel</button>
</fieldset>
<div id="fileuploadpanel">
<div id="fileuploadstatus" class="progress_panel">Upload progress:
@ -156,7 +164,7 @@
[% IF !plugin %]
<form id="back">
<fieldset class="action">
<button class="submit">Back</button>
<button class="btn btn-default">Back</button>
</fieldset>
</form>
[% END %]
@ -165,7 +173,7 @@
[% BLOCK newsearch %]
<form id="newsearch">
<fieldset class="action">
<button id="new_search">New search</button>
<button id="new_search" class="btn btn-default">New search</button>
</fieldset>
</form>
[% IF plugin %]
@ -249,17 +257,19 @@
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a>
[% END %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/tools/upload.pl">Upload</a>
[% IF mode == 'new' || mode == 'deleted' %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Uploads</span>
[% END %]
[% ELSE %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/tools/upload.pl">Uploads</a>
[% END %]
[% END %]
[% WRAPPER breadcrumb_item %]
<a href="#" aria-current="page">
[% IF mode=='new' || mode =='deleted'%]
<span>Add new upload or search</span>
[% ELSE %]
<span>Results</span>
[% END %]
</a>
[% IF mode == 'report' %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Results</span>
[% END %]
[% END %]
[% END #/ WRAPPER breadcrumbs %]
[% END #/ WRAPPER sub-header.inc %]
@ -270,7 +280,7 @@
<main>
[% END %]
<h1>Upload</h1>
<h1>Uploads</h1>
<div class="dialog alert" id="myalerts" style="display:none;"></div>
[% PROCESS submitter %]

View File

@ -5,14 +5,17 @@
[% USE Branches %]
[% USE KohaDates %]
[% USE TablesSettings %]
[% PROCESS 'i18n.inc' %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>
<title>[% FILTER collapse %]
[% IF ( do_it ) %]
Results &rsaquo; [% END %]
Logs &rsaquo; Tools &rsaquo; Koha
</title>
[% t("Results") | html %] &rsaquo;
[% END %]
[% t("Log viewer") | html %] &rsaquo;
[% t("Tools") | html %] &rsaquo;
[% t("Koha") | html %]
[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
[% Asset.css("css/humanmsg.css") | $raw %]
[% FILTER collapse %]
@ -174,14 +177,14 @@
[% END %]
[% IF ( do_it ) %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/tools/viewlog.pl">Logs</a>
<a href="/cgi-bin/koha/tools/viewlog.pl">Log viewer</a>
[% END %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Results</span>
[% END %]
[% ELSE %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Logs</span>
<span>Log viewer</span>
[% END %]
[% END %]
[% END #/ WRAPPER breadcrumbs %]
@ -192,7 +195,7 @@
<div class="col-sm-10 col-sm-push-2">
<main>
<h1>Browse system logs</h1>
<h1>Log viewer</h1>
<form method="post" action="/cgi-bin/koha/tools/viewlog.pl">
[% IF ( do_it ) %]
<input type="hidden" name="do_it" value="[% do_it | html %]" />