Bug 14485

Summary: HTML comment disables translation in cataloguing/addbooks.tt
Product: Koha Reporter: Fridolin Somers <fridolin.somers>
Component: I18N/L10NAssignee: Fridolin Somers <fridolin.somers>
Status: CLOSED FIXED QA Contact:
Severity: minor    
Priority: P5 - low CC: chris, f.demians, hector.hecaxmmx, jonathan.druart, liz, mtj, tomascohen
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: String patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 14485 - HTML comment disables translation in cataloguing/addbooks.tt
Bug 14485 - HTML comment disables translation in cataloguing/addbooks.tt
Bug 14485 - HTML comment disables translation in cataloguing/addbooks.tt
Bug 14485 - HTML comment disables translation in cataloguing/addbooks.tt

Description Fridolin Somers 2015-07-02 08:07:50 UTC
In cataloguing/addbooks.tt, the line :
  [% total %] result(s) found in catalog,
is not present in PO files even after an update.
I've found that the cause is the previous HTML comment line.
Comment 1 Fridolin Somers 2015-07-02 08:43:00 UTC Comment hidden (obsolete)
Comment 2 Fridolin Somers 2015-07-02 08:51:41 UTC
Maybe there are other places where HTML comment should be converted.

In my opinion, HTML comments should not be used since we can use TT comments.
Comment 3 Jonathan Druart 2015-07-02 14:30:16 UTC
Fridolin,

I am not sure it's right fix.
In the po files, I get:

  msgid "%s %s No results found %s %s %s %s result(s) found in catalog, "

Which is not easily translatable.

I'd suggest to put span around the strings in order to have something like:

  msgid "%s result(s) found in catalog,"
and
  msgid "No results found"

By the way this second string is already translated.
Comment 4 Fridolin Somers 2015-07-03 15:42:26 UTC
(In reply to Jonathan Druart from comment #3)
Yep, that was one of my ideas.
I propose a even a div.

We should fix the fact that TT comments should not be translated.
Comment 5 Fridolin Somers 2015-07-03 15:46:03 UTC Comment hidden (obsolete)
Comment 6 Héctor Eduardo Castro Avalos 2015-07-04 06:02:57 UTC Comment hidden (obsolete)
Comment 7 Jonathan Druart 2015-07-09 07:53:19 UTC
Created attachment 40858 [details] [review]
Bug 14485 - HTML comment disables translation in cataloguing/addbooks.tt

In cataloguing/addbooks.tt, the line :
  [% total %] result(s) found in catalog,
is not present in PO files even after an update.
I've found that the cause is the previous HTML comment line.

This patch converts HTML comment into TT comment and adds a div to have a more comprehensive string to translate.

Test plan :
- without patch
- go into <sources>/misc/translator
- run PO update for example in french : translate update fr-FR
=> the text "result(s) found in catalog" is missing from PO file : fr-FR-staff-prog.po
- restore default PO files
- apply patch
- go into <sources>/misc/translator
- run PO update for example in french : translate update fr-FR
=> You find text "result(s) found in catalog" in PO file : fr-FR-staff-prog.po

Sponsored-by: Universidad de El Salvador

Signed-off-by: Hector Eduardo Castro Avalos <hector.hecaxmmx@gmail.com>
Works as advertised. Just one msgid appear with msgid "%s result(s) found in catalog,"

Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Comment 8 Tomás Cohen Arazi 2015-07-10 14:01:34 UTC
Patch pushed to master.

Thanks Frido!
Comment 9 Chris Cormack 2015-07-14 20:39:22 UTC
Pushed to 3.20.x will be in 3.20.2
Comment 10 Liz Rea 2015-07-20 22:16:58 UTC
Pushed to 3.18.x will be in 3.18.09
Comment 11 Mason James 2015-07-25 13:11:59 UTC
Pushed to 3.16.x, will be in 3.16.13