Remove incomplete languages and cleanup

This commit is contained in:
Jamie Curnow
2025-11-02 21:28:25 +10:00
parent 4709f9826c
commit 52e528f217
6 changed files with 2 additions and 41 deletions

View File

@@ -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";
}

View File

@@ -1,3 +0,0 @@
{
"dashboard": "داشبورد"
}

View File

@@ -1,5 +1,3 @@
{
"locale-de-DE": "Deutsch",
"locale-en-US": "English",
"locale-fa-IR": "فارسی"
"locale-en-US": "English"
}

View File

@@ -1,5 +0,0 @@
{
"dashboard": {
"defaultMessage": "داشبورد"
}
}

View File

@@ -1,11 +1,5 @@
{
"locale-de-DE": {
"defaultMessage": "Deutsch"
},
"locale-en-US": {
"defaultMessage": "English"
},
"locale-fa-IR": {
"defaultMessage": "فارسی"
}
}

View File

@@ -125,20 +125,6 @@ const Dashboard = () => {
</div>
</div>
</div>
<pre>
<code>{`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
`}</code>
</pre>
</div>
);
};