diff --git a/external/lang b/external/lang index 0da16a53..da8e3f8b 160000 --- a/external/lang +++ b/external/lang @@ -1 +1 @@ -Subproject commit 0da16a539dc35a0050119e1a239bd0b31eb7b962 +Subproject commit da8e3f8bb3cc01867e2f3fb731e2a5a26cdab0f5 diff --git a/src/context/Locale.tsx b/src/context/Locale.tsx index c06b7018..7572bd78 100644 --- a/src/context/Locale.tsx +++ b/src/context/Locale.tsx @@ -59,7 +59,7 @@ export interface LanguageEntry { i18n: string; dayjs?: string; rtl?: boolean; - alt?: boolean; + cat?: "const" | "alt"; } export const Languages: { [key in Language]: LanguageEntry } = { @@ -97,12 +97,6 @@ export const Languages: { [key in Language]: LanguageEntry } = { ru: { display: "Русский", emoji: "🇷🇺", i18n: "ru" }, sr: { display: "Српски", emoji: "🇷🇸", i18n: "sr" }, sv: { display: "Svenska", emoji: "🇸🇪", i18n: "sv" }, - tokipona: { - display: "Toki Pona", - emoji: "🙂", - i18n: "tokipona", - dayjs: "en-gb", - }, tr: { display: "Türkçe", emoji: "🇹🇷", i18n: "tr" }, uk: { display: "Українська", emoji: "🇺🇦", i18n: "uk" }, zh_Hans: { @@ -112,33 +106,41 @@ export const Languages: { [key in Language]: LanguageEntry } = { dayjs: "zh", }, + tokipona: { + display: "Toki Pona", + emoji: "🙂", + i18n: "tokipona", + dayjs: "en-gb", + cat: "const", + }, + owo: { display: "OwO", emoji: "🐱", i18n: "owo", dayjs: "en-gb", - alt: true, + cat: "alt", }, pr: { display: "Pirate", emoji: "🏴‍☠️", i18n: "pr", dayjs: "en-gb", - alt: true, + cat: "alt", }, bottom: { display: "Bottom", emoji: "🥺", i18n: "bottom", dayjs: "en-gb", - alt: true, + cat: "alt", }, piglatin: { display: "Pig Latin", emoji: "🐖", i18n: "piglatin", dayjs: "en-gb", - alt: true, + cat: "alt", }, }; diff --git a/src/pages/settings/panes/Languages.tsx b/src/pages/settings/panes/Languages.tsx index 68726c43..b0329dc6 100644 --- a/src/pages/settings/panes/Languages.tsx +++ b/src/pages/settings/panes/Languages.tsx @@ -55,7 +55,7 @@ export function Component(props: Props) {
{languages - .filter(([, lang]) => !lang.alt) + .filter(([, lang]) => !lang.cat) .map(([x, lang]) => ( ))} @@ -63,12 +63,19 @@ export function Component(props: Props) {

+
+ {languages + .filter(([, lang]) => lang.cat === "const") + .map(([x, lang]) => ( + + ))} +

{languages - .filter(([, lang]) => lang.alt) + .filter(([, lang]) => lang.cat === "alt") .map(([x, lang]) => ( ))}