From 0df24dc9c328d9a88fd8127416d16573c1334217 Mon Sep 17 00:00:00 2001 From: Magnus Enger Date: Tue, 15 Feb 2011 10:04:55 +0100 Subject: [PATCH] =?utf-8?q?Bug=202742=20Followup=20patch=20fixing=20Norwegian=20bokm=C3=A5l,=20adding=20nynorsk?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" - Replace Norwegian with Norwegian bokmål - Add Norwegian nynorsk, which was missing --- .../data/mysql/de-DE/mandatory/subtag_registry.sql | 32 ++++++++++++++++--- .../data/mysql/en/mandatory/subtag_registry.sql | 32 ++++++++++++++++--- .../mysql/fr-FR/1-Obligatoire/subtag_registry.sql | 32 ++++++++++++++++--- .../data/mysql/it-IT/necessari/subtag_registry.sql | 32 ++++++++++++++++--- .../data/mysql/pl-PL/mandatory/subtag_registry.sql | 32 ++++++++++++++++--- .../data/mysql/ru-RU/mandatory/subtag_registry.sql | 32 ++++++++++++++++--- .../data/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 63c76d4..4121a59 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 94b48f2..90a3bed 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 5254c35..caa354b 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 48f4f6b..a8029d5 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 665fee0..b246a7c 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 63c76d4..4121a59 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 63c76d4..4121a59 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 d9b546b..b647f27 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) -- 1.6.3.3