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 <jeremy.letto@datasite.com>
This commit is contained in:
Jeremy Letto 2022-03-06 17:19:51 -06:00 committed by GitHub
parent f5b973e15c
commit 21f7dd5eba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 555 additions and 279 deletions

View file

@ -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) {

View file

@ -1,4 +0,0 @@
{
"Common": { "disconnect": "Desconectar"},
"LoginContainer": { "title": "Acceso" }
}

View file

@ -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><1>qui aiment les jeux de cartes !</1>"},"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"}}}

View file

@ -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><1>die van kaartspellen houden!</1>"},"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"}}}

View file

@ -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"
}
}
}

View file

@ -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 (
<FormControl variant='outlined' className='CountryDropdown'>
<InputLabel id='CountryDropdown-select'>Country</InputLabel>
@ -31,11 +44,11 @@ const CountryDropdown = ({ input: { onChange } }) => {
</MenuItem>
{
Object.keys(CountryLabel).map((country, index:number) => (
sortedCountries.map((country, index:number) => (
<MenuItem value={country} key={index}>
<div className="CountryDropdown-item">
<img className="CountryDropdown-item__image" src={Images.Countries[country.toLowerCase()]} alt={CountryLabel[country]} />
<span className="CountryDropdown-item__label">{CountryLabel[country.toUpperCase()] || country.toUpperCase()}</span>
<img className="CountryDropdown-item__image" src={Images.Countries[country.toLowerCase()]} />
<span className="CountryDropdown-item__label">{t(`Common.countries.${country}`)}</span>
</div>
</MenuItem>
))

View file

@ -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 (
<MenuItem value={lang} key={lang}>
<div className="LanguageDropdown-item">
<img className="LanguageDropdown-item__image" src={Images.Countries[country]} alt={CountryLabel[country]} />
<img className="LanguageDropdown-item__image" src={Images.Countries[country]} />
<span className="LanguageDropdown-item__label">{lang}</span>
</div>
</MenuItem>

View file

@ -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
</div>
<div className='loginForm-item'>
<Field
label={passwordLabel}
onFocus={() => setPasswordLabel(PASSWORD_LABEL)}
label={useStoredPasswordLabel ? STORED_PASSWORD_LABEL : PASSWORD_LABEL}
onFocus={() => setUseStoredPasswordLabel(false)}
onBlur={() => togglePasswordLabel(useStoredPassword(values.remember, values.password))}
name='password'
type='password'

File diff suppressed because one or more lines are too long

View file

@ -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,

View file

@ -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,

View file

@ -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',
};

View file

@ -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',
}