[Koha-patches] [PATCH] Update language mappings to fix Bug 5311
Jared Camins-Esakov
jcamins at cpbibliography.com
Sat Oct 23 20:57:54 CEST 2010
This patch updates the language_rfc4646_to_iso639 mapping table with the
correct mappings for several languages that were not mapped correctly to
the codes used in MARC, including Finnish (which was not mapped at all),
and Armenian (which was mapped to an obsolete code). This patch also
changes English and French to use the proper three-letter codes, which
will eliminate false positives when, for example, limiting by French
brings up results in Afrikaans.
---
.../data/mysql/en/mandatory/subtag_registry.sql | 30 ++++++++++++++------
1 files changed, 21 insertions(+), 9 deletions(-)
diff --git a/installer/data/mysql/en/mandatory/subtag_registry.sql b/installer/data/mysql/en/mandatory/subtag_registry.sql
index f2e0648..852805d 100644
--- a/installer/data/mysql/en/mandatory/subtag_registry.sql
+++ b/installer/data/mysql/en/mandatory/subtag_registry.sql
@@ -68,7 +68,7 @@ INSERT INTO language_subtag_registry( subtag, type, description, added)
VALUES ( 'hy', 'language', 'Armenian','2005-10-16');
INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code)
-VALUES( 'hy','hy');
+VALUES( 'hy','arm');
INSERT INTO language_descriptions(subtag, type, lang, description)
VALUES ( 'hy', 'language', 'hy', 'Հայերէն');
@@ -164,7 +164,7 @@ INSERT INTO language_subtag_registry( subtag, type, description, added)
VALUES ( 'en', 'language', 'English','2005-10-16' );
INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code)
-VALUES( 'en','en');
+VALUES( 'en','eng');
INSERT INTO language_descriptions(subtag, type, lang, description)
VALUES( 'en', 'language', 'en', 'English');
@@ -172,10 +172,13 @@ VALUES( 'en', 'language', 'en', 'English');
INSERT INTO language_descriptions(subtag, type, lang, description)
VALUES( 'en', 'language', 'fr', 'Anglais');
--- English
+-- Finnish
INSERT INTO language_subtag_registry( subtag, type, description, added)
VALUES ( 'fi', 'language', 'Finnish','2005-10-16' );
+INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code)
+VALUES( 'fi','fin');
+
INSERT INTO language_descriptions(subtag, type, lang, description)
VALUES( 'fi', 'language', 'fi', 'suomi');
@@ -187,7 +190,7 @@ INSERT INTO language_subtag_registry( subtag, type, description, added)
VALUES ( 'fr', 'language', 'French','2005-10-16' );
INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code)
-VALUES( 'fr','fr');
+VALUES( 'fr','fre');
INSERT INTO language_descriptions(subtag, type, lang, description)
VALUES( 'fr', 'language', 'en', 'French');
@@ -202,8 +205,8 @@ VALUES( 'fr', 'language', 'fr', 'Français');
INSERT INTO language_subtag_registry( subtag, type, description, added)
VALUES ( 'lo', 'language', 'Lao','2005-10-16' );
--- INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code)
--- VALUES( 'lo','nor'); ???
+INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code)
+VALUES( 'lo','lao');
INSERT INTO language_descriptions(subtag, type, lang, description)
VALUES( 'lo', 'language', 'lo', 'ພາສາລາວ');
@@ -312,7 +315,7 @@ INSERT INTO language_subtag_registry( subtag, type, description, added)
VALUES ( 'it', 'language', 'Italian','2005-10-16' );
INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code)
-VALUES( 'it','ind');
+VALUES( 'it','ita');
INSERT INTO language_descriptions(subtag, type, lang, description)
VALUES( 'it', 'language', 'it', 'Italiano');
@@ -371,7 +374,7 @@ VALUES( 'la', 'language', 'en', 'Latin');
INSERT INTO language_descriptions(subtag, type, lang, description)
VALUES( 'la', 'language', 'fr', 'Latin');
--- Galacian
+-- Galician
INSERT INTO language_subtag_registry( subtag, type, description, added)
VALUES ( 'gl', 'language', 'Galician','2005-10-16' );
@@ -485,6 +488,9 @@ VALUES( 'ru', 'language', 'fr', 'Russe');
INSERT INTO language_subtag_registry( subtag, type, description, added)
VALUES ( 'sr', 'language', 'Serbian','2005-10-16' );
+INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code)
+VALUES( 'sr','srp');
+
INSERT INTO language_descriptions(subtag, type, lang, description)
VALUES( 'sr', 'language', 'sr', 'српски');
@@ -527,6 +533,9 @@ VALUES( 'sv', 'language', 'fr', 'Suédois');
INSERT INTO language_subtag_registry( subtag, type, description, added)
VALUES ( 'tet', 'language', 'Tetum','2005-10-16' );
+INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code)
+VALUES( 'tet','tet');
+
INSERT INTO language_descriptions(subtag, type, lang, description)
VALUES( 'tet', 'language', 'tet', 'tetun');
@@ -582,10 +591,13 @@ VALUES( 'uk', 'language', 'en', 'Ukranian');
INSERT INTO language_descriptions(subtag, type, lang, description)
VALUES( 'uk', 'language', 'fr', 'Ukrainien');
--- English
+-- Urdu
INSERT INTO language_subtag_registry( subtag, type, description, added)
VALUES ( 'ur', 'language', 'Urdu','2005-10-16' );
+INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code)
+VALUES( 'ur','urd');
+
INSERT INTO language_descriptions(subtag, type, lang, description)
VALUES( 'ur', 'language', 'en', 'Urdu');
--
1.7.0.4
More information about the Koha-patches
mailing list