Bug 16871 - Translatability: Avoid [%%-problem and fix related sentence splitting in catalogue/detail.tt
Summary: Translatability: Avoid [%%-problem and fix related sentence splitting in cata...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: I18N/L10N (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Marc Véron
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 17200
  Show dependency treegraph
 
Reported: 2016-07-07 15:25 UTC by Marc Véron
Modified: 2017-12-07 22:15 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 16871 - Translatability: Avoid [%%-problem and fix related sentence splitting in catalogue/detail.tt (4.12 KB, patch)
2016-07-07 15:48 UTC, Marc Véron
Details | Diff | Splinter Review
[SIGNED-OFF]Bug 16871: Translatability: Avoid [%%-problem and fix related sentence splitting in catalogue/detail.tt (4.20 KB, patch)
2016-07-18 17:10 UTC, Héctor Eduardo Castro Avalos
Details | Diff | Splinter Review
Bug 16871: Translatability: Avoid [%%-problem and fix related sentence splitting in catalogue/detail.tt (4.24 KB, patch)
2016-07-26 13:00 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 16871: Translatability: Avoid [%%-problem and fix related sentence splitting in catalogue/detail.tt (4.24 KB, patch)
2016-08-01 13:58 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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