{"record":{"id":"aaaeb465d7cba38f","repo":"Hmbown/CodeWhale","slug":"unsupported-locale-other","errorCode":null,"errorMessage":"unsupported locale '{other}'","messagePattern":"unsupported locale '(.+?)'","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/tui/src/config_ui.rs","lineNumber":1086,"sourceCode":"    fn from_setting(value: &str) -> Result<Self> {\n        match normalize_configured_locale(value) {\n            Some(\"auto\") => Ok(Self::Auto),\n            Some(\"en\") => Ok(Self::En),\n            Some(\"ja\") => Ok(Self::Ja),\n            Some(\"zh-Hans\") => Ok(Self::ZhHans),\n            Some(\"zh-Hant\") => Ok(Self::ZhHant),\n            Some(\"pt-BR\") => Ok(Self::PtBr),\n            Some(\"es-419\") => Ok(Self::Es419),\n            Some(\"vi\") => Ok(Self::Vi),\n            Some(\"ko\") => Ok(Self::Ko),\n            Some(\"ca\") => Ok(Self::Ca),\n            Some(\"de\") => Ok(Self::De),\n            Some(\"fr\") => Ok(Self::Fr),\n            Some(\"id\") => Ok(Self::Id),\n            Some(\"hi\") => Ok(Self::Hi),\n            Some(\"ru\") => Ok(Self::Ru),\n            Some(\"uk\") => Ok(Self::Uk),\n            Some(other) => bail!(\"unsupported locale '{other}'\"),\n            None => bail!(\"invalid locale '{value}'\"),\n        }\n    }\n}\n\nimpl UiThemeValue {\n    fn as_setting(self) -> &'static str {\n        match self {\n            Self::System => \"system\",\n            Self::Dark => \"dark\",\n            Self::Light => \"light\",\n            Self::Grayscale => \"grayscale\",\n            Self::CatppuccinMocha => \"catppuccin-mocha\",\n            Self::TokyoNight => \"tokyo-night\",\n            Self::Dracula => \"dracula\",\n            Self::GruvboxDark => \"gruvbox-dark\",\n            Self::Matrix => \"matrix\",\n            Self::Uwu => \"uwu\",","sourceCodeStart":1068,"sourceCodeEnd":1104,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/0c42157ee52f9d55af2b506d71b46249910f77d3/crates/tui/src/config_ui.rs#L1068-L1104","documentation":"Thrown by UiLocaleValue::from_setting when normalize_configured_locale (crates/tui/src/localization.rs:3556) successfully parses the input into a canonical locale tag that the config-UI enum does not cover. The selectable set is exactly: auto, en, ja, zh-Hans, zh-Hant, pt-BR, es-419, vi, ko, ca, de, fr, id, hi, ru, uk. Because as_setting() and from_setting() list the same tags, this arm only fires on version skew: the localization parser knows a tag that this config_ui.rs build has not added yet.","triggerScenarios":"Running an older codewhale binary against a config written by a newer release that shipped a new locale pack; a locale input that normalizes to a tag present in localization.rs but absent from the from_setting match in config_ui.rs:1068.","commonSituations":"Downgrading or partially upgrading the TUI; reusing a dotfile/config synced from a machine running a newer Codewhale; a new locale landing in localization.rs before config_ui.rs picks it up.","solutions":["Set the locale setting to one of the listed values (auto, en, ja, zh-Hans, zh-Hant, pt-BR, es-419, vi, ko, ca, de, fr, id, hi, ru, uk)","Upgrade Codewhale so config_ui.rs matches the localization data that recognizes the tag","Set locale to \"auto\" to fall back to system detection while you reconcile versions"],"exampleFix":"# before\nlocale = \"en-US-x-new\"\n\n# after\nlocale = \"en\"","handlingStrategy":"validation","validationCode":"const SUPPORTED_LOCALES: &[&str] = &[\"auto\", \"en\", \"ja\", \"zh-Hans\", \"zh-Hant\", \"pt-BR\", \"es-419\", \"vi\", \"ko\", \"ca\", \"de\", \"fr\", \"id\", \"hi\", \"ru\", \"uk\"];\n\nfn locale_is_selectable(value: &str) -> bool {\n    crate::localization::normalize_configured_locale(value)\n        .is_some_and(|tag| SUPPORTED_LOCALES.contains(&tag))\n}\n\n// before saving the setting:\nif !locale_is_selectable(new_locale) {\n    return Ok(()); // keep the old value, surface supported list to the user\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Offer only the tags returned by configured_locale_values in settings UIs so users cannot enter unsupported locales","Pin the config and binary versions together (same release channel) to avoid tag/version skew","Treat a locale error mentioning a tag you did not type as a signal of mixed-version installs"],"tags":["config","locale","rust","tui","version-skew"],"backgroundTag":"unsupported-locale","analyzedSha":"0c42157ee52f9d55af2b506d71b46249910f77d3","analyzedAt":"2026-08-20T21:50:45.477Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}