Kaynağa Gözat

Remove incomplete languages and cleanup

Jamie Curnow 1 ay önce
ebeveyn
işleme
52e528f217

+ 1 - 10
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";
 	}

+ 0 - 3
frontend/src/locale/lang/fa.json

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

+ 1 - 3
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"
 }

+ 0 - 5
frontend/src/locale/src/fa.json

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

+ 0 - 6
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": "فارسی"
 	}
 }

+ 0 - 14
frontend/src/pages/Dashboard/index.tsx

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