From dc527467d55f3c24a5ed6ed59ee08d7cb8654bc3 Mon Sep 17 00:00:00 2001 From: Paul Makles Date: Sat, 15 Jan 2022 15:23:03 +0000 Subject: [PATCH] chore(locale): add languages (Bengali, Catalonian, Danish, Esperanto) --- src/context/Locale.tsx | 14 ++++++++++++++ src/pages/settings/assets/esperanto.svg | 5 +++++ src/pages/settings/panes/Languages.tsx | 14 ++++++++++++-- 3 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 src/pages/settings/assets/esperanto.svg diff --git a/src/context/Locale.tsx b/src/context/Locale.tsx index 1eb409ef..76a5302a 100644 --- a/src/context/Locale.tsx +++ b/src/context/Locale.tsx @@ -25,7 +25,10 @@ export enum Language { AZERBAIJANI = "az", BELARUSIAN = "be", BULGARIAN = "bg", + BENGALI = "bn", + CATALONIAN = "ca", CZECH = "cs", + DANISH = "da", GERMAN = "de", GREEK = "el", SPANISH = "es", @@ -66,6 +69,7 @@ export enum Language { CHINESE_SIMPLIFIED = "zh_Hans", TOKIPONA = "tokipona", + ESPERANTO = "esperanto", OWO = "owo", PIRATE = "pr", @@ -96,7 +100,10 @@ export const Languages: { [key in Language]: LanguageEntry } = { az: { display: "Azərbaycan dili", emoji: "🇦🇿", i18n: "az" }, be: { display: "беларуская", emoji: "🇧🇾", i18n: "be" }, bg: { display: "български", emoji: "🇧🇬", i18n: "bg" }, + bn: { display: "বাংলা", emoji: "🇧🇩", i18n: "bn" }, + ca: { display: "Català", emoji: "🇪🇸", i18n: "ca" }, cs: { display: "Čeština", emoji: "🇨🇿", i18n: "cs" }, + da: { display: "Danskers", emoji: "🇩🇰", i18n: "da" }, de: { display: "Deutsch", emoji: "🇩🇪", i18n: "de" }, el: { display: "Ελληνικά", emoji: "🇬🇷", i18n: "el" }, es: { display: "Español", emoji: "🇪🇸", i18n: "es" }, @@ -158,6 +165,13 @@ export const Languages: { [key in Language]: LanguageEntry } = { dayjs: "en-gb", cat: "const", }, + esperanto: { + display: "Esperanto", + emoji: "EO", + i18n: "eo", + dayjs: "en-gb", + cat: "const", + }, owo: { display: "OwO", diff --git a/src/pages/settings/assets/esperanto.svg b/src/pages/settings/assets/esperanto.svg new file mode 100644 index 00000000..b603f74e --- /dev/null +++ b/src/pages/settings/assets/esperanto.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/src/pages/settings/panes/Languages.tsx b/src/pages/settings/panes/Languages.tsx index 6947bb12..541218d4 100644 --- a/src/pages/settings/panes/Languages.tsx +++ b/src/pages/settings/panes/Languages.tsx @@ -16,6 +16,7 @@ import Emoji from "../../../components/common/Emoji"; import Checkbox from "../../../components/ui/Checkbox"; import Tip from "../../../components/ui/Tip"; import enchantingTableWEBP from "../assets/enchanting_table.webp"; +import esperantoFlagSVG from "../assets/esperanto.svg"; import tamilFlagPNG from "../assets/tamil_nadu_flag.png"; import tokiponaSVG from "../assets/toki_pona.svg"; @@ -39,18 +40,27 @@ function Entry({ entry: [x, lang], selected, onSelect }: Props) { checked={selected} onChange={onSelect}>
- {lang.i18n === "ta" ? ( + {lang.i18n === "eo" ? ( + + ) : lang.i18n === "ta" ? ( ) : lang.emoji === "🙂" ? ( - + ) : lang.emoji === "🪄" ? ( ) : (