mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-11 11:05:28 +00:00
chore: update and add new languages
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { Check } from "@styled-icons/boxicons-regular";
|
||||
import { observer } from "mobx-react-lite";
|
||||
|
||||
import styles from "./Panes.module.scss";
|
||||
@@ -6,19 +7,22 @@ import { useMemo } from "preact/hooks";
|
||||
|
||||
import { useApplicationState } from "../../../mobx/State";
|
||||
|
||||
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";
|
||||
import britannyFlagSVG from "../assets/flags/brittany.svg";
|
||||
import enchantingTableWEBP from "../assets/flags/enchanting_table.webp";
|
||||
import esperantoFlagSVG from "../assets/flags/esperanto.svg";
|
||||
import kurdistanFlagSVG from "../assets/flags/kurdistan.svg";
|
||||
import tamilFlagPNG from "../assets/flags/tamil_nadu.png";
|
||||
import tokiponaSVG from "../assets/flags/toki_pona.svg";
|
||||
import venetoFlagSVG from "../assets/flags/veneto.svg";
|
||||
|
||||
import {
|
||||
Language,
|
||||
LanguageEntry,
|
||||
Languages as Langs,
|
||||
} from "../../../../external/lang/Languages";
|
||||
import Emoji from "../../../components/common/Emoji";
|
||||
import Checkbox from "../../../components/ui/Checkbox";
|
||||
import Tip from "../../../components/ui/Tip";
|
||||
|
||||
type Key = [Language, LanguageEntry];
|
||||
|
||||
@@ -40,22 +44,48 @@ function Entry({ entry: [x, lang], selected, onSelect }: Props) {
|
||||
checked={selected}
|
||||
onChange={onSelect}>
|
||||
<div className={styles.flag}>
|
||||
{lang.i18n === "eo" ? (
|
||||
{lang.i18n === "vec" ? (
|
||||
<img
|
||||
src={venetoFlagSVG}
|
||||
width={42}
|
||||
loading="lazy"
|
||||
style={{ objectFit: "cover", borderRadius: "6px" }}
|
||||
/>
|
||||
) : lang.i18n === "br" ? (
|
||||
<img
|
||||
src={britannyFlagSVG}
|
||||
width={42}
|
||||
loading="lazy"
|
||||
style={{ objectFit: "cover", borderRadius: "6px" }}
|
||||
/>
|
||||
) : lang.i18n === "ckb" ? (
|
||||
<img
|
||||
src={kurdistanFlagSVG}
|
||||
width={42}
|
||||
loading="lazy"
|
||||
style={{ objectFit: "cover", borderRadius: "6px" }}
|
||||
/>
|
||||
) : lang.i18n === "eo" ? (
|
||||
<img
|
||||
src={esperantoFlagSVG}
|
||||
width={42}
|
||||
loading="lazy"
|
||||
style={{ objectFit: "contain", borderRadius: "6px" }}
|
||||
style={{ objectFit: "cover", borderRadius: "6px" }}
|
||||
/>
|
||||
) : lang.i18n === "ta" ? (
|
||||
<img
|
||||
src={tamilFlagPNG}
|
||||
width={42}
|
||||
loading="lazy"
|
||||
style={{ objectFit: "contain" }}
|
||||
style={{ objectFit: "cover" }}
|
||||
/>
|
||||
) : lang.emoji === "🙂" ? (
|
||||
<img src={tokiponaSVG} width={42} loading="lazy" />
|
||||
<img
|
||||
src={tokiponaSVG}
|
||||
width={42}
|
||||
loading="lazy"
|
||||
style={{ borderRadius: "6px" }}
|
||||
/>
|
||||
) : lang.emoji === "🪄" ? (
|
||||
<img
|
||||
src={enchantingTableWEBP}
|
||||
@@ -67,7 +97,9 @@ function Entry({ entry: [x, lang], selected, onSelect }: Props) {
|
||||
<Emoji size={42} emoji={lang.emoji} />
|
||||
)}
|
||||
</div>
|
||||
<span className={styles.description}>{lang.display}</span>
|
||||
<span className={styles.description}>
|
||||
{lang.display} {lang.verified && <Check size={16} />}
|
||||
</span>
|
||||
</Checkbox>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user