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 { createIntl, createIntlCache } from "react-intl";
 | 
				
			||||||
import langEn from "./lang/en.json";
 | 
					import langEn from "./lang/en.json";
 | 
				
			||||||
import langFa from "./lang/fa.json";
 | 
					 | 
				
			||||||
import langList from "./lang/lang-list.json";
 | 
					import langList from "./lang/lang-list.json";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// first item of each array should be the language code,
 | 
					// first item of each array should be the language code,
 | 
				
			||||||
// not the country code
 | 
					// not the country code
 | 
				
			||||||
// Remember when adding to this list, also update check-locales.js script
 | 
					// Remember when adding to this list, also update check-locales.js script
 | 
				
			||||||
const localeOptions = [
 | 
					const localeOptions = [["en", "en-US"]];
 | 
				
			||||||
	["en", "en-US"],
 | 
					 | 
				
			||||||
	["fa", "fa-IR"],
 | 
					 | 
				
			||||||
];
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
const loadMessages = (locale?: string): typeof langList & typeof langEn => {
 | 
					const loadMessages = (locale?: string): typeof langList & typeof langEn => {
 | 
				
			||||||
	const thisLocale = locale || "en";
 | 
						const thisLocale = locale || "en";
 | 
				
			||||||
	switch (thisLocale.slice(0, 2)) {
 | 
						switch (thisLocale.slice(0, 2)) {
 | 
				
			||||||
		case "fa":
 | 
					 | 
				
			||||||
			return Object.assign({}, langList, langEn, langFa);
 | 
					 | 
				
			||||||
		default:
 | 
							default:
 | 
				
			||||||
			return Object.assign({}, langList, langEn);
 | 
								return Object.assign({}, langList, langEn);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
@@ -23,9 +17,6 @@ const loadMessages = (locale?: string): typeof langList & typeof langEn => {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
const getFlagCodeForLocale = (locale?: string) => {
 | 
					const getFlagCodeForLocale = (locale?: string) => {
 | 
				
			||||||
	switch (locale) {
 | 
						switch (locale) {
 | 
				
			||||||
		case "fa-IR":
 | 
					 | 
				
			||||||
		case "fa":
 | 
					 | 
				
			||||||
			return "IR";
 | 
					 | 
				
			||||||
		default:
 | 
							default:
 | 
				
			||||||
			return "EN";
 | 
								return "EN";
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,3 +0,0 @@
 | 
				
			|||||||
{
 | 
					 | 
				
			||||||
  "dashboard": "داشبورد"
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@@ -1,5 +1,3 @@
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
  "locale-de-DE": "Deutsch",
 | 
					  "locale-en-US": "English"
 | 
				
			||||||
  "locale-en-US": "English",
 | 
					 | 
				
			||||||
  "locale-fa-IR": "فارسی"
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@@ -1,5 +0,0 @@
 | 
				
			|||||||
{
 | 
					 | 
				
			||||||
	"dashboard": {
 | 
					 | 
				
			||||||
		"defaultMessage": "داشبورد"
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@@ -1,11 +1,5 @@
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
	"locale-de-DE": {
 | 
					 | 
				
			||||||
		"defaultMessage": "Deutsch"
 | 
					 | 
				
			||||||
	},
 | 
					 | 
				
			||||||
	"locale-en-US": {
 | 
						"locale-en-US": {
 | 
				
			||||||
		"defaultMessage": "English"
 | 
							"defaultMessage": "English"
 | 
				
			||||||
	},
 | 
					 | 
				
			||||||
	"locale-fa-IR": {
 | 
					 | 
				
			||||||
		"defaultMessage": "فارسی"
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -125,20 +125,6 @@ const Dashboard = () => {
 | 
				
			|||||||
					</div>
 | 
										</div>
 | 
				
			||||||
				</div>
 | 
									</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>
 | 
							</div>
 | 
				
			||||||
	);
 | 
						);
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user