From 6c74beba1c3153a7736ddb9e588c6f0292463ae3 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Mon, 19 Mar 2018 08:55:07 +0200 Subject: [PATCH] Bug 20442: Use more HtmlTags filter Some strings are hard to translate, because there are HTML tags splitting the sentences into multiple parts. Use the HtmlTags filter so the sentences can be translated as a single unit instead. This is the intranet Patron clubs part. Test plan: 1) Apply patch 2) Go to Home -> Tools -> Patron clubs 3) Create a new template, edit it, a new club, edit it, etc. 4) Note the strings look correct in the page 5) Update a language po-files 6) Look through the xx-YY-staff-prog.po for the clubs pages strings and that they look correct Signed-off-by: Pasi Kallinen --- .../intranet-tmpl/prog/en/modules/clubs/club-enrollments.tt | 3 ++- .../intranet-tmpl/prog/en/modules/clubs/clubs-add-modify.tt | 9 +++++---- koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs.tt | 9 +++++---- koha-tmpl/intranet-tmpl/prog/en/modules/clubs/patron-enroll.tt | 5 ++--- .../intranet-tmpl/prog/en/modules/clubs/templates-add-modify.tt | 7 ++++--- 5 files changed, 18 insertions(+), 15 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/club-enrollments.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/club-enrollments.tt index 02b5b2181e..d796dfeaa4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/club-enrollments.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/club-enrollments.tt @@ -1,6 +1,7 @@ [% USE KohaDates %] [% USE Branches %] [% USE Koha %] +[% USE HtmlTags %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Tools › Patron clubs › Club enrollments @@ -17,7 +18,7 @@
-

Club enrollments for [% club.name %]

+

Club enrollments for [% club.name | $HtmlTags tag='i' %]

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs-add-modify.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs-add-modify.tt index 170a56bd30..d4369db0cb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs-add-modify.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs-add-modify.tt @@ -2,6 +2,7 @@ [% USE Branches %] [% USE AuthorisedValues %] [% SET AuthorisedValuesCategories = AuthorisedValues.GetCategories %] +[% USE HtmlTags %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Tools › Patron clubs › @@ -19,9 +20,9 @@ [% INCLUDE 'cat-search.inc' %] <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> › <a href="clubs.pl">Patron clubs</a> › [% IF club %] - Modify club <i>[% club.name %]</i> + <span>Modify club [% club.name | $HtmlTags tag='i' %]</span> [% ELSE %] - Create a new <i>[% club_template.name %]</i> club + <span>Create a new [% club_template.name | $HtmlTags tag='i' %] club</span> [% END %] </div> @@ -37,9 +38,9 @@ <legend> [% IF club %] - Modify club <i>[% club.name %]</i> + <span>Modify club [% club.name | $HtmlTags tag='i' %]</span> [% ELSE %] - Create a new <i>[% club_template.name %]</i> club + <span>Create a new [% club_template.name | $HtmlTags tag='i' %] club</span> [% END %] </legend> diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs.tt index 2a9d3e0984..27a2d9bc5a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs.tt @@ -1,6 +1,7 @@ [% USE KohaDates %] [% USE Branches %] [% USE Koha %] +[% USE HtmlTags %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] <title>Koha › Tools › Patron clubs @@ -23,17 +24,17 @@ [% IF club_template %]
[% IF stored == 'updated' %] -

Club template [% club_template.name %] was updated.

+

Club template [% club_template.name | $HtmlTags tag='i' %] was updated.

[% ELSE %] -

Club template [% club_template.name %] was saved.

+

Club template [% club_template.name | $HtmlTags tag='i' %] was saved.

[% END %]
[% ELSIF club %]
[% IF stored == 'updated' %] -

Club [% club.name %] was updated.

+

Club [% club.name | $HtmlTags tag='i' %] was updated.

[% ELSE %] -

Club [% club.name %] was saved.

+

Club [% club.name | $HtmlTags tag='i' %] was saved.

[% END %]
[% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/patron-enroll.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/patron-enroll.tt index db3d5442e0..b854602e67 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/patron-enroll.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/patron-enroll.tt @@ -1,9 +1,8 @@ [% USE AuthorisedValues %] [% SET AuthorisedValuesCategories = AuthorisedValues.GetCategories %] +[% USE HtmlTags %] -

- Enroll in [% club.name %] -

+

Enroll in [% club.name | $HtmlTags tag='i' %]

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/templates-add-modify.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/templates-add-modify.tt index efb8ccecd6..4f6685fd07 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/templates-add-modify.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/templates-add-modify.tt @@ -1,5 +1,6 @@ [% USE Branches %] [% USE AuthorisedValues %] +[% USE HtmlTags %] [% INCLUDE 'doc-head-open.inc' %] Koha › Tools › Patron clubs › [% IF club_template %] @@ -22,7 +23,7 @@ [% INCLUDE 'cat-search.inc' %] <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> › <a href="clubs.pl">Patron clubs</a> › [% IF club_template %] - Modify club template <i>[% club_template.name %]</i> + Modify club template [% club_template.name | $HtmlTags tag='i' %] [% ELSE %] Create a new club template [% END %] @@ -37,9 +38,9 @@ <h2> [% IF club_template %] - Modify club template <i>[% club_template.name %]</i> + <span>Modify club template [% club_template.name | $HtmlTags tag='i' %]</span> [% ELSE %] - Create a new club template + <span>Create a new club template</span> [% END %] </h2> -- 2.11.0