From a704e04e9675e9597632b3e6f65cef6854744b97 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marc=20V=C3=A9ron?= Date: Tue, 30 May 2017 20:44:30 +0200 Subject: [PATCH] Bug 18703 - Translatability: Resolve some remaining %%] problems for staff client in 6 Files There are some more files that expose parts of tt diretives to translations, mostly due to line breaks inside directives. Files covered with this Bug: koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search-results.inc koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc koha-tmpl/intranet-tmpl/prog/en/includes/search_indexes.inc koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt koha-tmpl/intranet-tmpl/prog/en/modules/members/members-update.tt To test: - Review code, verify that line breaks are removed - Run QA tools - Bonus test: Create a "language" aa-AA and verify that no fragments containign %%] are picked for the 6 files Signed-off-by: Josef Moravec Signed-off-by: Brendan A Gallagher (cherry picked from commit 9fb5f8519f2937aa7db6b53d6501f09ada11db4f) Signed-off-by: Fridolin Somers --- .../includes/authorities-search-results.inc | 28 ++++++------------- .../prog/en/includes/circ-menu.inc | 3 +- .../prog/en/includes/search_indexes.inc | 14 ++++------ .../prog/en/modules/catalogue/issuehistory.tt | 6 ++-- .../prog/en/modules/intranet-main.tt | 9 ++---- .../prog/en/modules/members/members-update.tt | 3 +- 6 files changed, 21 insertions(+), 42 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search-results.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search-results.inc index c635b07afd..1b4efda72c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search-results.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search-results.inc @@ -1,11 +1,9 @@ [% BLOCK showreference %] -[%# - Parameters: - heading: the heading itself - linkType: currently 'seefrom' or 'seealso', controls the label for the entry - type: - authid: if it is a linked authority, its authid -%] +[%# Parameters: %] +[%# heading: the heading itself %] +[%# linkType: currently 'seefrom' or 'seealso', controls the label for the entry type: %] +[%# authid: if it is a linked authority, its authid %] + [% SET authidurl = '/cgi-bin/koha/authorities/detail.pl?authid=' %] [% SET searchurl = '/cgi-bin/koha/authorities/authorities-home.pl?op=do_search&type=intranet&marclist=any&operator=contains&orderby=HeadingAsc&value=' %] @@ -102,12 +100,8 @@ used for/see from: [% FOREACH seefro IN summary.seefrom %]
- [% PROCESS showreference - heading=seefro.heading - linkType='seefrom' - type=seefro.type - authid=seefro.authid - %] + [%# Following on one line for translatability %] + [% PROCESS showreference heading=seefro.heading linkType='seefrom' type=seefro.type authid=seefro.authid %]
[% END %] @@ -117,12 +111,8 @@ see also: [% FOREACH seeals IN summary.seealso %]
- [% PROCESS showreference - heading=seeals.heading - linkType='seealso' - type=seeals.type - authid=seeals.authid - %] + [%# Following on one line for translatability %] + [% PROCESS showreference heading=seeals.heading linkType='seealso' type=seeals.type authid=seeals.authid %]
[% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc index 8d90fa97b4..8bc4a5c70a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc @@ -69,8 +69,7 @@
    [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %] [% IF ( circview ) %]
  • [% ELSE %]
  • [% END %]Check out
  • - [% IF Koha.Preference('BatchCheckouts') && - Koha.Preference('BatchCheckoutsValidCategories').split('\|').grep('^' _ categorycode _ '$').size > 0 %] + [% IF Koha.Preference('BatchCheckouts') && Koha.Preference('BatchCheckoutsValidCategories').split('\|').grep('^' _ categorycode _ '$').size > 0 %] [% IF ( batch_checkout_view ) %]
  • [% ELSE %]
  • [% END %]Batch check out
  • [% END %] [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/search_indexes.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/search_indexes.inc index 2492ec61c6..76226a0b04 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/search_indexes.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/search_indexes.inc @@ -40,15 +40,13 @@ [% END %] - [%# - Use non-normalized st-year instead of st-numeric, - since pubdate can include 'u' to signify unkown - dates. See "Legal Characters" at: - http://www.loc.gov/marc/bibliographic/bd008a.html - This search is also for date ranges due to the - special Zebra r=r CCL mapping for 'yr' - %] + [%# Use non-normalized st-year instead of st-numeric, %] + [%# since pubdate can include 'u' to signify unkown %] + [%# dates. See "Legal Characters" at: %] + [%# http://www.loc.gov/marc/bibliographic/bd008a.html %] + [%# This search is also for date ranges due to the %] + [%# special Zebra r=r CCL mapping for 'yr' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt index ed58a961e0..ae5117d98d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt @@ -39,8 +39,7 @@ $(document).ready(function() {

    Checked out [% total %] times

    - [% IF Koha.Preference('intranetreadinghistory') - AND CAN_user_circulate_circulate_remaining_permissions %] + [% IF Koha.Preference('intranetreadinghistory') AND CAN_user_circulate_circulate_remaining_permissions %] [% END %] @@ -53,8 +52,7 @@ $(document).ready(function() { [% FOREACH issue IN issues %] - [% IF Koha.Preference('intranetreadinghistory') - AND CAN_user_circulate_circulate_remaining_permissions %] + [% IF Koha.Preference('intranetreadinghistory') AND CAN_user_circulate_circulate_remaining_permissions %] [% END %]
    PatronBarcode
    [% IF HidePatronName %][% issue.cardnumber %][% ELSE %][% issue.surname %][% IF ( issue.firstname ) %], [% issue.firstname %][% END %][% END %][% IF ( issue.barcode ) %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt index 5d56d56903..a5e76ea0d8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt @@ -108,13 +108,8 @@
    - [% IF ( ( CAN_user_tools_moderate_comments && pendingcomments ) - || ( CAN_user_tools_moderate_tags && pendingtags ) - || ( CAN_user_borrowers && pending_borrower_modifications ) - || ( CAN_user_acquisition && pendingsuggestions ) - || ( CAN_user_borrowers && pending_discharge_requests ) - || pending_article_requests - ) %] + [%# Following statment must be in one line for translatability %] + [% IF ( ( CAN_user_tools_moderate_comments && pendingcomments ) || ( CAN_user_tools_moderate_tags && pendingtags ) || ( CAN_user_borrowers && pending_borrower_modifications ) || ( CAN_user_acquisition && pendingsuggestions ) || ( CAN_user_borrowers && pending_discharge_requests ) || pending_article_requests) %]
    [% IF pending_article_requests %]
    diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/members-update.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/members-update.tt index fecf80d9b8..40fc42d26c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/members-update.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/members-update.tt @@ -114,8 +114,7 @@ | Patron details
    - [% IF !pm.extended_attributes and pm.size > 3 or - pm.extended_attributes and pm.size > 4 %] + [% IF !pm.extended_attributes and pm.size > 3 or pm.extended_attributes and pm.size > 4 %] [%# timestamp+verification_token+borrowernumber=3 %]
    -- 2.39.5