Commit b3ac75f1 authored by David Vallet's avatar David Vallet Committed by Commit Bot

Remove Norwegian Nynorsk from UI supported languages.

Note that this still lets you selecting the language and ordering for accept-language requests, just that the option of using the language as "System text" is disabled.

Currently we offer Norwegian Nynorsk as an UI language.
The removed code tries to map it to Norwegian Bokmål, but these two languages are similar, but not the same (https://www.skapago.eu/en/bokmal-nynorsk/).
Furthermore, since we don't actually map it (https://source.chromium.org/chromium/chromium/src/+/master:ui/base/l10n/l10n_util.cc;drc=4d93574ee586e569d9412f837c74824eb79ba02e?originalUrl=https:%2F%2Fcs.chromium.org%2F)
the language actually fall-backs to english when selected.
Since Norwegian Nynorsk is actually not a supported language, it is better to not offer it as a system language.

TEST=manual (ChromeOS on linux)


Bug: 1044756
Change-Id: Ice228606313c603cd1214703b024b8f370c5ccb1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2024128
Commit-Queue: David Vallet <dvallet@chromium.org>
Reviewed-by: default avatarDavid Vallet <dvallet@chromium.org>
Reviewed-by: default avatarJia Meng <jiameng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#735754}
parent 2b7ecf24
...@@ -25,16 +25,16 @@ struct LocaleUIFallbackPair { ...@@ -25,16 +25,16 @@ struct LocaleUIFallbackPair {
// This list MUST be sorted by the first element in the pair, because we perform // This list MUST be sorted by the first element in the pair, because we perform
// binary search on it. // binary search on it.
// TODO(claudiomagni): Investigate Norvegian language. There are 2 codes ("nn", // Note that no (Norwegian) is an alias, and should fallback to Norwegian
// "no") that fallback to "nb", but the base language should be "nn". // Bokmål (nb)
const LocaleUIFallbackPair kLocaleUIFallbackTable[] = { const LocaleUIFallbackPair kLocaleUIFallbackTable[] = {
{"en", "en-US"}, {"en-AU", "en-GB"}, {"en-CA", "en-GB"}, {"en", "en-US"}, {"en-AU", "en-GB"}, {"en-CA", "en-GB"},
{"en-IN", "en-GB"}, {"en-NZ", "en-GB"}, {"en-ZA", "en-GB"}, {"en-IN", "en-GB"}, {"en-NZ", "en-GB"}, {"en-ZA", "en-GB"},
{"es-AR", "es-419"}, {"es-CL", "es-419"}, {"es-CO", "es-419"}, {"es-AR", "es-419"}, {"es-CL", "es-419"}, {"es-CO", "es-419"},
{"es-CR", "es-419"}, {"es-HN", "es-419"}, {"es-MX", "es-419"}, {"es-CR", "es-419"}, {"es-HN", "es-419"}, {"es-MX", "es-419"},
{"es-PE", "es-419"}, {"es-US", "es-419"}, {"es-UY", "es-419"}, {"es-PE", "es-419"}, {"es-US", "es-419"}, {"es-UY", "es-419"},
{"es-VE", "es-419"}, {"it-CH", "it"}, {"nn", "nb"}, {"es-VE", "es-419"}, {"it-CH", "it"}, {"no", "nb"},
{"no", "nb"}, {"pt", "pt-PT"}}; {"pt", "pt-PT"}};
bool LocaleCompare(const LocaleUIFallbackPair& p1, const std::string& p2) { bool LocaleCompare(const LocaleUIFallbackPair& p1, const std::string& p2) {
return p1.chosen_locale < p2; return p1.chosen_locale < p2;
......
...@@ -212,11 +212,6 @@ TEST_F(LocaleUtilTest, ConvertToActualUILocale) { ...@@ -212,11 +212,6 @@ TEST_F(LocaleUtilTest, ConvertToActualUILocale) {
EXPECT_TRUE(is_ui); EXPECT_TRUE(is_ui);
EXPECT_EQ("it", locale); EXPECT_EQ("it", locale);
locale = "nn";
is_ui = language::ConvertToActualUILocale(&locale);
EXPECT_TRUE(is_ui);
EXPECT_EQ("nb", locale);
locale = "no"; locale = "no";
is_ui = language::ConvertToActualUILocale(&locale); is_ui = language::ConvertToActualUILocale(&locale);
EXPECT_TRUE(is_ui); EXPECT_TRUE(is_ui);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment