From 091124b44e363b5b90a664e1e7fe8fcdcfe89781 Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Thu, 24 Jul 2014 14:28:31 +0200 Subject: [PATCH] Bug 12649: Add Croatian language Test scenario: 1. apply the patch 2. run updatedatabase.pl 3. install Croatian language cd misc/translator perl translate install hr-HR 4. go to Global system preferences > I18N/L10N preferences check that Hrvatski(hr-HR) is available Signed-off-by: Bernardo Gonzalez Kriegel Works, no koha-qa errors. Also tested translating to de-DE and on advanced search opac/staff is listed translated. Signed-off-by: Katrin Fischer Note: This also makes the language show up in the language pull down in advanced search. Because the entry is the last in the file, it will show last in the list. I am noting this here, the list is not really consistently sorted right now and there is work under way to change the way we handle this. Signed-off-by: Tomas Cohen Arazi --- .../mysql/de-DE/mandatory/subtag_registry.sql | 19 ++++++++++++++++++ .../mysql/en/mandatory/subtag_registry.sql | 19 ++++++++++++++++++ .../mysql/es-ES/mandatory/subtag_registry.sql | 20 +++++++++++++++++++ .../mysql/it-IT/necessari/subtag_registry.sql | 20 +++++++++++++++++++ .../nb-NO/1-Obligatorisk/subtag_registry.sql | 20 +++++++++++++++++++ .../mysql/pl-PL/mandatory/subtag_registry.sql | 20 +++++++++++++++++++ .../mysql/ru-RU/mandatory/subtag_registry.sql | 20 +++++++++++++++++++ .../mysql/uk-UA/mandatory/subtag_registry.sql | 20 +++++++++++++++++++ installer/data/mysql/updatedatabase.pl | 12 +++++++++++ 9 files changed, 170 insertions(+) diff --git a/installer/data/mysql/de-DE/mandatory/subtag_registry.sql b/installer/data/mysql/de-DE/mandatory/subtag_registry.sql index ceaae46084..1e642c04db 100755 --- a/installer/data/mysql/de-DE/mandatory/subtag_registry.sql +++ b/installer/data/mysql/de-DE/mandatory/subtag_registry.sql @@ -887,6 +887,25 @@ VALUES( 'Laoo', 'script', 'en', 'Lao'); INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'Laoo', 'script', 'de', 'Laotisch'); +-- Croatian +INSERT INTO language_subtag_registry( subtag, type, description, added) +VALUES ( 'hr', 'language', 'Croatian','2014-07-24' ); + +INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) +VALUES( 'hr','hrv'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES( 'hr', 'language', 'hr', 'Hrvatski'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES( 'hr', 'language', 'en', 'Croatian'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES( 'hr', 'language', 'fr', 'Croate'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES( 'hr', 'language', 'de', 'Kroatisch'); + -- REGIONS -- Canada diff --git a/installer/data/mysql/en/mandatory/subtag_registry.sql b/installer/data/mysql/en/mandatory/subtag_registry.sql index ceaae46084..1e642c04db 100755 --- a/installer/data/mysql/en/mandatory/subtag_registry.sql +++ b/installer/data/mysql/en/mandatory/subtag_registry.sql @@ -887,6 +887,25 @@ VALUES( 'Laoo', 'script', 'en', 'Lao'); INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'Laoo', 'script', 'de', 'Laotisch'); +-- Croatian +INSERT INTO language_subtag_registry( subtag, type, description, added) +VALUES ( 'hr', 'language', 'Croatian','2014-07-24' ); + +INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) +VALUES( 'hr','hrv'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES( 'hr', 'language', 'hr', 'Hrvatski'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES( 'hr', 'language', 'en', 'Croatian'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES( 'hr', 'language', 'fr', 'Croate'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES( 'hr', 'language', 'de', 'Kroatisch'); + -- REGIONS -- Canada diff --git a/installer/data/mysql/es-ES/mandatory/subtag_registry.sql b/installer/data/mysql/es-ES/mandatory/subtag_registry.sql index 49ad7ab955..62b97abe2c 100644 --- a/installer/data/mysql/es-ES/mandatory/subtag_registry.sql +++ b/installer/data/mysql/es-ES/mandatory/subtag_registry.sql @@ -731,6 +731,26 @@ VALUES ( 'Laoo', 'script', 'lo', 'Lao'); INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'Laoo', 'script', 'en', 'Lao'); +-- Croatian +INSERT INTO language_subtag_registry( subtag, type, description, added) +VALUES ( 'hr', 'language', 'Croatian','2014-07-24' ); + +INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) +VALUES( 'hr','hrv'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES( 'hr', 'language', 'hr', 'Hrvatski'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES( 'hr', 'language', 'en', 'Croatian'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES( 'hr', 'language', 'fr', 'Croate'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES( 'hr', 'language', 'de', 'Kroatisch'); + + -- REGIONS -- Canada INSERT INTO language_subtag_registry( subtag, type, description, added) diff --git a/installer/data/mysql/it-IT/necessari/subtag_registry.sql b/installer/data/mysql/it-IT/necessari/subtag_registry.sql index 43e5a14499..a21ed2743a 100644 --- a/installer/data/mysql/it-IT/necessari/subtag_registry.sql +++ b/installer/data/mysql/it-IT/necessari/subtag_registry.sql @@ -721,6 +721,26 @@ VALUES ( 'Laoo', 'script', 'lo', 'Lao'); INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'Laoo', 'script', 'en', 'Lao'); +-- Croatian +INSERT INTO language_subtag_registry( subtag, type, description, added) +VALUES ( 'hr', 'language', 'Croatian','2014-07-24' ); + +INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) +VALUES( 'hr','hrv'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES( 'hr', 'language', 'hr', 'Hrvatski'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES( 'hr', 'language', 'en', 'Croatian'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES( 'hr', 'language', 'fr', 'Croate'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES( 'hr', 'language', 'de', 'Kroatisch'); + + -- REGIONS -- Canada INSERT INTO language_subtag_registry( subtag, type, description, added) diff --git a/installer/data/mysql/nb-NO/1-Obligatorisk/subtag_registry.sql b/installer/data/mysql/nb-NO/1-Obligatorisk/subtag_registry.sql index f4d5409780..9748f2167f 100644 --- a/installer/data/mysql/nb-NO/1-Obligatorisk/subtag_registry.sql +++ b/installer/data/mysql/nb-NO/1-Obligatorisk/subtag_registry.sql @@ -752,6 +752,26 @@ VALUES ( 'Laoo', 'script', 'lo', 'Lao'); INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'Laoo', 'script', 'en', 'Lao'); +-- Croatian +INSERT INTO language_subtag_registry( subtag, type, description, added) +VALUES ( 'hr', 'language', 'Croatian','2014-07-24' ); + +INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) +VALUES( 'hr','hrv'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES( 'hr', 'language', 'hr', 'Hrvatski'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES( 'hr', 'language', 'en', 'Croatian'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES( 'hr', 'language', 'fr', 'Croate'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES( 'hr', 'language', 'de', 'Kroatisch'); + + -- REGIONS -- Canada INSERT INTO language_subtag_registry( subtag, type, description, added) diff --git a/installer/data/mysql/pl-PL/mandatory/subtag_registry.sql b/installer/data/mysql/pl-PL/mandatory/subtag_registry.sql index 09561a928e..d62b0079df 100644 --- a/installer/data/mysql/pl-PL/mandatory/subtag_registry.sql +++ b/installer/data/mysql/pl-PL/mandatory/subtag_registry.sql @@ -719,6 +719,26 @@ VALUES ( 'Laoo', 'script', 'lo', 'Lao'); INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'Laoo', 'script', 'en', 'Lao'); +-- Croatian +INSERT INTO language_subtag_registry( subtag, type, description, added) +VALUES ( 'hr', 'language', 'Croatian','2014-07-24' ); + +INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) +VALUES( 'hr','hrv'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES( 'hr', 'language', 'hr', 'Hrvatski'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES( 'hr', 'language', 'en', 'Croatian'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES( 'hr', 'language', 'fr', 'Croate'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES( 'hr', 'language', 'de', 'Kroatisch'); + + -- REGIONS -- Canada INSERT INTO language_subtag_registry( subtag, type, description, added) diff --git a/installer/data/mysql/ru-RU/mandatory/subtag_registry.sql b/installer/data/mysql/ru-RU/mandatory/subtag_registry.sql index 3403d0fc77..5e3b60fbfe 100644 --- a/installer/data/mysql/ru-RU/mandatory/subtag_registry.sql +++ b/installer/data/mysql/ru-RU/mandatory/subtag_registry.sql @@ -719,6 +719,26 @@ VALUES ( 'Laoo', 'script', 'lo', 'Lao'); INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'Laoo', 'script', 'en', 'Lao'); +-- Croatian +INSERT INTO language_subtag_registry( subtag, type, description, added) +VALUES ( 'hr', 'language', 'Croatian','2014-07-24' ); + +INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) +VALUES( 'hr','hrv'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES( 'hr', 'language', 'hr', 'Hrvatski'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES( 'hr', 'language', 'en', 'Croatian'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES( 'hr', 'language', 'fr', 'Croate'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES( 'hr', 'language', 'de', 'Kroatisch'); + + -- REGIONS -- Canada INSERT INTO language_subtag_registry( subtag, type, description, added) diff --git a/installer/data/mysql/uk-UA/mandatory/subtag_registry.sql b/installer/data/mysql/uk-UA/mandatory/subtag_registry.sql index 3403d0fc77..5e3b60fbfe 100644 --- a/installer/data/mysql/uk-UA/mandatory/subtag_registry.sql +++ b/installer/data/mysql/uk-UA/mandatory/subtag_registry.sql @@ -719,6 +719,26 @@ VALUES ( 'Laoo', 'script', 'lo', 'Lao'); INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'Laoo', 'script', 'en', 'Lao'); +-- Croatian +INSERT INTO language_subtag_registry( subtag, type, description, added) +VALUES ( 'hr', 'language', 'Croatian','2014-07-24' ); + +INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) +VALUES( 'hr','hrv'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES( 'hr', 'language', 'hr', 'Hrvatski'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES( 'hr', 'language', 'en', 'Croatian'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES( 'hr', 'language', 'fr', 'Croate'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES( 'hr', 'language', 'de', 'Kroatisch'); + + -- REGIONS -- Canada INSERT INTO language_subtag_registry( subtag, type, description, added) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 94bb4ff1cb..4ce98e1de6 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -8577,6 +8577,18 @@ if ( CheckVersion($DBversion) ) { SetVersion ($DBversion); } +$DBversion = "3.17.00.XXX"; +if ( CheckVersion($DBversion) ) { + $dbh->do("INSERT INTO language_subtag_registry( subtag, type, description, added) VALUES ( 'hr', 'language', 'Croatian','2014-07-24' )"); + $dbh->do("INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) VALUES( 'hr','hrv')"); + $dbh->do("INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'hr', 'language', 'hr', 'Hrvatski')"); + $dbh->do("INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'hr', 'language', 'en', 'Croatian')"); + $dbh->do("INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'hr', 'language', 'fr', 'Croate')"); + $dbh->do("INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'hr', 'language', 'de', 'Kroatisch')"); + print "Upgrade to $DBversion done (Bug 12649: Add Croatian language)\n"; + SetVersion ($DBversion); +} + =head1 FUNCTIONS =head2 TableExists($table) -- 2.39.5