mirror of
				https://github.com/NginxProxyManager/nginx-proxy-manager.git
				synced 2025-11-03 17:13:33 +00:00 
			
		
		
		
	Remove incomplete languages and cleanup
This commit is contained in:
		@@ -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";
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,3 +0,0 @@
 | 
			
		||||
{
 | 
			
		||||
  "dashboard": "داشبورد"
 | 
			
		||||
}
 | 
			
		||||
@@ -1,5 +1,3 @@
 | 
			
		||||
{
 | 
			
		||||
  "locale-de-DE": "Deutsch",
 | 
			
		||||
  "locale-en-US": "English",
 | 
			
		||||
  "locale-fa-IR": "فارسی"
 | 
			
		||||
  "locale-en-US": "English"
 | 
			
		||||
}
 | 
			
		||||
@@ -1,5 +0,0 @@
 | 
			
		||||
{
 | 
			
		||||
	"dashboard": {
 | 
			
		||||
		"defaultMessage": "داشبورد"
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
@@ -1,11 +1,5 @@
 | 
			
		||||
{
 | 
			
		||||
	"locale-de-DE": {
 | 
			
		||||
		"defaultMessage": "Deutsch"
 | 
			
		||||
	},
 | 
			
		||||
	"locale-en-US": {
 | 
			
		||||
		"defaultMessage": "English"
 | 
			
		||||
	},
 | 
			
		||||
	"locale-fa-IR": {
 | 
			
		||||
		"defaultMessage": "فارسی"
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -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>
 | 
			
		||||
	);
 | 
			
		||||
};
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user