Bug 16871: Translatability: Avoid [%%-problem and fix related sentence splitting...
authorMarc Véron <veron@veron.ch>
Tue, 5 Jul 2016 05:14:26 +0000 (07:14 +0200)
committerBrendan Gallagher <brendan@bywatersolutions.com>
Thu, 4 Aug 2016 20:01:31 +0000 (20:01 +0000)
In koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt,
fix line splitted TT directives and sentence splitting leading
to translatability problems. (See first comment).

To test:
- Apply patch
- Go to detail pages of biblios with waiting holds
- Verify that messages in column 'Status' are OK
- Examine code in patch to make sure that the simplification in logic
  makes sense and that no TT directive is splitted
- Bonus test:
  - Go to folder misc/translator. Run perl translate create xx-XX
  - Verify that monster mentioned in first comment no longer exists
    (in po/xx-XX-staff-prog.po)

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised

Amended for wording (comment #5) 2016-07-26 mv

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt

index e9030bf..0e4773d 100644 (file)
@@ -715,41 +715,21 @@ function verify_images() {
 
                         [% IF ( item.reservedate ) %]
                             [% IF ( item.waitingdate ) %]
-                                Waiting
+                                Waiting at [% item.ExpectedAtLibrary %] since [% item.waitingdate | $KohaDates %].
                             [% ELSE %]
-                                Item-level hold
+                                Item-level hold (placed [% item.reservedate | $KohaDates %]) for delivery at [% item.ExpectedAtLibrary %].
                             [% END %]
                             [% IF ( canreservefromotherbranches ) %]
-                                for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% item.ReservedForBorrowernumber %]">
+                                Hold for: <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% item.ReservedForBorrowernumber %]">
                                     [% IF ( item.hidepatronname ) %]
                                         [% item.Reservedcardnumber %]
                                     [% ELSE %]
-                                        [% item.ReservedForFirstname %] [% item.ReservedForSurname %]
+                                        [% item.ReservedForFirstname _ item.ReservedForSurname _ " (" _ item.Reservedcardnumber _ ")" %]
                                     [% END %]
                                 </a>
                             [% END %]
-                            [% IF ( item.waitingdate ) %]
-                                at[% ELSE %]for delivery at
-                            [% END %]
-                            [% item.ExpectedAtLibrary %]
-                            [% IF ( item.waitingdate ) %]
-                                since [% item.waitingdate | $KohaDates %]
-                            [% ELSE %]
-                                [% IF ( item.reservedate ) %]
-                                    (placed [% item.reservedate | $KohaDates %])
-                                [% END %]
-                            [% END %]
                         [% END %]
-                        [% UNLESS (
-                               item.itemnotforloan
-                            or item.notforloan_per_itemtype
-                            or item.onloan
-                            or item.itemlost
-                            or item.withdrawn
-                            or item.damaged
-                            or item.transfertwhen
-                            or item.reservedate
-                        ) %]
+                        [% UNLESS ( item.itemnotforloan || item.notforloan_per_itemtype || item.onloan || item.itemlost || item.withdrawn || item.damaged || item.transfertwhen || item.reservedate ) %]
                             Available
                         [% END %]