Bug 18703 - Translatability: Resolve some remaining %%] problems for staff client...
authorMarc Véron <veron@veron.ch>
Tue, 30 May 2017 18:44:30 +0000 (20:44 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 16 Jun 2017 20:04:08 +0000 (17:04 -0300)
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 <josef.moravec@gmail.com>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>

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

index c635b07..1b4efda 100644 (file)
@@ -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=' %]
 
                 <span class="seefrom">used for/see from:</span>
                 [% FOREACH seefro IN summary.seefrom %]
                     <div class="authref">
-                    [% 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 %]
                     </div>
                 [% END %]
             </div>
                 <span class="seealso">see also:</span>
                 [% FOREACH seeals IN summary.seealso %]
                     <div class="authref">
-                    [% 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 %]
                     </div>
                 [% END %]
             </div>
index 8d90fa9..8bc4a5c 100644 (file)
@@ -69,8 +69,7 @@
 <ul>
     [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]
         [% IF ( circview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% borrowernumber %]">Check out</a></li>
-        [% 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 ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% borrowernumber %]&amp;batch=1">Batch check out</a></li>
         [% END %]
     [% END %]
index 2492ec6..76226a0 100644 (file)
     [% END %]
     <option value="pb">Publisher</option>
     <option value="pl">Publisher location</option>
-    [%#
-        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' %]
     <option value="yr,st-year">Publication date (yyyy-yyyy)</option>
     <option value="acqdate,st-date-normalized">Acquisition date (yyyy-mm-dd)</option>
 </select>
index ed58a96..ae5117d 100644 (file)
@@ -39,8 +39,7 @@ $(document).ready(function() {
         <h4>Checked out [% total %] times</h4>
         <table id="table_issues">
             <thead><tr>
-            [% IF Koha.Preference('intranetreadinghistory')
-              AND CAN_user_circulate_circulate_remaining_permissions %]
+            [% IF Koha.Preference('intranetreadinghistory') AND CAN_user_circulate_circulate_remaining_permissions %]
             <th>Patron</th>
             [% END %]
             <th>Barcode</th>
@@ -53,8 +52,7 @@ $(document).ready(function() {
             <tbody>
         [% FOREACH issue IN issues %]
             <tr>
-                [% IF Koha.Preference('intranetreadinghistory')
-                  AND CAN_user_circulate_circulate_remaining_permissions %]
+                [% IF Koha.Preference('intranetreadinghistory') AND CAN_user_circulate_circulate_remaining_permissions %]
                 <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% issue.borrowernumber %]">[% IF HidePatronName %][% issue.cardnumber %][% ELSE %][% issue.surname %][% IF ( issue.firstname ) %], [% issue.firstname %][% END %][% END %]</a></td>
                 [% END %]
                 <td>[% IF ( issue.barcode ) %]
index 5d56d56..a5e76ea 100644 (file)
         </div><!-- /yui-u -->
 </div><!-- /yui-g -->
 <div class="yui-g">
-            [% 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) %]
                 <div id="area-pending">
                     [% IF pending_article_requests %]
                     <div class="pending-info" id="article_requests_pending">
index fecf80d..40fc42d 100644 (file)
                                         <label for="ignore_modify_[% pm.borrowernumber %]">Ignore</label>
                                         | <a target="_blank" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% pm.borrowernumber %]" >Patron details</a>
                                     </div>
-                                  [% 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 %]
                                     <div class="members-update-table">
                                         <table>