Bug 16871

Summary: Translatability: Avoid [%%-problem and fix related sentence splitting in catalogue/detail.tt
Product: Koha Reporter: Marc Véron <veron>
Component: I18N/L10NAssignee: Marc Véron <veron>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: brendan, claire_gravely, f.demians, hector.hecaxmmx, jonathan.druart, julian.maurice
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16559
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10492
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on:    
Bug Blocks: 17200    
Attachments: Bug 16871 - Translatability: Avoid [%%-problem and fix related sentence splitting in catalogue/detail.tt
[SIGNED-OFF]Bug 16871: Translatability: Avoid [%%-problem and fix related sentence splitting in catalogue/detail.tt
Bug 16871: Translatability: Avoid [%%-problem and fix related sentence splitting in catalogue/detail.tt
Bug 16871: Translatability: Avoid [%%-problem and fix related sentence splitting in catalogue/detail.tt

Description Marc Véron 2016-07-07 15:25:39 UTC
In koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt,
fix line splitted TT directives and sentence splitting leading
to translatability problems with following, errorprone monster:

%s %s at%sfor delivery at %s %s %s since %s %s %s (placed %s) %s %s %s [%% 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 ) %%] Available %s %s
Comment 1 Marc Véron 2016-07-07 15:48:08 UTC Comment hidden (obsolete)
Comment 2 Héctor Eduardo Castro Avalos 2016-07-18 17:10:15 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2016-07-25 17:35:58 UTC
1/ Looking at the logic it seems that reservedate could be missing (?)

2/ Before the patch the string was "waiting at LIBRARY since DATE", now it's "waiting since DATE at LIBRARY". I don't think it represents a big change but I would prefer to get the opinion of English native speakers.
Comment 4 Marc Véron 2016-07-26 12:28:59 UTC
(In reply to Jonathan Druart from comment #3)
> 1/ Looking at the logic it seems that reservedate could be missing (?)
(...)

We had two conditions [% IF ( item.waitingdate ) %] at the same level (line 693ff and 707ff before patch). I merged them (line 693ff with patch), including reservedate.


> 2/ Before the patch the string was "waiting at LIBRARY since DATE", now it's
> "waiting since DATE at LIBRARY". I don't think it represents a big change
> but I would prefer to get the opinion of English native speakers.

I will ask on IRC.
Comment 5 Claire Gravely 2016-07-26 12:44:19 UTC
Responding from IRC conversation:

You would want to use "waiting at LIBRARY since DATE". The other sentence structure doesn't sound right.
Comment 6 Marc Véron 2016-07-26 13:00:49 UTC Comment hidden (obsolete)
Comment 7 Jonathan Druart 2016-08-01 13:58:16 UTC
Created attachment 53838 [details] [review]
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
Comment 8 Jonathan Druart 2016-08-01 13:58:50 UTC
It's ok for me. I let the RM takes care of the wording.
Comment 9 Brendan Gallagher 2016-08-04 20:01:55 UTC
Wording is good for me...  Pushed to master.  Should be in the November 2016 release.  Thanks!
Comment 10 Frédéric Demians 2016-08-05 06:51:49 UTC
Pushed in 16.05. Will be in 16.05.03.
Comment 11 Julian Maurice 2016-08-17 13:38:49 UTC
Patch pushed to 3.22.x, will be in 3.22.10