i18n: the browser build's Match System uses supported() too (#229)
`supported` was only called on desktop builds, so the wasm32 check warned that it was never used. The browser build, which has no system locale here, now resolves Match System through supported(None) (English) instead of a literal. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
b0fa9f1943
commit
646a6842cd
|
|
@ -22,8 +22,9 @@ fn system_language() -> &'static str {
|
|||
static LANGUAGE: std::sync::OnceLock<&'static str> = std::sync::OnceLock::new();
|
||||
LANGUAGE.get_or_init(|| supported(sys_locale::get_locale().as_deref()))
|
||||
}
|
||||
// No system locale in the browser build: English.
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
"en"
|
||||
supported(None)
|
||||
}
|
||||
|
||||
/// The language EffectCraft shows for a BCP 47 locale (`ja-JP` → `ja`).
|
||||
|
|
|
|||
Loading…
Reference in New Issue