From 11d90f153e611b408ca7ab2525246092d80a0549 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Wed, 31 Aug 2022 10:01:50 +0000 Subject: [PATCH] Bug 27136: Add additional languages for facet display This patch adds two missing languages, Cree & Afrikaans, as well as some necessary linguistic definitions for faceting: Multi language, undetermined, no linguistic content Signed-off-by: Alexis Ripetti Signed-off-by: Tomas Cohen Arazi --- .../bz27136-Add_languages_for_facet.pl | 35 ++++++++++ .../data/mysql/mandatory/subtag_registry.sql | 70 +++++++++++++++++++ 2 files changed, 105 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bz27136-Add_languages_for_facet.pl diff --git a/installer/data/mysql/atomicupdate/bz27136-Add_languages_for_facet.pl b/installer/data/mysql/atomicupdate/bz27136-Add_languages_for_facet.pl new file mode 100644 index 0000000000..293b1d09c3 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bz27136-Add_languages_for_facet.pl @@ -0,0 +1,35 @@ +use Modern::Perl; + +return { + bug_number => "27136", + description => "Add missing language information for facets", + up => sub { + my ($args) = @_; + my ($dbh, $out) = @$args{qw(dbh out)}; + $dbh->do(q{ INSERT INTO language_subtag_registry (subtag, type, description, added) VALUES ('cr', 'language', 'Cree', now()) }); + $dbh->do(q{ INSERT INTO language_descriptions (subtag, type, lang, description) VALUES ('cr', 'language', 'en', 'Cree') }); + $dbh->do(q{ INSERT INTO language_descriptions (subtag, type, lang, description) VALUES ('cr', 'language', 'fr', 'Cree') }); + $dbh->do(q{ INSERT INTO language_rfc4646_to_iso639 (rfc4646_subtag, iso639_2_code) VALUES ('cr', 'cre') }); + + $dbh->do(q{ INSERT INTO language_subtag_registry (subtag, type, description, added) VALUES ('af', 'language', 'Afrikaans', now()) }); + $dbh->do(q{ INSERT INTO language_descriptions (subtag, type, lang, description) VALUES ('af', 'language', 'en', 'Afrikaans') }); + $dbh->do(q{ INSERT INTO language_descriptions (subtag, type, lang, description) VALUES ('af', 'language', 'fr', 'Afrikaans') }); + $dbh->do(q{ INSERT INTO language_rfc4646_to_iso639 (rfc4646_subtag, iso639_2_code) VALUES ('af', 'afr') }); + + $dbh->do(q{ INSERT INTO language_subtag_registry (subtag, type, description, added) VALUES ('mul', 'language', 'Multiple languages', now()) }); + $dbh->do(q{ INSERT INTO language_descriptions (subtag, type, lang, description) VALUES ('mul', 'language', 'en', 'Multiple languages') }); + $dbh->do(q{ INSERT INTO language_descriptions (subtag, type, lang, description) VALUES ('mul', 'language', 'fr', 'Multilingue') }); + $dbh->do(q{ INSERT INTO language_rfc4646_to_iso639 (rfc4646_subtag, iso639_2_code) VALUES ('mul', 'mul') }); + + $dbh->do(q{ INSERT INTO language_subtag_registry (subtag, type, description, added) VALUES ('und', 'language', 'Undetermined', now()) }); + $dbh->do(q{ INSERT INTO language_descriptions (subtag, type, lang, description) VALUES ('und', 'language', 'en', 'Undetermined') }); + $dbh->do(q{ INSERT INTO language_descriptions (subtag, type, lang, description) VALUES ('und', 'language', 'fr', 'Indéterminée') }); + $dbh->do(q{ INSERT INTO language_rfc4646_to_iso639 (rfc4646_subtag, iso639_2_code) VALUES ('und', 'und') }); + + $dbh->do(q{ INSERT INTO language_subtag_registry (subtag, type, description, added) VALUES ('zxx', 'language', 'No linguistic content', now()) }); + $dbh->do(q{ INSERT INTO language_descriptions (subtag, type, lang, description) VALUES ('zxx', 'language', 'en', 'No linguistic content') }); + $dbh->do(q{ INSERT INTO language_descriptions (subtag, type, lang, description) VALUES ('zxx', 'language', 'fr', 'Pas de contenu linguistique') }); + $dbh->do(q{ INSERT INTO language_rfc4646_to_iso639 (rfc4646_subtag, iso639_2_code) VALUES ('zxx', 'zxx') }); + say $out "Added missing languages"; + }, +}; diff --git a/installer/data/mysql/mandatory/subtag_registry.sql b/installer/data/mysql/mandatory/subtag_registry.sql index 25ad884d10..8e41c0ecee 100644 --- a/installer/data/mysql/mandatory/subtag_registry.sql +++ b/installer/data/mysql/mandatory/subtag_registry.sql @@ -1900,3 +1900,73 @@ VALUES ( 'yi', 'language', 'yi', 'יידיש'); INSERT INTO language_script_mapping(language_subtag,script_subtag) VALUES ( 'yi', 'Hebr'); + +-- Cree + +INSERT INTO language_subtag_registry( subtag, type, description, added) +VALUES ( 'cr', 'language', 'Cree', NOW() ); + +INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) +VALUES ( 'cr','cre'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES ( 'cr', 'language', 'en', 'Cree'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES ( 'cr', 'language', 'fr', 'Cree'); + +-- Afrikaans + +INSERT INTO language_subtag_registry( subtag, type, description, added) +VALUES ( 'af', 'language', 'Afrikaans', NOW() ); + +INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) +VALUES ( 'af','afr'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES ( 'af', 'language', 'en', 'Afrikaans'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES ( 'af', 'language', 'fr', 'Afrikaans'); + +-- Multiple languages + +INSERT INTO language_subtag_registry( subtag, type, description, added) +VALUES ( 'mul', 'language', 'Multiple languages', NOW() ); + +INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) +VALUES ( 'mu','mul'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES ( 'mu', 'language', 'en', 'Multiple languages'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES ( 'mu', 'language', 'fr', 'Multilingue'); + +-- Undetermined + +INSERT INTO language_subtag_registry( subtag, type, description, added) +VALUES ( 'und', 'language', 'Undetermined', NOW() ); + +INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) +VALUES ( 'und','und'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES ( 'un', 'language', 'en', 'Undetermined'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES ( 'un', 'language', 'fr', 'Indéterminée'); + +-- No linguistic content + +INSERT INTO language_subtag_registry( subtag, type, description, added) +VALUES ( 'zxx', 'language', 'No linguistic content', NOW() ); + +INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) +VALUES ( 'zxx','zxx'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES ( 'zxx', 'language', 'en', 'No linguistic content'); + +INSERT INTO language_descriptions(subtag, type, lang, description) +VALUES ( 'zxx', 'language', 'fr', 'Pas de contenu linguistique'); -- 2.39.5