Bug 16144 - Patron search fails when using Korean (pootle/translate error)
Summary: Patron search fails when using Korean (pootle/translate error)
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: translate.koha-community.org (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor (vote)
Assignee: Bernardo Gonzalez Kriegel
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-24 05:07 UTC by Mason James
Modified: 2016-12-05 21:22 UTC (History)
4 users (show)

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


Attachments
pic 1 (199.13 KB, image/png)
2016-03-24 05:08 UTC, Mason James
Details
pic 2 (358.47 KB, image/png)
2016-03-24 05:09 UTC, Mason James
Details
pic 3 (223.09 KB, image/png)
2016-03-24 05:09 UTC, Mason James
Details
Bug 16144: Remove 'dt_*' from translation strings when possible (1.47 KB, patch)
2016-04-04 17:30 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
Bug 16144: Remove 'dt_*' from translation strings when possible (1.47 KB, patch)
2016-04-04 17:40 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Mason James 2016-03-24 05:07:32 UTC
I bumped into a rather strange and obscure bug when using the 'Korean' language in staff

Here are the steps to replicate...
1/ set you lang to 'en'

2/ do a member search on any string (that returns multiple results)
 observe that results are displayed OK (see pic 1)

3/ set your language to Korean
 
4/ repeat step 2, and observe the following datatables error, (see pic2)
  
  "DataTables warning: table id=memberresultst - Requested unknown parameter 'dt_cardnumber' for row 0. For more information about this error, please see http://datatables.net/tn/4"


I noticed that the error does not occur using the 'french' language (see pic 3)

Bug discovered in 3.20.6 - i've not confirmed in master (yet)
Comment 1 Mason James 2016-03-24 05:08:52 UTC
Created attachment 49506 [details]
pic 1
Comment 2 Mason James 2016-03-24 05:09:18 UTC
Created attachment 49507 [details]
pic 2
Comment 3 Mason James 2016-03-24 05:09:45 UTC
Created attachment 49508 [details]
pic 3
Comment 4 Mason James 2016-03-24 05:28:56 UTC
(In reply to Mason James from comment #0)
> I bumped into a rather strange and obscure bug when using the 'Korean'
> language in staff
> 
> Here are the steps to replicate...
> 1/ set you lang to 'en'
> 
> 2/ do a member search on any string (that returns multiple results)
>  observe that results are displayed OK (see pic 1)
> 
> 3/ set your language to Korean
>  
> 4/ repeat step 2, and observe the following datatables error, (see pic2)
>   
>   "DataTables warning: table id=memberresultst - Requested unknown parameter
> 'dt_cardnumber' for row 0. For more information about this error, please see
> http://datatables.net/tn/4"

I imagine there may be other similar datatable errors, using other languages in Koha
Comment 5 Jonathan Druart 2016-03-29 09:48:58 UTC
It's a translation issue:

  130 #. %1$s:  END.
  131 #. %2$s:  data.cardnumber | html.
  132 #: intranet-tmpl/prog/en/modules/members/tables/members_results.tt:12
  133 #, c-format
  134 msgid "\", %s \"dt_cardnumber\": \"%s\", \"dt_name\": \""
  135 msgstr "\", %s \"dt_카드숫자\": \"%s\", \"dt_이름\": \""


dt_cardnumber and dt_name should not have been translated.
Comment 6 Mason James 2016-04-04 04:14:20 UTC
(In reply to Jonathan Druart from comment #5)
> It's a translation issue:
> 
>   130 #. %1$s:  END.
>   131 #. %2$s:  data.cardnumber | html.
>   132 #: intranet-tmpl/prog/en/modules/members/tables/members_results.tt:12
>   133 #, c-format
>   134 msgid "\", %s \"dt_cardnumber\": \"%s\", \"dt_name\": \""
>   135 msgstr "\", %s \"dt_카드숫자\": \"%s\", \"dt_이름\": \""
> 
> 
> dt_cardnumber and dt_name should not have been translated.

aah yes, of course!

folks, what's the best way for me to correct this typo?
i can't seem to correct this typo via 'pootle', is it possible?
Comment 7 Katrin Fischer 2016-04-04 06:15:50 UTC
As the error is in the po file, it can be corrected via Pootle - but you might not be able to submit your change directly, depending on permissions. Maybe bring it to the koha-translate mailing list?
Comment 8 Bernardo Gonzalez Kriegel 2016-04-04 17:30:12 UTC Comment hidden (obsolete)
Comment 9 Bernardo Gonzalez Kriegel 2016-04-04 17:40:20 UTC
Created attachment 49869 [details] [review]
Bug 16144: Remove 'dt_*' from translation strings when possible

This patch removes strings form translation files that have
'dt_*' variables besides puntuation, html constructs, etc.

To test:
1) Update strings for any language
2) Check for strings with 'dt_*', eg. for es-ES
msgcat --no-wrap po/es-ES-staff-prog.po | egrep ^msgid | egrep "dt_"

3) Apply the patch & update again

4) Compare similar strings, there are now a few less strings

This does not remove all occurrences, there's no easy way
to do that.
Comment 10 Bernardo Gonzalez Kriegel 2016-04-04 17:40:56 UTC
My patch remove some of the problematic strings, but not all.
To fix this you need to edit translation file in pootle, I can help
to identify those strings.
Comment 11 Jonathan Druart 2016-04-11 11:05:48 UTC
Bernardo, I don't know if we should manage these kind of exceptions.
Especially when it does not catch all the strings.
Comment 12 Bernardo Gonzalez Kriegel 2016-04-11 11:35:00 UTC
(In reply to Jonathan Druart from comment #11)
> Bernardo, I don't know if we should manage these kind of exceptions.
> Especially when it does not catch all the strings.

I think you are right, it only catch ~5 strings.
Switch to wontfix?
Comment 13 Jonathan Druart 2016-04-12 07:52:40 UTC
(In reply to Bernardo Gonzalez Kriegel from comment #12)
> (In reply to Jonathan Druart from comment #11)
> > Bernardo, I don't know if we should manage these kind of exceptions.
> > Especially when it does not catch all the strings.
> 
> I think you are right, it only catch ~5 strings.
> Switch to wontfix?

If it has been fixed on pootle, we can mark it as resolved.
Comment 14 Bernardo Gonzalez Kriegel 2016-04-12 11:51:43 UTC
(In reply to Jonathan Druart from comment #13)
> 
> If it has been fixed on pootle, we can mark it as resolved.

Yes, those entries have been marked as fuzzy on pootle for 3.20 & 3.22