Bugzilla – Attachment 173006 Details for
Bug 37969
Add missing language code nor (Norwegian/inclusive)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37969: Add missing language code nor
Bug-37969-Add-missing-language-code-nor.patch (text/plain), 6.32 KB, created by
Thomas Klausner
on 2024-10-19 13:40:37 UTC
(
hide
)
Description:
Bug 37969: Add missing language code nor
Filename:
MIME Type:
Creator:
Thomas Klausner
Created:
2024-10-19 13:40:37 UTC
Size:
6.32 KB
patch
obsolete
>From 37b27aefcf365152d599fafd3a8be1eb94105e3b Mon Sep 17 00:00:00 2001 >From: Lari Taskula <lari.taskula@hypernova.fi> >Date: Thu, 19 Sep 2024 21:07:04 +0000 >Subject: [PATCH] Bug 37969: Add missing language code nor > >Signed-off-by: Magnus Enger <magnus@libriotech.no> >Test plan: >- Start KTD with Elastic: ktd --es7 up >- Edit a record, e.g. "Dom Casmurro : a novel" and change the language > code in 008/35-37 from "eng" to "nor": > Before: 980914s1997 nyu 00011 eng b > After: 980914s1997 nyu 00011 nor b >- Do a search that finds the edited record and some other records, > so you can see the list of resulots and the facets, e.g. "dom" >- Verify that "nor" is shown in the languages facet >- Apply this patch and run koha-upgrade-schema kohadev >- Do the search again and verify that "Norwegian" is now shown instead > of "nor" > >Signed-off-by: Thomas Klausner <domm@plix.at> >--- > ...bug_37969_add_missing_language_code_nor.pl | 26 +++++++++++++ > .../data/mysql/mandatory/subtag_registry.sql | 37 +++++++++++++++++++ > 2 files changed, 63 insertions(+) > create mode 100755 installer/data/mysql/atomicupdate/bug_37969_add_missing_language_code_nor.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_37969_add_missing_language_code_nor.pl b/installer/data/mysql/atomicupdate/bug_37969_add_missing_language_code_nor.pl >new file mode 100755 >index 0000000000..a8f507f5b8 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_37969_add_missing_language_code_nor.pl >@@ -0,0 +1,26 @@ >+use Modern::Perl; >+use Koha::Installer::Output qw(say_warning say_failure say_success say_info); >+ >+return { >+ bug_number => "37969", >+ description => "Add nor language code", >+ up => sub { >+ my ($args) = @_; >+ my ( $dbh, $out ) = @$args{qw(dbh out)}; >+ >+ $dbh->do(q{ INSERT INTO language_descriptions(subtag, type, lang, description) VALUES ( 'nb', 'language', 'no', 'Norsk bokmål'); }); >+ $dbh->do(q{ INSERT INTO language_descriptions(subtag, type, lang, description) VALUES ( 'nn', 'language', 'no', 'Norsk nynorsk'); }); >+ $dbh->do(q{ INSERT INTO language_subtag_registry( subtag, type, description, added) VALUES ( 'no', 'language', 'Norwegian','2024-09-19' ); }); >+ $dbh->do(q{ INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) VALUES ( 'no','nor'); }); >+ $dbh->do(q{ INSERT INTO language_descriptions(subtag, type, lang, description) VALUES ( 'no', 'language', 'nb', 'Norsk'); }); >+ $dbh->do(q{ INSERT INTO language_descriptions(subtag, type, lang, description) VALUES ( 'no', 'language', 'nn', 'Norsk'); }); >+ $dbh->do(q{ INSERT INTO language_descriptions(subtag, type, lang, description) VALUES ( 'no', 'language', 'no', 'Norsk'); }); >+ $dbh->do(q{ INSERT INTO language_descriptions(subtag, type, lang, description) VALUES ( 'no', 'language', 'en', 'Norwegian'); }); >+ $dbh->do(q{ INSERT INTO language_descriptions(subtag, type, lang, description) VALUES ( 'no', 'language', 'fr', 'Norvégien'); }); >+ $dbh->do(q{ INSERT INTO language_descriptions(subtag, type, lang, description) VALUES ( 'no', 'language', 'de', 'Norwegisch'); }); >+ $dbh->do(q{ INSERT INTO language_descriptions(subtag, type, lang, description) VALUES ( 'no', 'language', 'pl', 'Norweski'); }); >+ $dbh->do(q{ INSERT INTO language_descriptions(subtag, type, lang, description) VALUES ( 'NO', 'region', 'no', 'Noreg'); }); >+ >+ say $out "Added nor language code"; >+ }, >+}; >diff --git a/installer/data/mysql/mandatory/subtag_registry.sql b/installer/data/mysql/mandatory/subtag_registry.sql >index 40cf57d646..aad932f199 100644 >--- a/installer/data/mysql/mandatory/subtag_registry.sql >+++ b/installer/data/mysql/mandatory/subtag_registry.sql >@@ -957,6 +957,9 @@ 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', 'no', 'Norsk bokmål'); >+ > INSERT INTO language_descriptions(subtag, type, lang, description) > VALUES ( 'nb', 'language', 'en', 'Norwegian bokmål'); > >@@ -1023,6 +1026,9 @@ 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', 'no', 'Norsk nynorsk'); >+ > INSERT INTO language_descriptions(subtag, type, lang, description) > VALUES ( 'nn', 'language', 'en', 'Norwegian nynorsk'); > >@@ -1035,6 +1041,34 @@ VALUES ( 'nn', 'language', 'de', 'Norwegisch nynorsk'); > INSERT INTO language_descriptions(subtag, type, lang, description) > VALUES ( 'nn', 'language', 'pl', 'Norweski nynorsk'); > >+-- Norwegian (inclusive) >+INSERT INTO language_subtag_registry( subtag, type, description, added) >+VALUES ( 'no', 'language', 'Norwegian','2024-09-19' ); >+ >+INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) >+VALUES ( 'no','nor'); >+ >+INSERT INTO language_descriptions(subtag, type, lang, description) >+VALUES ( 'no', 'language', 'nb', 'Norsk'); >+ >+INSERT INTO language_descriptions(subtag, type, lang, description) >+VALUES ( 'no', 'language', 'nn', 'Norsk'); >+ >+INSERT INTO language_descriptions(subtag, type, lang, description) >+VALUES ( 'no', 'language', 'no', 'Norsk'); >+ >+INSERT INTO language_descriptions(subtag, type, lang, description) >+VALUES ( 'no', 'language', 'en', 'Norwegian'); >+ >+INSERT INTO language_descriptions(subtag, type, lang, description) >+VALUES ( 'no', 'language', 'fr', 'Norvégien'); >+ >+INSERT INTO language_descriptions(subtag, type, lang, description) >+VALUES ( 'no', 'language', 'de', 'Norwegisch'); >+ >+INSERT INTO language_descriptions(subtag, type, lang, description) >+VALUES ( 'no', 'language', 'pl', 'Norweski'); >+ > -- Punjabi > INSERT INTO language_subtag_registry( subtag, type, description, added) > VALUES ( 'pa', 'language', 'Punjabi', '2017-04-21'); >@@ -2238,6 +2272,9 @@ VALUES ( 'NO', 'region', 'ne', 'Noreg'); > INSERT INTO language_descriptions(subtag, type, lang, description) > VALUES ( 'NO', 'region', 'nn', 'Noreg'); > >+INSERT INTO language_descriptions(subtag, type, lang, description) >+VALUES ( 'NO', 'region', 'no', 'Noreg'); >+ > -- New Zealand > INSERT INTO language_subtag_registry( subtag, type, description, added) > VALUES ( 'NZ', 'region', 'New Zealand','2005-10-16'); >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 37969
:
171807
|
171870
| 173006