Refactored language mappings to be more efficient

following advice of @wolflu05
This commit is contained in:
Matthias Mair 2023-10-19 00:13:40 +02:00
parent 6505f6462a
commit 1c36dd4366
No known key found for this signature in database
GPG Key ID: A593429DDA23B66A

View File

@ -7,39 +7,9 @@ import { api } from '../App';
import { useLocalState } from '../states/LocalState';
// Definitions
export type Locales =
| '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 type Locales = keyof typeof languages;
export const languages: Record<Locales, string> = {
export const languages: Record<string, string> = {
cs: t`Czech`,
da: t`Danish`,
de: t`German`,