mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-27 09:10:51 +00:00
Refactored language mappings to be more efficient
following advice of @wolflu05
This commit is contained in:
@ -7,39 +7,9 @@ import { api } from '../App';
|
|||||||
import { useLocalState } from '../states/LocalState';
|
import { useLocalState } from '../states/LocalState';
|
||||||
|
|
||||||
// Definitions
|
// Definitions
|
||||||
export type Locales =
|
export type Locales = keyof typeof languages;
|
||||||
| 'cs'
|
|
||||||
| 'da'
|
|
||||||
| 'de'
|
|
||||||
| 'el'
|
|
||||||
| 'en'
|
|
||||||
| 'es'
|
|
||||||
| 'es-mx'
|
|
||||||
| 'fa'
|
|
||||||
| 'fi'
|
|
||||||
| 'fr'
|
|
||||||
| 'he'
|
|
||||||
| 'hi'
|
|
||||||
| 'hu'
|
|
||||||
| 'it'
|
|
||||||
| 'ja'
|
|
||||||
| 'ko'
|
|
||||||
| 'nl'
|
|
||||||
| 'no'
|
|
||||||
| 'pl'
|
|
||||||
| 'pt'
|
|
||||||
| 'pt-br'
|
|
||||||
| 'ru'
|
|
||||||
| 'sl'
|
|
||||||
| 'sv'
|
|
||||||
| 'th'
|
|
||||||
| 'tr'
|
|
||||||
| 'vi'
|
|
||||||
| 'zh-hans'
|
|
||||||
| 'zh-hant'
|
|
||||||
| 'pseudo-LOCALE';
|
|
||||||
|
|
||||||
export const languages: Record<Locales, string> = {
|
export const languages: Record<string, string> = {
|
||||||
cs: t`Czech`,
|
cs: t`Czech`,
|
||||||
da: t`Danish`,
|
da: t`Danish`,
|
||||||
de: t`German`,
|
de: t`German`,
|
||||||
|
Reference in New Issue
Block a user