Merge remote branch 'kc/new/bug_2742' into kcmaster

This commit is contained in:
Chris Cormack 2011-02-17 11:41:36 +13:00
commit 3b1b6b8315
8 changed files with 215 additions and 42 deletions

View file

@ -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_descriptions(subtag, type, lang, description)
VALUES( 'nb', 'language', 'nb', 'Norsk');
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', 'en', 'Norwegian');
VALUES( 'nb', 'language', 'nb', 'Norsk bokmål');
INSERT INTO language_descriptions(subtag, type, lang, description)
VALUES( 'nb', 'language', 'fr', 'Norvégien');
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( 'nn', 'language', 'nn', 'Norsk nynorsk');
INSERT INTO language_descriptions(subtag, type, lang, description)
VALUES( 'nn', 'language', 'en', 'Norwegian nynorsk');
INSERT INTO language_descriptions(subtag, type, lang, description)
VALUES( 'nn', 'language', 'fr', 'Norvégien nynorsk');
-- Persian
INSERT INTO language_subtag_registry( subtag, type, description, added)

View file

@ -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_descriptions(subtag, type, lang, description)
VALUES( 'nb', 'language', 'nb', 'Norsk');
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', 'en', 'Norwegian');
VALUES( 'nb', 'language', 'nb', 'Norsk bokmål');
INSERT INTO language_descriptions(subtag, type, lang, description)
VALUES( 'nb', 'language', 'fr', 'Norvégien');
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( 'nn', 'language', 'nn', 'Norsk nynorsk');
INSERT INTO language_descriptions(subtag, type, lang, description)
VALUES( 'nn', 'language', 'en', 'Norwegian nynorsk');
INSERT INTO language_descriptions(subtag, type, lang, description)
VALUES( 'nn', 'language', 'fr', 'Norvégien nynorsk');
-- Persian
INSERT INTO language_subtag_registry( subtag, type, description, added)

View file

@ -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_descriptions(subtag, type, lang, description)
VALUES( 'nb', 'language', 'nb', 'Norsk');
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', 'en', 'Norwegian');
VALUES( 'nb', 'language', 'nb', 'Norsk bokmål');
INSERT INTO language_descriptions(subtag, type, lang, description)
VALUES( 'nb', 'language', 'fr', 'Norvégien');
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( 'nn', 'language', 'nn', 'Norsk nynorsk');
INSERT INTO language_descriptions(subtag, type, lang, description)
VALUES( 'nn', 'language', 'en', 'Norwegian nynorsk');
INSERT INTO language_descriptions(subtag, type, lang, description)
VALUES( 'nn', 'language', 'fr', 'Norvégien nynorsk');
-- Persian
INSERT INTO language_subtag_registry( subtag, type, description, added)

View file

@ -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_descriptions(subtag, type, lang, description)
VALUES( 'nb', 'language', 'nb', 'Norsk');
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', 'en', 'Norwegian');
VALUES( 'nb', 'language', 'nb', 'Norsk bokmål');
INSERT INTO language_descriptions(subtag, type, lang, description)
VALUES( 'nb', 'language', 'fr', 'Norvégien');
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( 'nn', 'language', 'nn', 'Norsk nynorsk');
INSERT INTO language_descriptions(subtag, type, lang, description)
VALUES( 'nn', 'language', 'en', 'Norwegian nynorsk');
INSERT INTO language_descriptions(subtag, type, lang, description)
VALUES( 'nn', 'language', 'fr', 'Norvégien nynorsk');
-- Persian
INSERT INTO language_subtag_registry( subtag, type, description, added)

View file

@ -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_descriptions(subtag, type, lang, description)
VALUES( 'nb', 'language', 'nb', 'Norsk');
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', 'en', 'Norwegian');
VALUES( 'nb', 'language', 'nb', 'Norsk bokmål');
INSERT INTO language_descriptions(subtag, type, lang, description)
VALUES( 'nb', 'language', 'fr', 'Norvégien');
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( 'nn', 'language', 'nn', 'Norsk nynorsk');
INSERT INTO language_descriptions(subtag, type, lang, description)
VALUES( 'nn', 'language', 'en', 'Norwegian nynorsk');
INSERT INTO language_descriptions(subtag, type, lang, description)
VALUES( 'nn', 'language', 'fr', 'Norvégien nynorsk');
-- Persian
INSERT INTO language_subtag_registry( subtag, type, description, added)

View file

@ -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_descriptions(subtag, type, lang, description)
VALUES( 'nb', 'language', 'nb', 'Norsk');
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', 'en', 'Norwegian');
VALUES( 'nb', 'language', 'nb', 'Norsk bokmål');
INSERT INTO language_descriptions(subtag, type, lang, description)
VALUES( 'nb', 'language', 'fr', 'Norvégien');
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( 'nn', 'language', 'nn', 'Norsk nynorsk');
INSERT INTO language_descriptions(subtag, type, lang, description)
VALUES( 'nn', 'language', 'en', 'Norwegian nynorsk');
INSERT INTO language_descriptions(subtag, type, lang, description)
VALUES( 'nn', 'language', 'fr', 'Norvégien nynorsk');
-- Persian
INSERT INTO language_subtag_registry( subtag, type, description, added)

View file

@ -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_descriptions(subtag, type, lang, description)
VALUES( 'nb', 'language', 'nb', 'Norsk');
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', 'en', 'Norwegian');
VALUES( 'nb', 'language', 'nb', 'Norsk bokmål');
INSERT INTO language_descriptions(subtag, type, lang, description)
VALUES( 'nb', 'language', 'fr', 'Norvégien');
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( 'nn', 'language', 'nn', 'Norsk nynorsk');
INSERT INTO language_descriptions(subtag, type, lang, description)
VALUES( 'nn', 'language', 'en', 'Norwegian nynorsk');
INSERT INTO language_descriptions(subtag, type, lang, description)
VALUES( 'nn', 'language', 'fr', 'Norvégien nynorsk');
-- Persian
INSERT INTO language_subtag_registry( subtag, type, description, added)

View file

@ -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&#229;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&#229;l' WHERE subtag = 'nb' AND lang = 'nb';");
$dbh->do("UPDATE language_descriptions SET description = 'Norwegian bokm&#229;l' WHERE subtag = 'nb' AND lang = 'en';");
$dbh->do("UPDATE language_descriptions SET description = 'Norvégien bokm&#229;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)