summary refs log tree commit diff
path: root/api/client_test/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'api/client_test/index.html')
-rw-r--r--api/client_test/index.html34
1 files changed, 33 insertions, 1 deletions
diff --git a/api/client_test/index.html b/api/client_test/index.html
index 5a795253..a68b191a 100644
--- a/api/client_test/index.html
+++ b/api/client_test/index.html
@@ -105,8 +105,40 @@
 					});
 			}
 
+			const supportedLocales = [
+				"bg",
+				"cs",
+				"da",
+				"de",
+				"el",
+				"en-GB",
+				"es-ES",
+				"fi",
+				"fr",
+				"hi",
+				"hr",
+				"hu",
+				"it",
+				"ja",
+				"ko",
+				"lt",
+				"nl",
+				"no",
+				"pl",
+				"pt-BR",
+				"ro",
+				"ru",
+				"sv-SE",
+				"th",
+				"tr",
+				"uk",
+				"vi",
+				"zh-CN",
+				"zh-TW"
+			];
+
 			const settings = JSON.parse(localStorage.getItem("UserSettingsStore"));
-			if (settings && settings.locale.length <= 2) {
+			if (settings && !supportedLocales.includes(settings.locale)) {
 				// fix client locale wrong and client not loading at all
 				settings.locale = "en-US";
 				localStorage.setItem("UserSettingsStore", JSON.stringify(settings));