From d3a36c6612500793766cb565feb21ae74b9b4055 Mon Sep 17 00:00:00 2001 From: Bernardo Gonzalez Kriegel Date: Thu, 3 Apr 2014 15:58:08 -0300 Subject: [PATCH] Bug 11497: remove TT construct for picking a default string that i18n toolchain fails to pick up The i18n toolchain fails to pick up constant text defined inside [% ... %]. In particular, in a construct like this [% var OR "string" %] the string "string" will not be available to be translated. This patch fixes all the cases I could find. To test: 1. Update your preferred language (cd misc/translator; perl translate update fi-FI) 2. Count headers for example egrep "^msgid.*Koha online" misc/translator/po/fi-FI-* | wc -l 3. Apply the patch 4. Repeat 1 and 2, now there are more lines Or translate to some lang and visit every touched page and look the title Signed-off-by: Chris Cormack Signed-off-by: Katrin Fischer Works as described. Template changes only. Signed-off-by: Galen Charlton --- .../prog/en/modules/admin/marc_subfields_structure.tt | 2 +- koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt | 2 +- koha-tmpl/opac-tmpl/bootstrap/en/modules/ilsdi.tt | 5 +++-- .../opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt | 4 ++-- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt | 3 ++- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-review.tt | 3 ++- .../opac-tmpl/bootstrap/en/modules/opac-tags_subject.tt | 5 +++-- koha-tmpl/opac-tmpl/prog/en/modules/ilsdi.tt | 3 ++- koha-tmpl/opac-tmpl/prog/en/modules/opac-readingrecord.tt | 3 ++- koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt | 3 ++- koha-tmpl/opac-tmpl/prog/en/modules/opac-review.tt | 3 ++- koha-tmpl/opac-tmpl/prog/en/modules/opac-tags_subject.tt | 3 ++- 12 files changed, 24 insertions(+), 15 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tt index 4da56afb59..493604106f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tt @@ -167,7 +167,7 @@ function populateHiddenCheckboxes(tab) { [% INCLUDE 'cat-search.inc' %] [% INCLUDE 'opac-bottom.inc' %] -[% BLOCK jsinclude %][% END %] \ No newline at end of file +[% BLOCK jsinclude %][% END %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt index 584e0e3463..983dcc8f82 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt @@ -1,7 +1,7 @@ [% USE Koha %] [% USE KohaDates %] - -[% INCLUDE 'doc-head-open.inc' %][% LibraryNameTitle or "Koha online" %] catalog › Your checkout history +[% INCLUDE 'doc-head-open.inc' %] +[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › Your checkout history [% INCLUDE 'doc-head-close.inc' %] [% BLOCK cssinclude %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt index d42323c710..f55158423b 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt @@ -1,6 +1,7 @@ [% USE Koha %] [% USE KohaDates %] -[% INCLUDE 'doc-head-open.inc' %][% LibraryNameTitle or "Koha online" %] catalog › Placing a hold +[% INCLUDE 'doc-head-open.inc' %] +[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › Placing a hold [% INCLUDE 'doc-head-close.inc' %] [% BLOCK cssinclude %][% END %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-review.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-review.tt index f77b650b7b..7f24db68e1 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-review.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-review.tt @@ -1,4 +1,5 @@ -[% INCLUDE 'doc-head-open.inc' %][% LibraryNameTitle or "Koha online" %] catalog › Comments on [% title |html %] +[% INCLUDE 'doc-head-open.inc' %] +[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › Comments on [% title |html %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags_subject.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags_subject.tt index a79ff9f43c..a5658f0739 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags_subject.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags_subject.tt @@ -1,5 +1,6 @@ [% USE Koha %] -[% INCLUDE 'doc-head-open.inc' %][% LibraryNameTitle or "Koha online" %] catalog › Subject cloud +[% INCLUDE 'doc-head-open.inc' %] +[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › Subject cloud [% INCLUDE 'doc-head-close.inc' %] [% BLOCK cssinclude %][% END %] @@ -57,4 +58,4 @@ [% INCLUDE 'opac-bottom.inc' %] -[% BLOCK jsinclude %][% END %] \ No newline at end of file +[% BLOCK jsinclude %][% END %] diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/ilsdi.tt b/koha-tmpl/opac-tmpl/prog/en/modules/ilsdi.tt index a727b29221..9eb09befec 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/ilsdi.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/ilsdi.tt @@ -1,4 +1,5 @@ -[% INCLUDE 'doc-head-open.inc' %][% LibraryNameTitle or "Koha online" %] › ILS-DI +[% INCLUDE 'doc-head-open.inc' %] +[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › ILS-DI [% INCLUDE 'doc-head-close.inc' %] diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-readingrecord.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-readingrecord.tt index 7ee7e12226..3a849c9c2c 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-readingrecord.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-readingrecord.tt @@ -1,6 +1,7 @@ [% USE Koha %] [% USE KohaDates %] -[% INCLUDE 'doc-head-open.inc' %][% LibraryNameTitle or "Koha online" %] catalog › Your checkout history +[% INCLUDE 'doc-head-open.inc' %] +[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › Your checkout history [% INCLUDE 'doc-head-close.inc' %]