From 52e528f21747b58b64db5cc9b07170236cd64f71 Mon Sep 17 00:00:00 2001 From: Jamie Curnow Date: Sun, 2 Nov 2025 21:28:25 +1000 Subject: [PATCH] Remove incomplete languages and cleanup --- frontend/src/locale/IntlProvider.tsx | 11 +---------- frontend/src/locale/lang/fa.json | 3 --- frontend/src/locale/lang/lang-list.json | 4 +--- frontend/src/locale/src/fa.json | 5 ----- frontend/src/locale/src/lang-list.json | 6 ------ frontend/src/pages/Dashboard/index.tsx | 14 -------------- 6 files changed, 2 insertions(+), 41 deletions(-) delete mode 100644 frontend/src/locale/lang/fa.json delete mode 100644 frontend/src/locale/src/fa.json diff --git a/frontend/src/locale/IntlProvider.tsx b/frontend/src/locale/IntlProvider.tsx index 8c4a7029..46467d01 100644 --- a/frontend/src/locale/IntlProvider.tsx +++ b/frontend/src/locale/IntlProvider.tsx @@ -1,21 +1,15 @@ import { createIntl, createIntlCache } from "react-intl"; import langEn from "./lang/en.json"; -import langFa from "./lang/fa.json"; import langList from "./lang/lang-list.json"; // first item of each array should be the language code, // not the country code // Remember when adding to this list, also update check-locales.js script -const localeOptions = [ - ["en", "en-US"], - ["fa", "fa-IR"], -]; +const localeOptions = [["en", "en-US"]]; const loadMessages = (locale?: string): typeof langList & typeof langEn => { const thisLocale = locale || "en"; switch (thisLocale.slice(0, 2)) { - case "fa": - return Object.assign({}, langList, langEn, langFa); default: return Object.assign({}, langList, langEn); } @@ -23,9 +17,6 @@ const loadMessages = (locale?: string): typeof langList & typeof langEn => { const getFlagCodeForLocale = (locale?: string) => { switch (locale) { - case "fa-IR": - case "fa": - return "IR"; default: return "EN"; } diff --git a/frontend/src/locale/lang/fa.json b/frontend/src/locale/lang/fa.json deleted file mode 100644 index 8f002c11..00000000 --- a/frontend/src/locale/lang/fa.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "dashboard": "داشبورد" -} \ No newline at end of file diff --git a/frontend/src/locale/lang/lang-list.json b/frontend/src/locale/lang/lang-list.json index 1d6bed3a..4d9de4e5 100644 --- a/frontend/src/locale/lang/lang-list.json +++ b/frontend/src/locale/lang/lang-list.json @@ -1,5 +1,3 @@ { - "locale-de-DE": "Deutsch", - "locale-en-US": "English", - "locale-fa-IR": "فارسی" + "locale-en-US": "English" } \ No newline at end of file diff --git a/frontend/src/locale/src/fa.json b/frontend/src/locale/src/fa.json deleted file mode 100644 index 84f5de46..00000000 --- a/frontend/src/locale/src/fa.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dashboard": { - "defaultMessage": "داشبورد" - } -} diff --git a/frontend/src/locale/src/lang-list.json b/frontend/src/locale/src/lang-list.json index cdd95d05..3f3b2697 100644 --- a/frontend/src/locale/src/lang-list.json +++ b/frontend/src/locale/src/lang-list.json @@ -1,11 +1,5 @@ { - "locale-de-DE": { - "defaultMessage": "Deutsch" - }, "locale-en-US": { "defaultMessage": "English" - }, - "locale-fa-IR": { - "defaultMessage": "فارسی" } } diff --git a/frontend/src/pages/Dashboard/index.tsx b/frontend/src/pages/Dashboard/index.tsx index 27a98442..5cb64867 100644 --- a/frontend/src/pages/Dashboard/index.tsx +++ b/frontend/src/pages/Dashboard/index.tsx @@ -125,20 +125,6 @@ const Dashboard = () => { -
-				{`Todo:
-
-- check mobile
-- REDO SCREENSHOTS in docs folder
-- check permissions in all places
-
-More for api, then implement here:
-- Add error message_18n for all backend errors
-- properly wrap all logger.debug called in isDebug check
-- add new api endpoint changes to swagger docs
-
-`}
-			
); };