From 21f7dd5eba0515de3b3f99c42c5f8b3530c146fe Mon Sep 17 00:00:00 2001 From: Jeremy Letto Date: Sun, 6 Mar 2022 17:19:51 -0600 Subject: [PATCH] add fr and nl translations (#4587) * add fr and nl translations * update fr * fix password label translation * translate country strings * fix double accents * fix Ivory Coast * sort countries * use more performant Collator over localeCompare Co-authored-by: Jeremy Letto --- webclient/prebuild.js | 18 +- .../public/locales/es-ES/translation.json | 4 - webclient/public/locales/fr/translation.json | 1 + webclient/public/locales/nl/translation.json | 1 + webclient/src/common.i18n.json | 252 +++++++++ .../CountryDropdown/CountryDropdown.tsx | 21 +- .../LanguageDropdown/LanguageDropdown.tsx | 4 +- webclient/src/forms/LoginForm/LoginForm.tsx | 9 +- webclient/src/i18n-default.json | 2 +- webclient/src/i18n.ts | 4 +- webclient/src/images/countries/_Countries.ts | 4 + webclient/src/types/countries.ts | 502 +++++++++--------- webclient/src/types/languages.ts | 12 +- 13 files changed, 555 insertions(+), 279 deletions(-) delete mode 100644 webclient/public/locales/es-ES/translation.json create mode 100644 webclient/public/locales/fr/translation.json create mode 100644 webclient/public/locales/nl/translation.json diff --git a/webclient/prebuild.js b/webclient/prebuild.js index 46f511e6..ddc6432a 100644 --- a/webclient/prebuild.js +++ b/webclient/prebuild.js @@ -66,10 +66,20 @@ async function createI18NDefault() { const files = getAllFiles(ROOT_DIR, i18nFileRegex); const allJson = await Promise.all(files.map(file => fse.readJson(file))); - const rollup = allJson.reduce((acc, json) => ({ - ...acc, - ...json, - }), {}); + const rollup = allJson.reduce((acc, json) => { + const newKeys = Object.keys(json); + + newKeys.forEach(key => { + if (acc[key]) { + throw new Error(`i18n key collision: ${key}\n${JSON.stringify(json)}`); + } + }); + + return { + ...acc, + ...json, + }; + }, {}); fse.outputFile(i18nDefaultFile, JSON.stringify(rollup)); } catch (e) { diff --git a/webclient/public/locales/es-ES/translation.json b/webclient/public/locales/es-ES/translation.json deleted file mode 100644 index 887d24a1..00000000 --- a/webclient/public/locales/es-ES/translation.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "Common": { "disconnect": "Desconectar"}, - "LoginContainer": { "title": "Acceso" } -} diff --git a/webclient/public/locales/fr/translation.json b/webclient/public/locales/fr/translation.json new file mode 100644 index 00000000..4d0d8196 --- /dev/null +++ b/webclient/public/locales/fr/translation.json @@ -0,0 +1 @@ +{"Common":{"language":"Traduire en anglais.","disconnect":"Déconnecter","label":{"confirmPassword":"Confirmer le mot de passe","confirmSure":"Êtes-vous sûr ?","country":"Pays","delete":"Effacer","email":"E-mail","hostName":"Nom d'hôte","hostAddress":"Adresse d'hôte","password":"Mot de passe","passwordAgain":"Mot de passe à nouveau","port":"Port","realName":"Nom réel","saveChanges":"Sauvegarder les changements","token":"Jeton","username":"Nom d'utilisateur"},"validation":{"minChars":"Minimum de {count} {count, plural, one {caractère} other {caractères}} requis","passwordsMustMatch":"Les mots de passe ne correspondent pas.","required":"Requis"}},"KnownHosts":{"label":"Hôte","add":"Ajouter un nouvel hôte","toast":"Hôte {mode, select, created {créé} deleted {effacé} other {édité}} avec succès."},"InitializeContainer":{"title":"LE SAVIEZ-VOUS ?","subtitle":"<1>Cockatrice est géré par des volontaires<1>qui aiment les jeux de cartes !"},"LoginContainer":{"header":{"title":"S'identifier","subtitle":"Un jeu de table virtuel multi-plate-forme pour jeux de cartes multijoueurs."},"footer":{"registerPrompt":"Pas encore inscrit ?","registerAction":"Créer un compte","credit":"Cockatrice est un projet open source.","version":"Version"},"content":{"subtitle1":"Jouer à des jeux de cartes multijoueurs en ligne.","subtitle2":"Jeu de table virtuel multi-plate-forme pour jeux de cartes multijoueurs. Gratuit pour toujours."},"toasts":{"passwordResetSuccessToast":"Mot de passe réinitialisé avec succès","accountActivationSuccess":"Compte activé avec succès"}},"UnsupportedContainer":{"title":"Navigateur non supporté","subtitle1":"Veuillez mettre à jour votre navigateur et/ou vérifier vos permissions.","subtitle2":"Note : La navigation privée désactive certaines permissions ou fonctionnalités."},"AccountActivationDialog":{"title":"Activation du compte","subtitle1":"Votre compte n'a pas encore été activé.","subtitle2":"Vous devez fournir le jeton d'activation reçu dans l'e-mail d'activation."},"KnownHostDialog":{"title":"{mode, select, edit {Éditer} other {Ajouter}} un hôte connu","subtitle":"Ajouter un nouvel hôte vous permet de vous connecter à différents serveurs. Entrez les détails ci-dessous dans votre liste d'hôtes."},"RegistrationDialog":{"title":"Créer un nouveau compte"},"RequestPasswordResetDialog":{"title":"Demander une réinitialisation du mot de passe"},"ResetPasswordDialog":{"title":"Réinitialiser le mot de passe"},"AccountActivationForm":{"error":{"failed":"L'activation du compte a échoué."},"label":{"activate":"Activer le compte"}},"KnownHostForm":{"help":"Besoin d'aide pour ajouter un nouvel hôte ?","label":{"add":"Ajouter un hôte","find":"Trouver un hôte"}},"LoginForm":{"label":{"autoConnect":"Connexion automatique","forgot":"Mot de passe oublié","login":"S'identifier","savePassword":"Enregistrer le mot de passe","savedPassword":"Mot de passe enregistré"}},"RegisterForm":{"label":{"register":"S'enregistrer"},"toast":{"registerSuccess":"Enregistrement réussi !"}},"RequestPasswordResetForm":{"error":"La demande de réinitialisation du mot de passe a échoué.","mfaEnabled":"L'authentification multifacteur est activée sur ce serveur.","request":"Réinitialiser jeton","skipRequest":"Je possède déjà un jeton de réinitialisation."},"ResetPasswordForm":{"error":"La réinitialisation du mot de passe a échoué.","label":{"reset":"Réinitialiser le mot de passe"}}} \ No newline at end of file diff --git a/webclient/public/locales/nl/translation.json b/webclient/public/locales/nl/translation.json new file mode 100644 index 00000000..8e504815 --- /dev/null +++ b/webclient/public/locales/nl/translation.json @@ -0,0 +1 @@ +{"Common":{"language":"Vertaal naar Nederlands.","disconnect":"Verbinding Verbreken","label":{"confirmPassword":"Wachtwoord Bevestigen","confirmSure":"Weet je het zeker?","country":"Land","delete":"Verwijderen","email":"Email","hostName":"Hostnaam","hostAddress":"Hostaddres","password":"Wachtwoord","passwordAgain":"Wachtwoord Nogmaals","port":"Poort","realName":"Echte Naam","saveChanges":"Wijzigingen Opslaan","token":"Token","username":"Gebruikersnaam"},"validation":{"minChars":"Minimum van {count} {count, plural, one {karakter} other {karakters}} verplicht","passwordsMustMatch":"Wachtwoorden komen niet overeen","required":"Verplicht"}},"KnownHosts":{"label":"Host","add":"Voeg nieuwe host toe","toast":"Host {mode, select created {toegevoegd} deleted {verwijderd} other {aangepast}}."},"InitializeContainer":{"title":"WIST JE DAT","subtitle":"<1>Cockatrice word gerund door vrijwilligers<1>die van kaartspellen houden!"},"LoginContainer":{"header":{"title":"Login","subtitle":"Een cross-platform virtual tabletop voor multiplayer kaartspellen."},"footer":{"registerPrompt":"Nog niet geregistreerd?","registerAction":"Maak een account aan","credit":"Cockatrice is een open source project","version":"Versie"},"content":{"subtitle1":"Speel multiplayer kaartspellen online.","subtitle2":"Cross-platform virtual tabletop voor multiplayer kaartspellen. Gratis en open source."},"toasts":{"passwordResetSuccessToast":"Wachtwoord Opnieuw Ingesteld","accountActivationSuccess":"Account Succesvol Geactiveerd"}},"UnsupportedContainer":{"title":"Niet-ondersteunde Browser","subtitle1":"Update je browser en/of check je instellingen.","subtitle2":"Let op: Private browsing zorgt er voor dat sommige browsers bepaalde toestemmingen of functies uitschakelen."},"AccountActivationDialog":{"title":"Account Activatie","subtitle1":"Je account is nog niet geactiveerd.","subtitle2":"Vul de activerings-token die je hebt ontvangen via de activerings-email in."},"KnownHostDialog":{"title":"{mode, select, edit {Aanpassen} other {Toevoegen}} Bekende Host","subtitle":"Door een nieuwe host toe te voegen kun je verbinden met andere servers. Vul hieronder de gegevens in."},"RegistrationDialog":{"title":"Maak Een Account Aan"},"RequestPasswordResetDialog":{"title":"Opniew Wachtwoord Aanvragen"},"ResetPasswordDialog":{"title":"Vraag Wachtwoord Opnieuw Aan"},"AccountActivationForm":{"error":{"failed":"Activering account mislukt"},"label":{"activate":"Activeer Account"}},"KnownHostForm":{"help":"Hulp nodig met het toevoegen van een nieuwe host?","label":{"add":"Voeg Host Toe","find":"Vind Host"}},"LoginForm":{"label":{"autoConnect":"Verbind Automatisch","forgot":"Wachtwoord Vergeten","login":"Log in","savePassword":"Wachtwoord Opslaan","savedPassword":"Opgeslagen Wachtwoord"}},"RegisterForm":{"label":{"register":"Registreer"},"toast":{"registerSuccess":"Registratie Geslaagd!"}},"RequestPasswordResetForm":{"error":"Opniew wachtwoord aanvragen mislukt","mfaEnabled":"Server heeft multi-factor authenticatie ingeschakeld","request":"Vraag Reset Token Aan","skipRequest":"Ik heb al een reset token"},"ResetPasswordForm":{"error":"Opnieuw wachtwoord aanvragen mislukt","label":{"reset":"Vraag Wachtwoord Opnieuw Aan"}}} \ No newline at end of file diff --git a/webclient/src/common.i18n.json b/webclient/src/common.i18n.json index 03225798..749f48c9 100644 --- a/webclient/src/common.i18n.json +++ b/webclient/src/common.i18n.json @@ -22,6 +22,258 @@ "minChars": "Minimum of {count} {count, plural, one {character} other {characters}} required", "passwordsMustMatch": "Passwords don't match", "required": "Required" + }, + "countries": { + "AF": "Afghanistan", + "AX": "Åland Islands", + "AL": "Albania", + "DZ": "Algeria", + "AS": "American Samoa", + "AD": "Andorra", + "AO": "Angola", + "AI": "Anguilla", + "AQ": "Antarctica", + "AG": "Antigua and Barbuda", + "AR": "Argentina", + "AM": "Armenia", + "AW": "Aruba", + "AU": "Australia", + "AT": "Austria", + "AZ": "Azerbaijan", + "BH": "Bahrain", + "BS": "Bahamas", + "BD": "Bangladesh", + "BB": "Barbados", + "BY": "Belarus", + "BE": "Belgium", + "BZ": "Belize", + "BJ": "Benin", + "BM": "Bermuda", + "BT": "Bhutan", + "BO": "Plurinational State of Bolivia", + "BQ": "Sint Eustatius and Saba Bonaire", + "BA": "Bosnia and Herzegovina", + "BW": "Botswana", + "BV": "Bouvet Island", + "BR": "Brazil", + "IO": "British Indian Ocean Territory", + "BN": "Brunei Darussalam", + "BG": "Bulgaria", + "BF": "Burkina Faso", + "BI": "Burundi", + "KH": "Cambodia", + "CM": "Cameroon", + "CA": "Canada", + "CV": "Cape Verde", + "KY": "Cayman Islands", + "CF": "Central African Republic", + "TD": "Chad", + "CL": "Chile", + "CN": "China", + "CX": "Christmas Island", + "CC": "Cocos (Keeling) Islands", + "CO": "Colombia", + "KM": "Comoros", + "CG": "Congo", + "CD": "The Democratic Republic of the Congo", + "CK": "Cook Islands", + "CR": "Costa Rica", + "CI": "Ivory Coast", + "HR": "Croatia", + "CU": "Cuba", + "CW": "Curaçao", + "CY": "Cyprus", + "CZ": "Czech Republic", + "DK": "Denmark", + "DJ": "Djibouti", + "DM": "Dominica", + "DO": "Dominican Republic", + "EC": "Ecuador", + "EG": "Egypt", + "SV": "El Salvador", + "GQ": "Equatorial Guinea", + "ER": "Eritrea", + "EE": "Estonia", + "ET": "Ethiopia", + "EU": "European Union", + "FK": "Falkland Islands (Malvinas)", + "FO": "Faroe Islands", + "FJ": "Fiji", + "FI": "Finland", + "FR": "France", + "GF": "French Guiana", + "PF": "French Polynesia", + "TF": "French Southern Territories", + "GA": "Gabon", + "GM": "Gambia", + "GE": "Georgia", + "DE": "Germany", + "GH": "Ghana", + "GI": "Gibraltar", + "GR": "Greece", + "GL": "Greenland", + "GD": "Grenada", + "GP": "Guadeloupe", + "GU": "Guam", + "GT": "Guatemala", + "GG": "Guernsey", + "GN": "Guinea", + "GW": "Guinea-Bissau", + "GY": "Guyana", + "HT": "Haiti", + "HM": "Heard Island and McDonald Islands", + "VA": "Holy See (Vatican City State)", + "HN": "Honduras", + "HK": "Hong Kong", + "HU": "Hungary", + "IS": "Iceland", + "IN": "India", + "ID": "Indonesia", + "IR": "Islamic Republic of Iran", + "IQ": "Iraq", + "IE": "Ireland", + "IM": "Isle of Man", + "IL": "Israel", + "IT": "Italy", + "JM": "Jamaica", + "JP": "Japan", + "JE": "Jersey", + "JO": "Jordan", + "KZ": "Kazakhstan", + "KE": "Kenya", + "KI": "Kiribati", + "KP": "Democratic People's Republic of Korea", + "KR": "Republic of Korea", + "KW": "Kuwait", + "KG": "Kyrgyzstan", + "LA": "Lao People's Democratic Republic", + "LV": "Latvia", + "LB": "Lebanon", + "LS": "Lesotho", + "LR": "Liberia", + "LY": "Libya", + "LI": "Liechtenstein", + "LT": "Lithuania", + "LU": "Luxembourg", + "MO": "Macao", + "MK": "The Former Yugoslav Republic of Macedonia", + "MG": "Madagascar", + "MW": "Malawi", + "MY": "Malaysia", + "MV": "Maldives", + "ML": "Mali", + "MT": "Malta", + "MH": "Marshall Islands", + "MQ": "Martinique", + "MR": "Mauritania", + "MU": "Mauritius", + "YT": "Mayotte", + "MX": "Mexico", + "FM": "Federated States of Micronesia", + "MD": "Republic of Moldova", + "MC": "Monaco", + "MN": "Mongolia", + "ME": "Montenegro", + "MS": "Montserrat", + "MA": "Morocco", + "MZ": "Mozambique", + "MM": "Myanmar", + "NA": "Namibia", + "NR": "Nauru", + "NP": "Nepal", + "NL": "Netherlands", + "NC": "New Caledonia", + "NZ": "New Zealand", + "NI": "Nicaragua", + "NE": "Niger", + "NG": "Nigeria", + "NU": "Niue", + "NF": "Norfolk Island", + "MP": "Northern Mariana Islands", + "NO": "Norway", + "OM": "Oman", + "PK": "Pakistan", + "PW": "Palau", + "PS": "State of Palestine", + "PA": "Panama", + "PG": "Papua New Guinea", + "PY": "Paraguay", + "PE": "Peru", + "PH": "Philippines", + "PN": "Pitcairn", + "PL": "Poland", + "PT": "Portugal", + "PR": "Puerto Rico", + "QA": "Qatar", + "RE": "Réunion", + "RO": "Romania", + "RU": "Russian Federation", + "RW": "Rwanda", + "BL": "Saint Barthélemy", + "SH": "Ascension and Tristan da Cunha Saint Helena", + "KN": "Saint Kitts and Nevis", + "LC": "Saint Lucia", + "MF": "Saint Martin (French part)", + "PM": "Saint Pierre and Miquelon", + "VC": "Saint Vincent and the Grenadines", + "WS": "Samoa", + "SM": "San Marino", + "ST": "Sao Tome and Principe", + "SA": "Saudi Arabia", + "SN": "Senegal", + "RS": "Serbia", + "SC": "Seychelles", + "SL": "Sierra Leone", + "SG": "Singapore", + "SX": "Sint Maarten (Dutch part)", + "SK": "Slovakia", + "SI": "Slovenia", + "SB": "Solomon Islands", + "SO": "Somalia", + "ZA": "South Africa", + "GS": "South Georgia and the South Sandwich Islands", + "SS": "South Sudan", + "ES": "Spain", + "LK": "Sri Lanka", + "SD": "Sudan", + "SR": "Suriname", + "SJ": "Svalbard and Jan Mayen", + "SZ": "Swaziland", + "SE": "Sweden", + "CH": "Switzerland", + "SY": "Syrian Arab Republic", + "TW": "Taiwan", + "TJ": "Tajikistan", + "TZ": "United Republic of Tanzania", + "TH": "Thailand", + "TL": "Timor-Leste", + "TG": "Togo", + "TK": "Tokelau", + "TO": "Tonga", + "TT": "Trinidad and Tobago", + "TN": "Tunisia", + "TR": "Turkey", + "TM": "Turkmenistan", + "TC": "Turks and Caicos Islands", + "TV": "Tuvalu", + "UG": "Uganda", + "UA": "Ukraine", + "AE": "United Arab Emirates", + "GB": "United Kingdom", + "US": "United States", + "UM": "United States Minor Outlying Islands", + "UY": "Uruguay", + "UZ": "Uzbekistan", + "VU": "Vanuatu", + "VE": "Bolivarian Republic of Venezuela", + "VN": "Viet Nam", + "VG": "British Virgin Islands", + "VI": "U.S. Virgin Islands", + "WF": "Wallis and Futuna", + "EH": "Western Sahara", + "YE": "Yemen", + "ZM": "Zambia", + "ZW": "Zimbabwe" } } } diff --git a/webclient/src/components/CountryDropdown/CountryDropdown.tsx b/webclient/src/components/CountryDropdown/CountryDropdown.tsx index 8e322b9c..e47d640e 100644 --- a/webclient/src/components/CountryDropdown/CountryDropdown.tsx +++ b/webclient/src/components/CountryDropdown/CountryDropdown.tsx @@ -3,15 +3,28 @@ import React, { useEffect, useState } from 'react'; import { Select, MenuItem } from '@material-ui/core'; import FormControl from '@material-ui/core/FormControl'; import InputLabel from '@material-ui/core/InputLabel'; +import { useTranslation } from 'react-i18next'; + import { Images } from 'images/Images'; +import { CountryCode } from 'types'; + import './CountryDropdown.css'; -import { CountryLabel } from 'types'; const CountryDropdown = ({ input: { onChange } }) => { const [state, setState] = useState(''); + const [sortedCountries, setSortedCountries] = useState([]); + const { t, i18n } = useTranslation(); useEffect(() => onChange(state), [state]); + useEffect(() => { + const collator = new Intl.Collator(i18n.language); + + setSortedCountries(Object.keys(CountryCode).sort((a, b) => + collator.compare(t(`Common.countries.${a}`), t(`Common.countries.${b}`)) + )); + }, [i18n.language]); + return ( Country @@ -31,11 +44,11 @@ const CountryDropdown = ({ input: { onChange } }) => { { - Object.keys(CountryLabel).map((country, index:number) => ( + sortedCountries.map((country, index:number) => (
- {CountryLabel[country]} - {CountryLabel[country.toUpperCase()] || country.toUpperCase()} + + {t(`Common.countries.${country}`)}
)) diff --git a/webclient/src/components/LanguageDropdown/LanguageDropdown.tsx b/webclient/src/components/LanguageDropdown/LanguageDropdown.tsx index 002f2695..56b64292 100644 --- a/webclient/src/components/LanguageDropdown/LanguageDropdown.tsx +++ b/webclient/src/components/LanguageDropdown/LanguageDropdown.tsx @@ -6,7 +6,7 @@ import FormControl from '@material-ui/core/FormControl'; import InputLabel from '@material-ui/core/InputLabel'; import { Images } from 'images/Images'; -import { CountryLabel, Language, LanguageCountry } from 'types'; +import { Language, LanguageCountry } from 'types'; import './LanguageDropdown.css'; @@ -36,7 +36,7 @@ const LanguageDropdown = () => { return (
- {CountryLabel[country]} + {lang}
diff --git a/webclient/src/forms/LoginForm/LoginForm.tsx b/webclient/src/forms/LoginForm/LoginForm.tsx index 91003daf..9e08bbca 100644 --- a/webclient/src/forms/LoginForm/LoginForm.tsx +++ b/webclient/src/forms/LoginForm/LoginForm.tsx @@ -19,10 +19,9 @@ const LoginForm = ({ onSubmit, disableSubmitButton, onResetPassword }: LoginForm const STORED_PASSWORD_LABEL = `* ${t('LoginForm.label.savedPassword')} *`; const [host, setHost] = useState(null); - const [passwordLabel, setPasswordLabel] = useState(PASSWORD_LABEL); + const [useStoredPasswordLabel, setUseStoredPasswordLabel] = useState(false); const [autoConnect, setAutoConnect] = useAutoConnect(); - const validate = values => { const errors: any = {}; @@ -38,7 +37,7 @@ const LoginForm = ({ onSubmit, disableSubmitButton, onResetPassword }: LoginForm const useStoredPassword = (remember, password) => remember && host.hashedPassword && !password; const togglePasswordLabel = (useStoredLabel) => { - setPasswordLabel(useStoredLabel ? STORED_PASSWORD_LABEL : PASSWORD_LABEL); + setUseStoredPasswordLabel(useStoredLabel); }; const handleOnSubmit = ({ userName, ...values }) => { @@ -120,8 +119,8 @@ const LoginForm = ({ onSubmit, disableSubmitButton, onResetPassword }: LoginForm
setPasswordLabel(PASSWORD_LABEL)} + label={useStoredPasswordLabel ? STORED_PASSWORD_LABEL : PASSWORD_LABEL} + onFocus={() => setUseStoredPasswordLabel(false)} onBlur={() => togglePasswordLabel(useStoredPassword(values.remember, values.password))} name='password' type='password' diff --git a/webclient/src/i18n-default.json b/webclient/src/i18n-default.json index a40915ac..097308aa 100644 --- a/webclient/src/i18n-default.json +++ b/webclient/src/i18n-default.json @@ -1 +1 @@ -{"Common":{"language":"Translate into English.","disconnect":"Disconnect","label":{"confirmPassword":"Confirm Password","confirmSure":"Are you sure?","country":"Country","delete":"Delete","email":"Email","hostName":"Host Name","hostAddress":"Host Address","password":"Password","passwordAgain":"Password Again","port":"Port","realName":"Real Name","saveChanges":"Save Changes","token":"Token","username":"Username"},"validation":{"minChars":"Minimum of {count} {count, plural, one {character} other {characters}} required","passwordsMustMatch":"Passwords don't match","required":"Required"}},"KnownHosts":{"label":"Host","add":"Add new host","toast":"Host successfully {mode, select, created {created} deleted {deleted} other {edited}}."},"InitializeContainer":{"title":"DID YOU KNOW","subtitle":"<1>Cockatrice is run by volunteers<1>that love card games!"},"LoginContainer":{"header":{"title":"Login","subtitle":"A cross-platform virtual tabletop for multiplayer card games."},"footer":{"registerPrompt":"Not registered yet?","registerAction":"Create an account","credit":"Cockatrice is an open source project","version":"Version"},"content":{"subtitle1":"Play multiplayer card games online.","subtitle2":"Cross-platform virtual tabletop for multiplayer card games. Forever free."},"toasts":{"passwordResetSuccessToast":"Password Reset Successfully","accountActivationSuccess":"Account Activated Successfully"}},"UnsupportedContainer":{"title":"Unsupported Browser","subtitle1":"Please update your browser and/or check your permissions.","subtitle2":"Note: Private browsing causes some browsers to disable certain permissions or features."},"AccountActivationDialog":{"title":"Account Activation","subtitle1":"Your account has not been activated yet.","subtitle2":"You need to provide the activation token received in the activation email."},"KnownHostDialog":{"title":"{mode, select, edit {Edit} other {Add}} Known Host","subtitle":"Adding a new host allows you to connect to different servers. Enter the details below to your host list."},"RegistrationDialog":{"title":"Create New Account"},"RequestPasswordResetDialog":{"title":"Request Password Reset"},"ResetPasswordDialog":{"title":"Reset Password"},"AccountActivationForm":{"error":{"failed":"Account activation failed"},"label":{"activate":"Activate Account"}},"KnownHostForm":{"help":"Need help adding a new host?","label":{"add":"Add Host","find":"Find Host"}},"LoginForm":{"label":{"autoConnect":"Auto Connect","forgot":"Forgot Password","login":"Login","savePassword":"Save Password","savedPassword":"Saved Password"}},"RegisterForm":{"label":{"register":"Register"},"toast":{"registerSuccess":"Registration Successful!"}},"RequestPasswordResetForm":{"error":"Request password reset failed","mfaEnabled":"Server has multi-factor authentication enabled","request":"Request Reset Token","skipRequest":"I already have a reset token"},"ResetPasswordForm":{"error":"Password reset failed","label":{"reset":"Reset Password"}}} \ No newline at end of file +{"Common":{"language":"Translate into English.","disconnect":"Disconnect","label":{"confirmPassword":"Confirm Password","confirmSure":"Are you sure?","country":"Country","delete":"Delete","email":"Email","hostName":"Host Name","hostAddress":"Host Address","password":"Password","passwordAgain":"Password Again","port":"Port","realName":"Real Name","saveChanges":"Save Changes","token":"Token","username":"Username"},"validation":{"minChars":"Minimum of {count} {count, plural, one {character} other {characters}} required","passwordsMustMatch":"Passwords don't match","required":"Required"},"countries":{"AF":"Afghanistan","AX":"Åland Islands","AL":"Albania","DZ":"Algeria","AS":"American Samoa","AD":"Andorra","AO":"Angola","AI":"Anguilla","AQ":"Antarctica","AG":"Antigua and Barbuda","AR":"Argentina","AM":"Armenia","AW":"Aruba","AU":"Australia","AT":"Austria","AZ":"Azerbaijan","BH":"Bahrain","BS":"Bahamas","BD":"Bangladesh","BB":"Barbados","BY":"Belarus","BE":"Belgium","BZ":"Belize","BJ":"Benin","BM":"Bermuda","BT":"Bhutan","BO":"Plurinational State of Bolivia","BQ":"Sint Eustatius and Saba Bonaire","BA":"Bosnia and Herzegovina","BW":"Botswana","BV":"Bouvet Island","BR":"Brazil","IO":"British Indian Ocean Territory","BN":"Brunei Darussalam","BG":"Bulgaria","BF":"Burkina Faso","BI":"Burundi","KH":"Cambodia","CM":"Cameroon","CA":"Canada","CV":"Cape Verde","KY":"Cayman Islands","CF":"Central African Republic","TD":"Chad","CL":"Chile","CN":"China","CX":"Christmas Island","CC":"Cocos (Keeling) Islands","CO":"Colombia","KM":"Comoros","CG":"Congo","CD":"The Democratic Republic of the Congo","CK":"Cook Islands","CR":"Costa Rica","CI":"Ivory Coast","HR":"Croatia","CU":"Cuba","CW":"Curaçao","CY":"Cyprus","CZ":"Czech Republic","DK":"Denmark","DJ":"Djibouti","DM":"Dominica","DO":"Dominican Republic","EC":"Ecuador","EG":"Egypt","SV":"El Salvador","GQ":"Equatorial Guinea","ER":"Eritrea","EE":"Estonia","ET":"Ethiopia","EU":"European Union","FK":"Falkland Islands (Malvinas)","FO":"Faroe Islands","FJ":"Fiji","FI":"Finland","FR":"France","GF":"French Guiana","PF":"French Polynesia","TF":"French Southern Territories","GA":"Gabon","GM":"Gambia","GE":"Georgia","DE":"Germany","GH":"Ghana","GI":"Gibraltar","GR":"Greece","GL":"Greenland","GD":"Grenada","GP":"Guadeloupe","GU":"Guam","GT":"Guatemala","GG":"Guernsey","GN":"Guinea","GW":"Guinea-Bissau","GY":"Guyana","HT":"Haiti","HM":"Heard Island and McDonald Islands","VA":"Holy See (Vatican City State)","HN":"Honduras","HK":"Hong Kong","HU":"Hungary","IS":"Iceland","IN":"India","ID":"Indonesia","IR":"Islamic Republic of Iran","IQ":"Iraq","IE":"Ireland","IM":"Isle of Man","IL":"Israel","IT":"Italy","JM":"Jamaica","JP":"Japan","JE":"Jersey","JO":"Jordan","KZ":"Kazakhstan","KE":"Kenya","KI":"Kiribati","KP":"Democratic People's Republic of Korea","KR":"Republic of Korea","KW":"Kuwait","KG":"Kyrgyzstan","LA":"Lao People's Democratic Republic","LV":"Latvia","LB":"Lebanon","LS":"Lesotho","LR":"Liberia","LY":"Libya","LI":"Liechtenstein","LT":"Lithuania","LU":"Luxembourg","MO":"Macao","MK":"The Former Yugoslav Republic of Macedonia","MG":"Madagascar","MW":"Malawi","MY":"Malaysia","MV":"Maldives","ML":"Mali","MT":"Malta","MH":"Marshall Islands","MQ":"Martinique","MR":"Mauritania","MU":"Mauritius","YT":"Mayotte","MX":"Mexico","FM":"Federated States of Micronesia","MD":"Republic of Moldova","MC":"Monaco","MN":"Mongolia","ME":"Montenegro","MS":"Montserrat","MA":"Morocco","MZ":"Mozambique","MM":"Myanmar","NA":"Namibia","NR":"Nauru","NP":"Nepal","NL":"Netherlands","NC":"New Caledonia","NZ":"New Zealand","NI":"Nicaragua","NE":"Niger","NG":"Nigeria","NU":"Niue","NF":"Norfolk Island","MP":"Northern Mariana Islands","NO":"Norway","OM":"Oman","PK":"Pakistan","PW":"Palau","PS":"State of Palestine","PA":"Panama","PG":"Papua New Guinea","PY":"Paraguay","PE":"Peru","PH":"Philippines","PN":"Pitcairn","PL":"Poland","PT":"Portugal","PR":"Puerto Rico","QA":"Qatar","RE":"Réunion","RO":"Romania","RU":"Russian Federation","RW":"Rwanda","BL":"Saint Barthélemy","SH":"Ascension and Tristan da Cunha Saint Helena","KN":"Saint Kitts and Nevis","LC":"Saint Lucia","MF":"Saint Martin (French part)","PM":"Saint Pierre and Miquelon","VC":"Saint Vincent and the Grenadines","WS":"Samoa","SM":"San Marino","ST":"Sao Tome and Principe","SA":"Saudi Arabia","SN":"Senegal","RS":"Serbia","SC":"Seychelles","SL":"Sierra Leone","SG":"Singapore","SX":"Sint Maarten (Dutch part)","SK":"Slovakia","SI":"Slovenia","SB":"Solomon Islands","SO":"Somalia","ZA":"South Africa","GS":"South Georgia and the South Sandwich Islands","SS":"South Sudan","ES":"Spain","LK":"Sri Lanka","SD":"Sudan","SR":"Suriname","SJ":"Svalbard and Jan Mayen","SZ":"Swaziland","SE":"Sweden","CH":"Switzerland","SY":"Syrian Arab Republic","TW":"Taiwan","TJ":"Tajikistan","TZ":"United Republic of Tanzania","TH":"Thailand","TL":"Timor-Leste","TG":"Togo","TK":"Tokelau","TO":"Tonga","TT":"Trinidad and Tobago","TN":"Tunisia","TR":"Turkey","TM":"Turkmenistan","TC":"Turks and Caicos Islands","TV":"Tuvalu","UG":"Uganda","UA":"Ukraine","AE":"United Arab Emirates","GB":"United Kingdom","US":"United States","UM":"United States Minor Outlying Islands","UY":"Uruguay","UZ":"Uzbekistan","VU":"Vanuatu","VE":"Bolivarian Republic of Venezuela","VN":"Viet Nam","VG":"British Virgin Islands","VI":"U.S. Virgin Islands","WF":"Wallis and Futuna","EH":"Western Sahara","YE":"Yemen","ZM":"Zambia","ZW":"Zimbabwe"}},"KnownHosts":{"label":"Host","add":"Add new host","toast":"Host successfully {mode, select, created {created} deleted {deleted} other {edited}}."},"InitializeContainer":{"title":"DID YOU KNOW","subtitle":"<1>Cockatrice is run by volunteers<1>that love card games!"},"LoginContainer":{"header":{"title":"Login","subtitle":"A cross-platform virtual tabletop for multiplayer card games."},"footer":{"registerPrompt":"Not registered yet?","registerAction":"Create an account","credit":"Cockatrice is an open source project","version":"Version"},"content":{"subtitle1":"Play multiplayer card games online.","subtitle2":"Cross-platform virtual tabletop for multiplayer card games. Forever free."},"toasts":{"passwordResetSuccessToast":"Password Reset Successfully","accountActivationSuccess":"Account Activated Successfully"}},"UnsupportedContainer":{"title":"Unsupported Browser","subtitle1":"Please update your browser and/or check your permissions.","subtitle2":"Note: Private browsing causes some browsers to disable certain permissions or features."},"AccountActivationDialog":{"title":"Account Activation","subtitle1":"Your account has not been activated yet.","subtitle2":"You need to provide the activation token received in the activation email."},"KnownHostDialog":{"title":"{mode, select, edit {Edit} other {Add}} Known Host","subtitle":"Adding a new host allows you to connect to different servers. Enter the details below to your host list."},"RegistrationDialog":{"title":"Create New Account"},"RequestPasswordResetDialog":{"title":"Request Password Reset"},"ResetPasswordDialog":{"title":"Reset Password"},"AccountActivationForm":{"error":{"failed":"Account activation failed"},"label":{"activate":"Activate Account"}},"KnownHostForm":{"help":"Need help adding a new host?","label":{"add":"Add Host","find":"Find Host"}},"LoginForm":{"label":{"autoConnect":"Auto Connect","forgot":"Forgot Password","login":"Login","savePassword":"Save Password","savedPassword":"Saved Password"}},"RegisterForm":{"label":{"register":"Register"},"toast":{"registerSuccess":"Registration Successful!"}},"RequestPasswordResetForm":{"error":"Request password reset failed","mfaEnabled":"Server has multi-factor authentication enabled","request":"Request Reset Token","skipRequest":"I already have a reset token"},"ResetPasswordForm":{"error":"Password reset failed","label":{"reset":"Reset Password"}}} \ No newline at end of file diff --git a/webclient/src/i18n.ts b/webclient/src/i18n.ts index ef188596..e1870fd3 100644 --- a/webclient/src/i18n.ts +++ b/webclient/src/i18n.ts @@ -17,9 +17,9 @@ i18n .use(initReactI18next) // for all options read: https://www.i18next.com/overview/configuration-options .init({ - fallbackLng: Language['en-US'], + fallbackLng: Language['en'], resources: { - [Language['en-US']]: { translation }, + [Language['en']]: { translation }, }, partialBundledLanguages: true, diff --git a/webclient/src/images/countries/_Countries.ts b/webclient/src/images/countries/_Countries.ts index 4278fa83..ac1c0535 100644 --- a/webclient/src/images/countries/_Countries.ts +++ b/webclient/src/images/countries/_Countries.ts @@ -45,6 +45,8 @@ import ci from './ci.svg'; import ck from './ck.svg'; import cl from './cl.svg'; import cm from './cm.svg'; +import cn from './cn.svg'; +import co from './co.svg'; import cr from './cr.svg'; import cu from './cu.svg'; import cv from './cv.svg'; @@ -295,6 +297,8 @@ export const Countries = { ck, cl, cm, + cn, + co, cr, cu, cv, diff --git a/webclient/src/types/countries.ts b/webclient/src/types/countries.ts index d6a313e2..d679e21b 100644 --- a/webclient/src/types/countries.ts +++ b/webclient/src/types/countries.ts @@ -1,252 +1,252 @@ -export enum CountryLabel{ - 'AF'= 'Afghanistan', - 'AX'= 'Åland Islands', - 'AL'= 'Albania', - 'DZ'= 'Algeria', - 'AS'= 'American Samoa', - 'AD'= 'Andorra', - 'AO'= 'Angola', - 'AI'= 'Anguilla', - 'AQ'= 'Antarctica', - 'AG'= 'Antigua and Barbuda', - 'AR'= 'Argentina', - 'AM'= 'Armenia', - 'AW'= 'Aruba', - 'AU'= 'Australia', - 'AT'= 'Austria', - 'AZ'= 'Azerbaijan', - 'BH'= 'Bahrain', - 'BS'= 'Bahamas', - 'BD'= 'Bangladesh', - 'BB'= 'Barbados', - 'BY'= 'Belarus', - 'BE'= 'Belgium', - 'BZ'= 'Belize', - 'BJ'= 'Benin', - 'BM'= 'Bermuda', - 'BT'= 'Bhutan', - 'BO'= 'Plurinational State of Bolivia', - 'BQ'= 'Sint Eustatius and Saba Bonaire', - 'BA'= 'Bosnia and Herzegovina', - 'BW'= 'Botswana', - 'BV'= 'Bouvet Island', - 'BR'= 'Brazil', - 'IO'= 'British Indian Ocean Territory', - 'BN'= 'Brunei Darussalam', - 'BG'= 'Bulgaria', - 'BF'= 'Burkina Faso', - 'BI'= 'Burundi', - 'KH'= 'Cambodia', - 'CM'= 'Cameroon', - 'CA'= 'Canada', - 'CV'= 'Cape Verde', - 'KY'= 'Cayman Islands', - 'CF'= 'Central African Republic', - 'TD'= 'Chad', - 'CL'= 'Chile', - 'CN'= 'China', - 'CX'= 'Christmas Island', - 'CC'= 'Cocos (Keeling) Islands', - 'CO'= 'Colombia', - 'KM'= 'Comoros', - 'CG'= 'Congo', - 'CD'= 'The Democratic Republic of the Congo', - 'CK'= 'Cook Islands', - 'CR'= 'Costa Rica', - 'CI'= 'Côte d\'Ivoire', - 'HR'= 'Croatia', - 'CU'= 'Cuba', - 'CW'= 'Curaçao', - 'CY'= 'Cyprus', - 'CZ'= 'Czech Republic', - 'DK'= 'Denmark', - 'DJ'= 'Djibouti', - 'DM'= 'Dominica', - 'DO'= 'Dominican Republic', - 'EC'= 'Ecuador', - 'EG'= 'Egypt', - 'SV'= 'El Salvador', - 'GQ'= 'Equatorial Guinea', - 'ER'= 'Eritrea', - 'EE'= 'Estonia', - 'ET'= 'Ethiopia', - 'EU'= 'European Union', - 'FK'= 'Falkland Islands (Malvinas)', - 'FO'= 'Faroe Islands', - 'FJ'= 'Fiji', - 'FI'= 'Finland', - 'FR'= 'France', - 'GF'= 'French Guiana', - 'PF'= 'French Polynesia', - 'TF'= 'French Southern Territories', - 'GA'= 'Gabon', - 'GM'= 'Gambia', - 'GE'= 'Georgia', - 'DE'= 'Germany', - 'GH'= 'Ghana', - 'GI'= 'Gibraltar', - 'GR'= 'Greece', - 'GL'= 'Greenland', - 'GD'= 'Grenada', - 'GP'= 'Guadeloupe', - 'GU'= 'Guam', - 'GT'= 'Guatemala', - 'GG'= 'Guernsey', - 'GN'= 'Guinea', - 'GW'= 'Guinea-Bissau', - 'GY'= 'Guyana', - 'HT'= 'Haiti', - 'HM'= 'Heard Island and McDonald Islands', - 'VA'= 'Holy See (Vatican City State)', - 'HN'= 'Honduras', - 'HK'= 'Hong Kong', - 'HU'= 'Hungary', - 'IS'= 'Iceland', - 'IN'= 'India', - 'ID'= 'Indonesia', - 'IR'= 'Islamic Republic of Iran', - 'IQ'= 'Iraq', - 'IE'= 'Ireland', - 'IM'= 'Isle of Man', - 'IL'= 'Israel', - 'IT'= 'Italy', - 'JM'= 'Jamaica', - 'JP'= 'Japan', - 'JE'= 'Jersey', - 'JO'= 'Jordan', - 'KZ'= 'Kazakhstan', - 'KE'= 'Kenya', - 'KI'= 'Kiribati', - 'KP'= 'Democratic People\'s Republic of Korea', - 'KR'= 'Republic of Korea', - 'KW'= 'Kuwait', - 'KG'= 'Kyrgyzstan', - 'LA'= 'Lao People\'s Democratic Republic', - 'LV'= 'Latvia', - 'LB'= 'Lebanon', - 'LS'= 'Lesotho', - 'LR'= 'Liberia', - 'LY'= 'Libya', - 'LI'= 'Liechtenstein', - 'LT'= 'Lithuania', - 'LU'= 'Luxembourg', - 'MO'= 'Macao', - 'MK'= 'The Former Yugoslav Republic of Macedonia', - 'MG'= 'Madagascar', - 'MW'= 'Malawi', - 'MY'= 'Malaysia', - 'MV'= 'Maldives', - 'ML'= 'Mali', - 'MT'= 'Malta', - 'MH'= 'Marshall Islands', - 'MQ'= 'Martinique', - 'MR'= 'Mauritania', - 'MU'= 'Mauritius', - 'YT'= 'Mayotte', - 'MX'= 'Mexico', - 'FM'= 'Federated States of Micronesia', - 'MD'= 'Republic of Moldova', - 'MC'= 'Monaco', - 'MN'= 'Mongolia', - 'ME'= 'Montenegro', - 'MS'= 'Montserrat', - 'MA'= 'Morocco', - 'MZ'= 'Mozambique', - 'MM'= 'Myanmar', - 'NA'= 'Namibia', - 'NR'= 'Nauru', - 'NP'= 'Nepal', - 'NL'= 'Netherlands', - 'NC'= 'New Caledonia', - 'NZ'= 'New Zealand', - 'NI'= 'Nicaragua', - 'NE'= 'Niger', - 'NG'= 'Nigeria', - 'NU'= 'Niue', - 'NF'= 'Norfolk Island', - 'MP'= 'Northern Mariana Islands', - 'NO'= 'Norway', - 'OM'= 'Oman', - 'PK'= 'Pakistan', - 'PW'= 'Palau', - 'PS'= 'State of Palestine', - 'PA'= 'Panama', - 'PG'= 'Papua New Guinea', - 'PY'= 'Paraguay', - 'PE'= 'Peru', - 'PH'= 'Philippines', - 'PN'= 'Pitcairn', - 'PL'= 'Poland', - 'PT'= 'Portugal', - 'PR'= 'Puerto Rico', - 'QA'= 'Qatar', - 'RE'= 'Réunion', - 'RO'= 'Romania', - 'RU'= 'Russian Federation', - 'RW'= 'Rwanda', - 'BL'= 'Saint Barthélemy', - 'SH'= 'Ascension and Tristan da Cunha Saint Helena', - 'KN'= 'Saint Kitts and Nevis', - 'LC'= 'Saint Lucia', - 'MF'= 'Saint Martin (French part)', - 'PM'= 'Saint Pierre and Miquelon', - 'VC'= 'Saint Vincent and the Grenadines', - 'WS'= 'Samoa', - 'SM'= 'San Marino', - 'ST'= 'Sao Tome and Principe', - 'SA'= 'Saudi Arabia', - 'SN'= 'Senegal', - 'RS'= 'Serbia', - 'SC'= 'Seychelles', - 'SL'= 'Sierra Leone', - 'SG'= 'Singapore', - 'SX'= 'Sint Maarten (Dutch part)', - 'SK'= 'Slovakia', - 'SI'= 'Slovenia', - 'SB'= 'Solomon Islands', - 'SO'= 'Somalia', - 'ZA'= 'South Africa', - 'GS'= 'South Georgia and the South Sandwich Islands', - 'SS'= 'South Sudan', - 'ES'= 'Spain', - 'LK'= 'Sri Lanka', - 'SD'= 'Sudan', - 'SR'= 'Suriname', - 'SJ'= 'Svalbard and Jan Mayen', - 'SZ'= 'Swaziland', - 'SE'= 'Sweden', - 'CH'= 'Switzerland', - 'SY'= 'Syrian Arab Republic', - 'TW'= 'Taiwan', - 'TJ'= 'Tajikistan', - 'TZ'= 'United Republic of Tanzania', - 'TH'= 'Thailand', - 'TL'= 'Timor-Leste', - 'TG'= 'Togo', - 'TK'= 'Tokelau', - 'TO'= 'Tonga', - 'TT'= 'Trinidad and Tobago', - 'TN'= 'Tunisia', - 'TR'= 'Turkey', - 'TM'= 'Turkmenistan', - 'TC'= 'Turks and Caicos Islands', - 'TV'= 'Tuvalu', - 'UG'= 'Uganda', - 'UA'= 'Ukraine', - 'AE'= 'United Arab Emirates', - 'GB'= 'United Kingdom', - 'US'= 'United States', - 'UM'= 'United States Minor Outlying Islands', - 'UY'= 'Uruguay', - 'UZ'= 'Uzbekistan', - 'VU'= 'Vanuatu', - 'VE'= 'Bolivarian Republic of Venezuela', - 'VN'= 'Viet Nam', - 'VG'= 'British Virgin Islands', - 'VI'= 'U.S. Virgin Islands', - 'WF'= 'Wallis and Futuna', - 'EH'= 'Western Sahara', - 'YE'= 'Yemen', - 'ZM'= 'Zambia', - 'ZW'= 'Zimbabwe' +export enum CountryCode { + 'AF' = 'AF', + 'AX' = 'AX', + 'AL' = 'AL', + 'DZ' = 'DZ', + 'AS' = 'AS', + 'AD' = 'AD', + 'AO' = 'AO', + 'AI' = 'AI', + 'AQ' = 'AQ', + 'AG' = 'AG', + 'AR' = 'AR', + 'AM' = 'AM', + 'AW' = 'AW', + 'AU' = 'AU', + 'AT' = 'AT', + 'AZ' = 'AZ', + 'BH' = 'BH', + 'BS' = 'BS', + 'BD' = 'BD', + 'BB' = 'BB', + 'BY' = 'BY', + 'BE' = 'BE', + 'BZ' = 'BZ', + 'BJ' = 'BJ', + 'BM' = 'BM', + 'BT' = 'BT', + 'BO' = 'BO', + 'BQ' = 'BQ', + 'BA' = 'BA', + 'BW' = 'BW', + 'BV' = 'BV', + 'BR' = 'BR', + 'IO' = 'IO', + 'BN' = 'BN', + 'BG' = 'BG', + 'BF' = 'BF', + 'BI' = 'BI', + 'KH' = 'KH', + 'CM' = 'CM', + 'CA' = 'CA', + 'CV' = 'CV', + 'KY' = 'KY', + 'CF' = 'CF', + 'TD' = 'TD', + 'CL' = 'CL', + 'CN' = 'CN', + 'CX' = 'CX', + 'CC' = 'CC', + 'CO' = 'CO', + 'KM' = 'KM', + 'CG' = 'CG', + 'CD' = 'CD', + 'CK' = 'CK', + 'CR' = 'CR', + 'CI' = 'CI', + 'HR' = 'HR', + 'CU' = 'CU', + 'CW' = 'CW', + 'CY' = 'CY', + 'CZ' = 'CZ', + 'DK' = 'DK', + 'DJ' = 'DJ', + 'DM' = 'DM', + 'DO' = 'DO', + 'EC' = 'EC', + 'EG' = 'EG', + 'SV' = 'SV', + 'GQ' = 'GQ', + 'ER' = 'ER', + 'EE' = 'EE', + 'ET' = 'ET', + 'EU' = 'EU', + 'FK' = 'FK', + 'FO' = 'FO', + 'FJ' = 'FJ', + 'FI' = 'FI', + 'FR' = 'FR', + 'GF' = 'GF', + 'PF' = 'PF', + 'TF' = 'TF', + 'GA' = 'GA', + 'GM' = 'GM', + 'GE' = 'GE', + 'DE' = 'DE', + 'GH' = 'GH', + 'GI' = 'GI', + 'GR' = 'GR', + 'GL' = 'GL', + 'GD' = 'GD', + 'GP' = 'GP', + 'GU' = 'GU', + 'GT' = 'GT', + 'GG' = 'GG', + 'GN' = 'GN', + 'GW' = 'GW', + 'GY' = 'GY', + 'HT' = 'HT', + 'HM' = 'HM', + 'VA' = 'VA', + 'HN' = 'HN', + 'HK' = 'HK', + 'HU' = 'HU', + 'IS' = 'IS', + 'IN' = 'IN', + 'ID' = 'ID', + 'IR' = 'IR', + 'IQ' = 'IQ', + 'IE' = 'IE', + 'IM' = 'IM', + 'IL' = 'IL', + 'IT' = 'IT', + 'JM' = 'JM', + 'JP' = 'JP', + 'JE' = 'JE', + 'JO' = 'JO', + 'KZ' = 'KZ', + 'KE' = 'KE', + 'KI' = 'KI', + 'KP' = 'KP', + 'KR' = 'KR', + 'KW' = 'KW', + 'KG' = 'KG', + 'LA' = 'LA', + 'LV' = 'LV', + 'LB' = 'LB', + 'LS' = 'LS', + 'LR' = 'LR', + 'LY' = 'LY', + 'LI' = 'LI', + 'LT' = 'LT', + 'LU' = 'LU', + 'MO' = 'MO', + 'MK' = 'MK', + 'MG' = 'MG', + 'MW' = 'MW', + 'MY' = 'MY', + 'MV' = 'MV', + 'ML' = 'ML', + 'MT' = 'MT', + 'MH' = 'MH', + 'MQ' = 'MQ', + 'MR' = 'MR', + 'MU' = 'MU', + 'YT' = 'YT', + 'MX' = 'MX', + 'FM' = 'FM', + 'MD' = 'MD', + 'MC' = 'MC', + 'MN' = 'MN', + 'ME' = 'ME', + 'MS' = 'MS', + 'MA' = 'MA', + 'MZ' = 'MZ', + 'MM' = 'MM', + 'NA' = 'NA', + 'NR' = 'NR', + 'NP' = 'NP', + 'NL' = 'NL', + 'NC' = 'NC', + 'NZ' = 'NZ', + 'NI' = 'NI', + 'NE' = 'NE', + 'NG' = 'NG', + 'NU' = 'NU', + 'NF' = 'NF', + 'MP' = 'MP', + 'NO' = 'NO', + 'OM' = 'OM', + 'PK' = 'PK', + 'PW' = 'PW', + 'PS' = 'PS', + 'PA' = 'PA', + 'PG' = 'PG', + 'PY' = 'PY', + 'PE' = 'PE', + 'PH' = 'PH', + 'PN' = 'PN', + 'PL' = 'PL', + 'PT' = 'PT', + 'PR' = 'PR', + 'QA' = 'QA', + 'RE' = 'RE', + 'RO' = 'RO', + 'RU' = 'RU', + 'RW' = 'RW', + 'BL' = 'BL', + 'SH' = 'SH', + 'KN' = 'KN', + 'LC' = 'LC', + 'MF' = 'MF', + 'PM' = 'PM', + 'VC' = 'VC', + 'WS' = 'WS', + 'SM' = 'SM', + 'ST' = 'ST', + 'SA' = 'SA', + 'SN' = 'SN', + 'RS' = 'RS', + 'SC' = 'SC', + 'SL' = 'SL', + 'SG' = 'SG', + 'SX' = 'SX', + 'SK' = 'SK', + 'SI' = 'SI', + 'SB' = 'SB', + 'SO' = 'SO', + 'ZA' = 'ZA', + 'GS' = 'GS', + 'SS' = 'SS', + 'ES' = 'ES', + 'LK' = 'LK', + 'SD' = 'SD', + 'SR' = 'SR', + 'SJ' = 'SJ', + 'SZ' = 'SZ', + 'SE' = 'SE', + 'CH' = 'CH', + 'SY' = 'SY', + 'TW' = 'TW', + 'TJ' = 'TJ', + 'TZ' = 'TZ', + 'TH' = 'TH', + 'TL' = 'TL', + 'TG' = 'TG', + 'TK' = 'TK', + 'TO' = 'TO', + 'TT' = 'TT', + 'TN' = 'TN', + 'TR' = 'TR', + 'TM' = 'TM', + 'TC' = 'TC', + 'TV' = 'TV', + 'UG' = 'UG', + 'UA' = 'UA', + 'AE' = 'AE', + 'GB' = 'GB', + 'US' = 'US', + 'UM' = 'UM', + 'UY' = 'UY', + 'UZ' = 'UZ', + 'VU' = 'VU', + 'VE' = 'VE', + 'VN' = 'VN', + 'VG' = 'VG', + 'VI' = 'VI', + 'WF' = 'WF', + 'EH' = 'EH', + 'YE' = 'YE', + 'ZM' = 'ZM', + 'ZW' = 'ZW', }; diff --git a/webclient/src/types/languages.ts b/webclient/src/types/languages.ts index 4b3cb06a..ad0b8403 100644 --- a/webclient/src/types/languages.ts +++ b/webclient/src/types/languages.ts @@ -1,11 +1,11 @@ -import { CountryLabel } from './countries'; - export enum Language { - 'en-US' = 'en-US', - 'es-ES' = 'es-ES', + 'en' = 'en', + 'fr' = 'fr', + 'nl' = 'nl', } export enum LanguageCountry { - 'en-US' = 'us', - 'es-ES' = 'es', + 'en' = 'us', + 'fr' = 'fr', + 'nl' = 'nl', }