Bug 14030

Summary: Add Georgian language and fix Kannada language code
Product: Koha Reporter: Bernardo Gonzalez Kriegel <bgkriegel>
Component: I18N/L10NAssignee: Bugs List <koha-bugs>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: f.demians, mtompset, tomascohen
Version: Main   
Hardware: All   
OS: All   
See Also: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14678
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 14030: Add Georgian language and fix Kannada language code
Bug 14030 - Added tests for duplicates.
Bug 14030: Add Georgian language and fix Kannada language code
Bug 14030 - Added tests for duplicates.
[SIGNED-OFF] Bug 14030 - Added tests for duplicates.
[PASSED QA] Bug 14030: Add Georgian language and fix Kannada language code
[PASSED QA] [PASSED QA] Bug 14030 - Added tests for duplicates.

Description Bernardo Gonzalez Kriegel 2015-04-20 23:46:41 UTC
Add Georgian language

Georgian - ka - geo - ქართული

Fix Kannada language ISO639-1 code

From 'ka' to 'kn'
Comment 1 Bernardo Gonzalez Kriegel 2015-04-21 01:12:53 UTC Comment hidden (obsolete)
Comment 2 Mark Tompsett 2015-04-21 06:18:12 UTC
Comment on attachment 38224 [details] [review]
Bug 14030: Add Georgian language and fix Kannada language code

Review of attachment 38224 [details] [review]:
-----------------------------------------------------------------

::: installer/data/mysql/atomicupdate/bug_14030-Add_Georgian_fix_Kannada_code.sql
@@ +1,3 @@
> +UPDATE language_subtag_registry SET subtag = 'kn' WHERE subtag = 'ka' AND description = 'Kannada';
> +
> +UPDATE language_rfc4646_to_iso639 SET rfc4646_subtag = 'kn' WHERE rfc4646_subtag = 'ka' AND iso639_2_code = 'kan';

Good idea to include the iso639_2_code in the condition. Makes it runnable multiple times (not that one should).
Comment 3 Mark Tompsett 2015-04-21 07:36:01 UTC
I'm wondering, are the id columns of the language tables even used? If so, where? If not, then why don't we have unique constraints that actually mean that we could write this SQL such that it could be run multiple times?
Comment 4 Mark Tompsett 2015-04-22 02:19:38 UTC Comment hidden (obsolete)
Comment 5 Mark Tompsett 2015-04-22 02:35:26 UTC Comment hidden (obsolete)
Comment 6 Mark Tompsett 2015-04-22 02:35:32 UTC Comment hidden (obsolete)
Comment 7 Mark Tompsett 2015-04-22 02:36:24 UTC
I can't sign off my own patches, hence we still need sign off. :)
Comment 8 Bernardo Gonzalez Kriegel 2015-04-22 15:07:41 UTC Comment hidden (obsolete)
Comment 9 Katrin Fischer 2015-04-22 19:07:25 UTC
Created attachment 38356 [details] [review]
[PASSED QA] Bug 14030: Add Georgian language and fix Kannada language code

This patch adds Georgian language and a fix wrong language code

Language added: Georgian - ka - geo
I selected 'geo' for ISO639-2 instead of 'kat' because it's the
same code form http://www.loc.gov/marc/languages/language_code.html

Also a fix is needed to Kannada ISO639-1 code, from 'ka' to 'kn'

To test:
1) Apply the patch
2) Run updatedatabase.pl (once)
3) Check language, e.g. go to staff > search > More options > Limits
and search for Georgian on language list

I only added language code 'ka', not script 'Geor' nor country 'GE',
the plan is to name translation files 'ka-*', but can ammend the patch
if needed.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 10 Katrin Fischer 2015-04-22 19:07:37 UTC
Created attachment 38357 [details] [review]
[PASSED QA] [PASSED QA] Bug 14030 - Added tests for duplicates.

It seems that the id's are not really used, but rather
the subtags, types, and language related fields.

These tests check for duplicates.

TEST PLAN
---------
1) Apply both patches
2) prove -v t/db_dependent/Languages.t
   -- may fail if you have duplicates.
3) ./installer/data/mysql/updatedatabase.pl
   -- this will trigger the atomicupdate, which because of
      this tweak, will correct duplicates.
4) prove -v t/db_dependent/Languages.t
   -- should succeed.
5) Run the updatedatabase.pl script multiple times.
6) prove -v t/db_dependent/Languages.t
   -- should still succeed.
7) koha qa test tools.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
No koha-qa errors, test run successfully, no more duplicates

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixed German description.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 11 Tomás Cohen Arazi 2015-04-24 13:06:44 UTC
Patches pushed to master.

Well done Bernardo! First patchset to use the new atomicupdate schema!