Bug 14030 - Add Georgian language and fix Kannada language code
Summary: Add Georgian language and fix Kannada language code
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: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-20 23:46 UTC by Bernardo Gonzalez Kriegel
Modified: 2016-12-05 21:23 UTC (History)
3 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
Bug 14030: Add Georgian language and fix Kannada language code (4.75 KB, patch)
2015-04-21 01:12 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
Bug 14030 - Added tests for duplicates. (4.95 KB, patch)
2015-04-22 02:19 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 14030: Add Georgian language and fix Kannada language code (4.79 KB, patch)
2015-04-22 02:35 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 14030 - Added tests for duplicates. (4.95 KB, patch)
2015-04-22 02:35 UTC, Mark Tompsett
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 14030 - Added tests for duplicates. (5.08 KB, patch)
2015-04-22 15:07 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
[PASSED QA] Bug 14030: Add Georgian language and fix Kannada language code (4.86 KB, patch)
2015-04-22 19:07 UTC, Katrin Fischer
Details | Diff | Splinter Review
[PASSED QA] [PASSED QA] Bug 14030 - Added tests for duplicates. (6.20 KB, patch)
2015-04-22 19:07 UTC, Katrin Fischer
Details | Diff | Splinter Review

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