An open-source remote desktop application designed for self-hosting, as an alternative to TeamViewer.
Rust androidanydeskdartflatpakflutterflutter-appsioslinuxmacosp2prdpremote-controlremote-desktoprustrust-langteamviewervncwaylandwindows
fix(lang): pick the Norwegian translation for no and nn locales (#17010)
Ruslan Zaitsev6837cb96eb08
diff --git a/src/lang.rs b/src/lang.rsindex 7e2d7f1c7..0204b0359 100644--- a/src/lang.rs+++ b/src/lang.rs@@ -183,6 +183,11 @@ fn resolve_lang(saved_lang: &str, locale: &str, cjk_fallback: bool) -> String {} else if lang == "in" {lang = "id".to_owned();}+ // Norwegian also comes as the macrolanguage code (no_NO) or as Nynorsk (nn_NO);+ // the only Norwegian table is Bokmål.+ if lang == "no" || lang == "nn" {+ lang = "nb".to_owned();+ }}if cjk_fallback && is_cjk_lang(&lang) {"en".to_owned()@@ -392,6 +397,15 @@ mod test {assert_eq!(f("", "ka-GE", false), "ge");}+ #[test]+ fn test_resolve_lang_detects_norwegian_from_no_and_nn_locales() {+ use super::resolve_lang as f;++ assert_eq!(f("", "no_NO.UTF-8", false), "nb");+ assert_eq!(f("", "nn-NO", false), "nb");+ assert_eq!(f("", "nb-NO", false), "nb");+ }+#[test]fn test_resolve_lang_detects_hebrew_and_indonesian_from_legacy_android_codes() {use super::resolve_lang as f;