From 646a6842cd4ac8639933b3cc5e618c58b02b49ec Mon Sep 17 00:00:00 2001 From: bflatastic Date: Thu, 8 Oct 2026 21:00:55 +0700 Subject: [PATCH] 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 --- crates/ui-egui/src/i18n.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/ui-egui/src/i18n.rs b/crates/ui-egui/src/i18n.rs index 376ef6c7..adebb950 100644 --- a/crates/ui-egui/src/i18n.rs +++ b/crates/ui-egui/src/i18n.rs @@ -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`).