From 90d6e0484100c8d2285a18ddcb7d8b5e83089cac Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Thu, 24 Jul 2014 14:28:31 +0200 Subject: [PATCH] [SIGNED-OFF] 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. --- .../data/mysql/de-DE/mandatory/subtag_registry.sql | 19 +++++++++++ .../data/mysql/en/mandatory/subtag_registry.sql | 19 +++++++++++ .../data/mysql/es-ES/mandatory/subtag_registry.sql | 20 +++++++++++ .../data/mysql/it-IT/necessari/subtag_registry.sql | 20 +++++++++++ .../mysql/nb-NO/1-Obligatorisk/subtag_registry.sql | 20 +++++++++++ .../data/mysql/pl-PL/mandatory/subtag_registry.sql | 20 +++++++++++ .../data/mysql/ru-RU/mandatory/subtag_registry.sql | 20 +++++++++++ .../data/mysql/uk-UA/mandatory/subtag_registry.sql | 39 ++++++++++++++++++++++ installer/data/mysql/updatedatabase.pl | 12 +++++++ 9 files changed, 189 insertions(+) diff --git a/installer/data/mysql/de-DE/mandatory/subtag_registry.sql b/installer/data/mysql/de-DE/mandatory/subtag_registry.sql index ceaae46..1e642c0 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 ceaae46..1e642c0 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 49ad7ab..62b97ab 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 43e5a14..a21ed27 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 f4d5409..9748f21 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 09561a9..d62b007 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 3403d0f..5e3b60f 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 3403d0f..bb07215 100644 --- a/installer/data/mysql/uk-UA/mandatory/subtag_registry.sql +++ b/installer/data/mysql/uk-UA/mandatory/subtag_registry.sql @@ -719,6 +719,45 @@ 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'); + +-- 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 94bb4ff..4ce98e1 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) -- 1.9.1