Bug 33914: Improve translation of title tags: Course reserves

This patch updates course reserves templates so that title
tags can be more easily translated.

To test you should have the UseCourseReserves system preference enabled.
Apply the patch and confirm that the following course reserves
pages have the correct title tags:

- Course reserves
- New course
- Course details
- Edit course
- Add reserves (step 1 and 2)
- Batch add reserves (step 1 and 2)
- Batch remove reserves
- Invalid course (/cgi-bin/koha/course_reserves/course-details.pl?course_id=)

Signed-off-by: David Nind <david@davidnind.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:15:11 +00:00 committed by Tomas Cohen Arazi
parent d3bfe0f809
commit f69a7e4ba1
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F
8 changed files with 56 additions and 11 deletions

View file

@ -1,7 +1,13 @@
[% USE raw %]
[% PROCESS 'i18n.inc' %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Add reserves &rsaquo; [% course.course_name | html %] &rsaquo; Course reserves &rsaquo; Koha</title>
<title>[% FILTER collapse %]
[% t("Add reserves") | html %] &rsaquo;
[% course.course_name | html %] &rsaquo;
[% t("Course reserves") | html %] &rsaquo;
[% t("Koha") | html %]
[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
</head>
<body id="courses_add_items_step1" class="course">

View file

@ -1,10 +1,19 @@
[% USE raw %]
[% USE HtmlTags %]
[% USE Branches %]
[% PROCESS 'i18n.inc' %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
[% PROCESS 'i18n.inc' %]
<title>[% IF is_edit || course_reserve %]Edit reserve[% ELSE %]Add reserves[% END %] &rsaquo; [% course.course_name | html %] &rsaquo; Course reserves &rsaquo; Koha</title>
<title>[% FILTER collapse %]
[% IF is_edit || course_reserve %]
[% t("Edit reserve") | html %]
[% ELSE %]
[% t("Add reserves") | html %]
[% END %] &rsaquo;
[% course.course_name | html %] &rsaquo;
[% t("Course reserves") | html %] &rsaquo;
[% t("Koha") | html %]
[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
</head>

View file

@ -2,11 +2,16 @@
[% USE AuthorisedValues %]
[% USE Branches %]
[% USE ItemTypes %]
[% PROCESS 'i18n.inc' %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Add reserves &rsaquo; [% course.course_name | html %] &rsaquo; Course reserves &rsaquo; Koha</title>
<title>[% FILTER collapse %]
[% t("Add reserves") | html %] &rsaquo;
[% course.course_name | html %] &rsaquo;
[% t("Course reserves") | html %] &rsaquo;
[% t("Koha") | html %]
[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
</head>
<body id="courses_add_items_step1" class="course">

View file

@ -1,8 +1,13 @@
[% USE raw %]
[% PROCESS 'i18n.inc' %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Remove reserves &rsaquo; Course reserves &rsaquo; Koha</title>
<title>[% FILTER collapse %]
[% t("Remove reserves") | html %] &rsaquo;
[% t("Course reserves") | html %] &rsaquo;
[% t("Koha") | html %]
[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
</head>
<body id="courses_rm_items" class="course">

View file

@ -8,7 +8,11 @@
[% PROCESS 'i18n.inc' %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Course details for [% course.course_name | html %] &rsaquo; Course reserves &rsaquo; Koha</title>
<title>[% FILTER collapse %]
[% tx("Course details for {course_name}", { course_name = course.course_name }) | html %] &rsaquo;
[% t("Course reserves") | html %] &rsaquo;
[% t("Koha") | html %]
[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
[% FILTER collapse %]
<style>

View file

@ -2,10 +2,13 @@
[% USE Asset %]
[% USE AuthorisedValues %]
[% USE TablesSettings %]
[% SET footerjs = 1 %]
[% PROCESS 'i18n.inc' %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Course reserves &rsaquo; Koha</title>
<title>[% FILTER collapse %]
[% t("Course reserves") | html %] &rsaquo;
[% t("Koha") | html %]
[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
</head>

View file

@ -3,7 +3,15 @@
[% PROCESS 'i18n.inc' %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>[% IF course_name %] Edit [% course_name | html %] [% ELSE %] New course [% END %] &rsaquo; Course reserves &rsaquo; Koha</title>
<title>[% FILTER collapse %]
[% IF ( course_name ) %]
[% tx("Edit {course_name}", { course_name = course_name }) | html %]
[% ELSE %]
[% t("New course") | html %]
[% END %] &rsaquo;
[% t("Course reserves") | html %] &rsaquo;
[% t("Koha") | html %]
[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
<style>
#course_instructors {

View file

@ -1,6 +1,11 @@
[% USE raw %]
[% PROCESS 'i18n.inc' %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Course reserves &rsaquo; Koha</title>
<title>[% FILTER collapse %]
[% t("Invalid course") | html %]
[% t("Course reserves") | html %] &rsaquo;
[% t("Koha") | html %]
[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
<body id="courses_invalid_course" class="course">