All files / utils/test-utils trumpfLocales.ts

100% Statements 10/10
100% Branches 0/0
100% Functions 5/5
100% Lines 10/10

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 481x                                                                   1x 31x 31x   1x 31x 31x   1x 31x     1x  
export const trumpfLocales = {
    pt_BR: "Brasil",
    bg_BG: "Bulgaria",
    en_CA: "Canada",
    en_CN: "China",
    de_DE: "Deutschland",
    es_ES: "España",
    fr_FR: "France",
    en_IN: "India",
    it_IT: "Italia",
    hu_HU: "Magyarország",
    nl_NL: "Nederland",
    pl_PL: "Polska",
    pt_PT: "Portugal",
    ro_RO: "România",
    de_CH: "Schweiz",
    en_SG: "Singapore",
    sk_SK: "Slovensko",
    fr_CH: "Suisse",
    en_SE: "Sverige",
    tr_TR: "Türkiye",
    en_GB: "United Kingdom",
    en_US: "United States",
    vi_VN: "Việt Nam",
    de_AT: "Österreich",
    cs_CZ: "Česko",
    ru_RU: "Россия",
    th_TH: "ไทย",
    zh_CN: "中国",
    zh_TW: "台灣",
    ja_JP: "日本",
    ko_KR: "한국",
};
 
export const countries = Object.keys(trumpfLocales)
    .map((locale) => locale.split("_")[1])
    .filter((country, index, self) => self.indexOf(country) === index);
 
export const languages = Object.keys(trumpfLocales)
    .map((locale) => locale.split("_")[0])
    .filter((lng, index, self) => self.indexOf(lng) === index);
 
export const locales = Object.keys(trumpfLocales).map((locale) =>
    locale.replace("_", "-")
);
 
export default trumpfLocales;