From 5d82c493f76b609df48478219e75d901df80b055 Mon Sep 17 00:00:00 2001 From: Magnus Enger Date: Tue, 15 Feb 2011 11:37:06 +0100 Subject: [PATCH] =?utf8?q?Bug=202742=20Followup=20patch=20fixing=20Norwegi?= =?utf8?q?an=20bokm=C3=A5l,=20adding=20nynorsk?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit - Replace Norwegian with Norwegian bokmÃ¥l - Add Norwegian nynorsk, which was missing Signed-off-by: Chris Cormack --- .../mysql/de-DE/mandatory/subtag_registry.sql | 32 ++++++++++++++++--- .../mysql/en/mandatory/subtag_registry.sql | 32 ++++++++++++++++--- .../fr-FR/1-Obligatoire/subtag_registry.sql | 32 ++++++++++++++++--- .../mysql/it-IT/necessari/subtag_registry.sql | 32 ++++++++++++++++--- .../mysql/pl-PL/mandatory/subtag_registry.sql | 32 ++++++++++++++++--- .../mysql/ru-RU/mandatory/subtag_registry.sql | 32 ++++++++++++++++--- .../mysql/uk-UA/mandatory/subtag_registry.sql | 32 ++++++++++++++++--- installer/data/mysql/updatedatabase.pl | 19 +++++++++++ 8 files changed, 208 insertions(+), 35 deletions(-) diff --git a/installer/data/mysql/de-DE/mandatory/subtag_registry.sql b/installer/data/mysql/de-DE/mandatory/subtag_registry.sql index 63c76d463a..4121a59f10 100644 --- a/installer/data/mysql/de-DE/mandatory/subtag_registry.sql +++ b/installer/data/mysql/de-DE/mandatory/subtag_registry.sql @@ -385,21 +385,43 @@ VALUES( 'gl', 'language', 'gl', 'Galego'); INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'gl', 'language', 'en', 'Galician'); --- Norwegian +-- Norwegian (bokmÃ¥l) INSERT INTO language_subtag_registry( subtag, type, description, added) -VALUES ( 'nb', 'language', 'Norwegian','2005-10-16' ); +VALUES ( 'nb', 'language', 'Norwegian bokmål','2005-10-16' ); INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) VALUES( 'nb','nor'); +INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) +VALUES( 'nb','nob'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES( 'nb', 'language', 'nb', 'Norsk bokmål'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES( 'nb', 'language', 'en', 'Norwegian bokmål'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES( 'nb', 'language', 'fr', 'Norvégien bokmål'); + +-- Norwegian (nynorsk) +INSERT INTO language_subtag_registry( subtag, type, description, added) +VALUES ( 'nn', 'language', 'Norwegian nynorsk','2011-02-14' ); + +INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) +VALUES( 'nn','nno'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES( 'nn', 'language', 'nb', 'Norsk nynorsk'); + INSERT INTO language_descriptions(subtag, type, lang, description) -VALUES( 'nb', 'language', 'nb', 'Norsk'); +VALUES( 'nn', 'language', 'nn', 'Norsk nynorsk'); INSERT INTO language_descriptions(subtag, type, lang, description) -VALUES( 'nb', 'language', 'en', 'Norwegian'); +VALUES( 'nn', 'language', 'en', 'Norwegian nynorsk'); INSERT INTO language_descriptions(subtag, type, lang, description) -VALUES( 'nb', 'language', 'fr', 'Norvégien'); +VALUES( 'nn', 'language', 'fr', 'Norvégien nynorsk'); -- Persian INSERT INTO language_subtag_registry( subtag, type, description, added) diff --git a/installer/data/mysql/en/mandatory/subtag_registry.sql b/installer/data/mysql/en/mandatory/subtag_registry.sql index 94b48f2f83..90a3bedeb7 100644 --- a/installer/data/mysql/en/mandatory/subtag_registry.sql +++ b/installer/data/mysql/en/mandatory/subtag_registry.sql @@ -388,21 +388,43 @@ VALUES( 'gl', 'language', 'gl', 'Galego'); INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'gl', 'language', 'en', 'Galician'); --- Norwegian +-- Norwegian (bokmÃ¥l) INSERT INTO language_subtag_registry( subtag, type, description, added) -VALUES ( 'nb', 'language', 'Norwegian','2005-10-16' ); +VALUES ( 'nb', 'language', 'Norwegian bokmål','2005-10-16' ); INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) VALUES( 'nb','nor'); +INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) +VALUES( 'nb','nob'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES( 'nb', 'language', 'nb', 'Norsk bokmål'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES( 'nb', 'language', 'en', 'Norwegian bokmål'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES( 'nb', 'language', 'fr', 'Norvégien bokmål'); + +-- Norwegian (nynorsk) +INSERT INTO language_subtag_registry( subtag, type, description, added) +VALUES ( 'nn', 'language', 'Norwegian nynorsk','2011-02-14' ); + +INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) +VALUES( 'nn','nno'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES( 'nn', 'language', 'nb', 'Norsk nynorsk'); + INSERT INTO language_descriptions(subtag, type, lang, description) -VALUES( 'nb', 'language', 'nb', 'Norsk'); +VALUES( 'nn', 'language', 'nn', 'Norsk nynorsk'); INSERT INTO language_descriptions(subtag, type, lang, description) -VALUES( 'nb', 'language', 'en', 'Norwegian'); +VALUES( 'nn', 'language', 'en', 'Norwegian nynorsk'); INSERT INTO language_descriptions(subtag, type, lang, description) -VALUES( 'nb', 'language', 'fr', 'Norvégien'); +VALUES( 'nn', 'language', 'fr', 'Norvégien nynorsk'); -- Persian INSERT INTO language_subtag_registry( subtag, type, description, added) diff --git a/installer/data/mysql/fr-FR/1-Obligatoire/subtag_registry.sql b/installer/data/mysql/fr-FR/1-Obligatoire/subtag_registry.sql index 5254c35d10..caa354b827 100644 --- a/installer/data/mysql/fr-FR/1-Obligatoire/subtag_registry.sql +++ b/installer/data/mysql/fr-FR/1-Obligatoire/subtag_registry.sql @@ -332,21 +332,43 @@ VALUES( 'la', 'language', 'en', 'Latin'); INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'la', 'language', 'fr', 'Latin'); --- Norwegian +-- Norwegian (bokmÃ¥l) INSERT INTO language_subtag_registry( subtag, type, description, added) -VALUES ( 'nb', 'language', 'Norwegian','2005-10-16' ); +VALUES ( 'nb', 'language', 'Norwegian bokmål','2005-10-16' ); INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) VALUES( 'nb','nor'); +INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) +VALUES( 'nb','nob'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES( 'nb', 'language', 'nb', 'Norsk bokmål'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES( 'nb', 'language', 'en', 'Norwegian bokmål'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES( 'nb', 'language', 'fr', 'Norvégien bokmål'); + +-- Norwegian (nynorsk) +INSERT INTO language_subtag_registry( subtag, type, description, added) +VALUES ( 'nn', 'language', 'Norwegian nynorsk','2011-02-14' ); + +INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) +VALUES( 'nn','nno'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES( 'nn', 'language', 'nb', 'Norsk nynorsk'); + INSERT INTO language_descriptions(subtag, type, lang, description) -VALUES( 'nb', 'language', 'nb', 'Norsk'); +VALUES( 'nn', 'language', 'nn', 'Norsk nynorsk'); INSERT INTO language_descriptions(subtag, type, lang, description) -VALUES( 'nb', 'language', 'en', 'Norwegian'); +VALUES( 'nn', 'language', 'en', 'Norwegian nynorsk'); INSERT INTO language_descriptions(subtag, type, lang, description) -VALUES( 'nb', 'language', 'fr', 'Norvégien'); +VALUES( 'nn', 'language', 'fr', 'Norvégien nynorsk'); -- Persian 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 48f4f6b825..a8029d5336 100644 --- a/installer/data/mysql/it-IT/necessari/subtag_registry.sql +++ b/installer/data/mysql/it-IT/necessari/subtag_registry.sql @@ -387,21 +387,43 @@ VALUES( 'gl', 'language', 'gl', 'Galego'); INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'gl', 'language', 'en', 'Galician'); --- Norwegian +-- Norwegian (bokmÃ¥l) INSERT INTO language_subtag_registry( subtag, type, description, added) -VALUES ( 'nb', 'language', 'Norwegian','2005-10-16' ); +VALUES ( 'nb', 'language', 'Norwegian bokmål','2005-10-16' ); INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) VALUES( 'nb','nor'); +INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) +VALUES( 'nb','nob'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES( 'nb', 'language', 'nb', 'Norsk bokmål'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES( 'nb', 'language', 'en', 'Norwegian bokmål'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES( 'nb', 'language', 'fr', 'Norvégien bokmål'); + +-- Norwegian (nynorsk) +INSERT INTO language_subtag_registry( subtag, type, description, added) +VALUES ( 'nn', 'language', 'Norwegian nynorsk','2011-02-14' ); + +INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) +VALUES( 'nn','nno'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES( 'nn', 'language', 'nb', 'Norsk nynorsk'); + INSERT INTO language_descriptions(subtag, type, lang, description) -VALUES( 'nb', 'language', 'nb', 'Norsk'); +VALUES( 'nn', 'language', 'nn', 'Norsk nynorsk'); INSERT INTO language_descriptions(subtag, type, lang, description) -VALUES( 'nb', 'language', 'en', 'Norwegian'); +VALUES( 'nn', 'language', 'en', 'Norwegian nynorsk'); INSERT INTO language_descriptions(subtag, type, lang, description) -VALUES( 'nb', 'language', 'fr', 'Norvégien'); +VALUES( 'nn', 'language', 'fr', 'Norvégien nynorsk'); -- Persian 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 665fee04b6..b246a7c10c 100644 --- a/installer/data/mysql/pl-PL/mandatory/subtag_registry.sql +++ b/installer/data/mysql/pl-PL/mandatory/subtag_registry.sql @@ -385,21 +385,43 @@ VALUES( 'gl', 'language', 'gl', 'Galego'); INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'gl', 'language', 'en', 'Galician'); --- Norwegian +-- Norwegian (bokmÃ¥l) INSERT INTO language_subtag_registry( subtag, type, description, added) -VALUES ( 'nb', 'language', 'Norwegian','2005-10-16' ); +VALUES ( 'nb', 'language', 'Norwegian bokmål','2005-10-16' ); INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) VALUES( 'nb','nor'); +INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) +VALUES( 'nb','nob'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES( 'nb', 'language', 'nb', 'Norsk bokmål'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES( 'nb', 'language', 'en', 'Norwegian bokmål'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES( 'nb', 'language', 'fr', 'Norvégien bokmål'); + +-- Norwegian (nynorsk) +INSERT INTO language_subtag_registry( subtag, type, description, added) +VALUES ( 'nn', 'language', 'Norwegian nynorsk','2011-02-14' ); + +INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) +VALUES( 'nn','nno'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES( 'nn', 'language', 'nb', 'Norsk nynorsk'); + INSERT INTO language_descriptions(subtag, type, lang, description) -VALUES( 'nb', 'language', 'nb', 'Norsk'); +VALUES( 'nn', 'language', 'nn', 'Norsk nynorsk'); INSERT INTO language_descriptions(subtag, type, lang, description) -VALUES( 'nb', 'language', 'en', 'Norwegian'); +VALUES( 'nn', 'language', 'en', 'Norwegian nynorsk'); INSERT INTO language_descriptions(subtag, type, lang, description) -VALUES( 'nb', 'language', 'fr', 'Norvégien'); +VALUES( 'nn', 'language', 'fr', 'Norvégien nynorsk'); -- Persian 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 63c76d463a..4121a59f10 100644 --- a/installer/data/mysql/ru-RU/mandatory/subtag_registry.sql +++ b/installer/data/mysql/ru-RU/mandatory/subtag_registry.sql @@ -385,21 +385,43 @@ VALUES( 'gl', 'language', 'gl', 'Galego'); INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'gl', 'language', 'en', 'Galician'); --- Norwegian +-- Norwegian (bokmÃ¥l) INSERT INTO language_subtag_registry( subtag, type, description, added) -VALUES ( 'nb', 'language', 'Norwegian','2005-10-16' ); +VALUES ( 'nb', 'language', 'Norwegian bokmål','2005-10-16' ); INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) VALUES( 'nb','nor'); +INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) +VALUES( 'nb','nob'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES( 'nb', 'language', 'nb', 'Norsk bokmål'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES( 'nb', 'language', 'en', 'Norwegian bokmål'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES( 'nb', 'language', 'fr', 'Norvégien bokmål'); + +-- Norwegian (nynorsk) +INSERT INTO language_subtag_registry( subtag, type, description, added) +VALUES ( 'nn', 'language', 'Norwegian nynorsk','2011-02-14' ); + +INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) +VALUES( 'nn','nno'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES( 'nn', 'language', 'nb', 'Norsk nynorsk'); + INSERT INTO language_descriptions(subtag, type, lang, description) -VALUES( 'nb', 'language', 'nb', 'Norsk'); +VALUES( 'nn', 'language', 'nn', 'Norsk nynorsk'); INSERT INTO language_descriptions(subtag, type, lang, description) -VALUES( 'nb', 'language', 'en', 'Norwegian'); +VALUES( 'nn', 'language', 'en', 'Norwegian nynorsk'); INSERT INTO language_descriptions(subtag, type, lang, description) -VALUES( 'nb', 'language', 'fr', 'Norvégien'); +VALUES( 'nn', 'language', 'fr', 'Norvégien nynorsk'); -- Persian 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 63c76d463a..4121a59f10 100644 --- a/installer/data/mysql/uk-UA/mandatory/subtag_registry.sql +++ b/installer/data/mysql/uk-UA/mandatory/subtag_registry.sql @@ -385,21 +385,43 @@ VALUES( 'gl', 'language', 'gl', 'Galego'); INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'gl', 'language', 'en', 'Galician'); --- Norwegian +-- Norwegian (bokmÃ¥l) INSERT INTO language_subtag_registry( subtag, type, description, added) -VALUES ( 'nb', 'language', 'Norwegian','2005-10-16' ); +VALUES ( 'nb', 'language', 'Norwegian bokmål','2005-10-16' ); INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) VALUES( 'nb','nor'); +INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) +VALUES( 'nb','nob'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES( 'nb', 'language', 'nb', 'Norsk bokmål'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES( 'nb', 'language', 'en', 'Norwegian bokmål'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES( 'nb', 'language', 'fr', 'Norvégien bokmål'); + +-- Norwegian (nynorsk) +INSERT INTO language_subtag_registry( subtag, type, description, added) +VALUES ( 'nn', 'language', 'Norwegian nynorsk','2011-02-14' ); + +INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) +VALUES( 'nn','nno'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES( 'nn', 'language', 'nb', 'Norsk nynorsk'); + INSERT INTO language_descriptions(subtag, type, lang, description) -VALUES( 'nb', 'language', 'nb', 'Norsk'); +VALUES( 'nn', 'language', 'nn', 'Norsk nynorsk'); INSERT INTO language_descriptions(subtag, type, lang, description) -VALUES( 'nb', 'language', 'en', 'Norwegian'); +VALUES( 'nn', 'language', 'en', 'Norwegian nynorsk'); INSERT INTO language_descriptions(subtag, type, lang, description) -VALUES( 'nb', 'language', 'fr', 'Norvégien'); +VALUES( 'nn', 'language', 'fr', 'Norvégien nynorsk'); -- Persian INSERT INTO language_subtag_registry( subtag, type, description, added) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 7e815a2fc0..1a44092b21 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -3995,6 +3995,25 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion ($DBversion); } +$DBversion = '3.03.00.XXX'; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + # Fix bokmÃ¥l + $dbh->do("UPDATE language_subtag_registry SET description = 'Norwegian bokmål' WHERE subtag = 'nb';"); + $dbh->do("INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) VALUES( 'nb','nob');"); + $dbh->do("UPDATE language_descriptions SET description = 'Norsk bokmål' WHERE subtag = 'nb' AND lang = 'nb';"); + $dbh->do("UPDATE language_descriptions SET description = 'Norwegian bokmål' WHERE subtag = 'nb' AND lang = 'en';"); + $dbh->do("UPDATE language_descriptions SET description = 'Norvégien bokmål' WHERE subtag = 'nb' AND lang = 'fr';"); + # Add nynorsk + $dbh->do("INSERT INTO language_subtag_registry( subtag, type, description, added) VALUES ( 'nn', 'language', 'Norwegian nynorsk','2011-02-14' )"); + $dbh->do("INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) VALUES( 'nn','nno')"); + $dbh->do("INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'nn', 'language', 'nb', 'Norsk nynorsk')"); + $dbh->do("INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'nn', 'language', 'nn', 'Norsk nynorsk')"); + $dbh->do("INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'nn', 'language', 'en', 'Norwegian nynorsk')"); + $dbh->do("INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'nn', 'language', 'fr', 'Norvégien nynorsk')"); + print "Upgrade to $DBversion done (Correct language descriptions for Norwegian)\n"; + SetVersion ($DBversion); +} + =head1 FUNCTIONS =head2 DropAllForeignKeys($table) -- 2.39.5