Bug 14485 - HTML comment disables translation in cataloguing/addbooks.tt
Summary: HTML comment disables translation in cataloguing/addbooks.tt
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: Fridolin SOMERS
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-02 08:07 UTC by Fridolin SOMERS
Modified: 2016-12-05 21:23 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: String patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 14485 - HTML comment disables translation in cataloguing/addbooks.tt (1.54 KB, patch)
2015-07-02 08:43 UTC, Fridolin SOMERS
Details | Diff | Splinter Review
Bug 14485 - HTML comment disables translation in cataloguing/addbooks.tt (1.93 KB, patch)
2015-07-03 15:46 UTC, Fridolin SOMERS
Details | Diff | Splinter Review
Bug 14485 - HTML comment disables translation in cataloguing/addbooks.tt (2.13 KB, patch)
2015-07-04 06:02 UTC, Héctor Eduardo Castro Avalos
Details | Diff | Splinter Review
Bug 14485 - HTML comment disables translation in cataloguing/addbooks.tt (2.20 KB, patch)
2015-07-09 07:53 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 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