Bug 16871: Translatability: Avoid [%%-problem and fix related sentence splitting in catalogue/detail.tt

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>
(cherry picked from commit 13004a8c64)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
(cherry picked from commit 536acf3120)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
This commit is contained in:
Marc Véron 2016-07-05 07:14:26 +02:00 committed by Julian Maurice
parent 9a19c7d35a
commit 0b3afeef40
1 changed files with 5 additions and 25 deletions

View File

@ -692,41 +692,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 %]