From 1268f63bbcce2e690fa778e2693c80e6a4f02b9f Mon Sep 17 00:00:00 2001 From: Brahim Hadriche Date: Sun, 11 May 2025 12:41:37 -0400 Subject: [PATCH] Fix isue with web app fetching translation for locale `en_CA` --- .../Web/PlayletWebServer/Middleware/StateApiRouter.bs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/playlet-lib/src/components/Web/PlayletWebServer/Middleware/StateApiRouter.bs b/playlet-lib/src/components/Web/PlayletWebServer/Middleware/StateApiRouter.bs index 0a386752..bc7746e7 100644 --- a/playlet-lib/src/components/Web/PlayletWebServer/Middleware/StateApiRouter.bs +++ b/playlet-lib/src/components/Web/PlayletWebServer/Middleware/StateApiRouter.bs @@ -55,7 +55,12 @@ namespace Http end if if keysDict["device"] = true - state["device"] = m.applicationInfoNode@.GetDeviceInfo() + deviceInfo = m.applicationInfoNode@.GetDeviceInfo() + ' We do not currently have translations for en_CA + if deviceInfo.current_locale = "en_CA" + deviceInfo.current_locale = "en_US" + end if + state["device"] = deviceInfo end if if keysDict["invidious"] = true