From 7855c20dd79e8dbd9a832ece9b992565bbbeef97 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Mon, 19 Mar 2018 11:38:34 +0200 Subject: [PATCH] Bug 20442: Use more HtmlTags filter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 catalogue part. Test plan: 1) Apply patch 2) Search for a biblio 3) See the "X result(s) found for ..." that it looks correct 4) Check out the biblio detail page and MARC detail page breadcrumbs 5) Search for nonexistent biblio, check the "No results match for ..." text 6) Update a language po-files 7) Look through the xx-YY-staff-prog.po for the catalogue pages strings and that they look correct Patch applies and functions as expected. Signed-off-by: Pasi Kallinen Signed-off-by: Dilan Johnpullé --- koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tt | 3 ++- koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt | 6 ++++-- koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/imageviewer.tt | 7 ++++--- koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt | 3 ++- .../intranet-tmpl/prog/en/modules/catalogue/labeledMARCdetail.tt | 3 ++- koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt | 7 ++++--- koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt | 5 +++-- 7 files changed, 21 insertions(+), 13 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tt index dfe1e1c..b05a311 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tt @@ -1,3 +1,4 @@ +[% USE HtmlTags %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Catalog › @@ -19,7 +20,7 @@ [% IF ( unknownbiblionumber ) %] Unknown record [% ELSE %] - MARC Details for <i>[% bibliotitle |html %]</i> + MARC Details for [% bibliotitle |html | $HtmlTags tag='i' %] [% END %] </div> diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt index 9b1eb1a..05b9d73 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -3,6 +3,7 @@ [% USE AuthorisedValues %] [% USE Branches %] [% USE Biblio %] +[% USE HtmlTags %] [% IF Koha.Preference('AmazonAssocTag') %] [% AmazonAssocTag = '?tag=' _ Koha.Preference('AmazonAssocTag') %] @@ -25,11 +26,12 @@ [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] +[% title_and_subtitles = BLOCK %][% title |html %] [% FOREACH subtitl IN subtitle %] [% subtitl.subfield | html %][% END %][% END %] <title>Koha › Catalog › [% IF ( unknownbiblionumber ) %] Unknown record [% ELSE %] - Details for [% title |html %] [% FOREACH subtitl IN subtitle %] [% subtitl.subfield | html %][% END %] + Details for [% title_and_subtitles %] [% END %] [% INCLUDE 'doc-head-close.inc' %] @@ -45,7 +47,7 @@ [% IF ( unknownbiblionumber ) %] Unknown record [% ELSE %] - Details for [% title |html %] [% FOREACH subtitl IN subtitle %] [% subtitl.subfield | html %][% END %] + Details for [% title_and_subtitles | $HtmlTags tag='i' %] [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/imageviewer.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/imageviewer.tt index b434c9a..60aaeae 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/imageviewer.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/imageviewer.tt @@ -1,6 +1,8 @@ +[% USE HtmlTags %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] -Koha › Catalog › Details for [% biblio.title |html %] [% FOREACH subtitl IN subtitle %] [% subtitl.subfield %][% END %] +[% title_and_subtitles = BLOCK %][% biblio.title |html %] [% FOREACH subtitl IN subtitle %] [% subtitl.subfield %][% END %][% END %] +Koha › Catalog › Details for [% title_and_subtitles %] [% INCLUDE 'doc-head-close.inc' %] [% IF ( LocalCoverImages == 1 ) %] @@ -10,8 +12,7 @@ [% USE KohaDates %] [% INCLUDE 'header.inc' %] [% INCLUDE 'cat-search.inc' %] - - +
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt index 459bc08..fb5af4a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt @@ -1,6 +1,7 @@ [% USE Koha %] [% USE Biblio %] [% USE KohaDates %] +[% USE HtmlTags %] [% SET footerjs = 1 %] [% IF BiblioDefaultViewmarc %] [% SET DetailPage="MARCdetail.pl" %] @@ -51,7 +52,7 @@ [% IF ( total ) %]

- [% total %] result(s) found [% IF ( query_desc ) %]for '[% query_desc |html %]'[% END %][% IF limit_desc %] with limit(s): '[% limit_desc | html %]'[% END %][% IF ( LibraryName ) %] in [% LibraryName %] Catalog[% END %]. + [% total %] result(s) found [% IF ( query_desc ) %]for '[% query_desc |html | $HtmlTags tag='span' attributes=>'class="results_query_desc"' %]'[% END %][% IF limit_desc %] with limit(s): '[% limit_desc | html | $HtmlTags tag='span' attributes=>'class="results_limit_desc"' %]'[% END %][% IF ( LibraryName ) %] in [% LibraryName %] Catalog[% END %].

@@ -253,7 +254,7 @@

No results found

[% IF ( searchdesc ) %]

- No results match your search [% IF ( query_desc ) %]for '[% query_desc |html %]'[% END %][% IF ( limit_desc ) %] with limit(s): '[% limit_desc | html %]'[% END %][% IF ( LibraryName ) %] in [% LibraryName %] Catalog[% END %]. + No results match your search [% IF ( query_desc ) %]for '[% query_desc |html | $HtmlTags tag='span' attributes=>'style="font-weight: bold;"' %]'[% END %][% IF ( limit_desc ) %] with limit(s): '[% limit_desc | html | $HtmlTags tag='span' attributes=>'style="font-weight: bold;"' %]'[% END %][% IF ( LibraryName ) %] in [% LibraryName %] Catalog[% END %].

[% ELSE %]

You did not specify any search criteria.

-- 2.1.4