Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/components/LanguageSwitcher.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import DialogDropdown from "./DialogDropdown.js";
const LOCALES_NAMES_MAP = {
bg: "Български",
ca: "Català",
"zh-CN": "简体中文",
cs: "Česky",
da: "Dansk",
de: "Deutsch",
en: "English",
es: "Español",
eu: "Euskera",
fi: "Suomi",
Expand All @@ -24,9 +24,10 @@ const LOCALES_NAMES_MAP = {
ru: "Русский",
sv: "Svenska",
tr: "Türkçe",
zh: "繁體中文",
ua: "Українська",
en: "English",
vi: "Tiếng Việt",
zh: "繁體中文",
"zh-CN": "简体中文",
};

const LanguageSwitcher = memo(() => {
Expand Down
4 changes: 4 additions & 0 deletions src/i18n/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import timeRu from "timeago.js/lib/lang/ru.js";
import timeSv from "timeago.js/lib/lang/sv.js";
import timeTr from "timeago.js/lib/lang/tr.js";
import timeUa from "timeago.js/lib/lang/uk.js";
import timeVi from "timeago.js/lib/lang/vi.js";
import timeZhCn from "timeago.js/lib/lang/zh_CN.js";
import timeZh from "timeago.js/lib/lang/zh_TW.js";
import bgTranslations from "./locales/bg.json" with { type: "json" };
Expand All @@ -47,6 +48,7 @@ import ruTranslations from "./locales/ru.json" with { type: "json" };
import svTranslations from "./locales/sv.json" with { type: "json" };
import trTranslations from "./locales/tr.json" with { type: "json" };
import uaTranslations from "./locales/ua.json" with { type: "json" };
import viTranslations from "./locales/vi.json" with { type: "json" };
import zhTranslations from "./locales/zh.json" with { type: "json" };
import zhCnTranslations from "./locales/zh-CN.json" with { type: "json" };

Expand All @@ -71,6 +73,7 @@ register("ru", timeRu);
register("sv", timeSv);
register("tr", timeTr);
register("ua", timeUa);
register("vi", timeVi);
register("zh", timeZh);
register("zh-CN", timeZhCn);

Expand All @@ -97,6 +100,7 @@ const resources = {
sv: svTranslations as ResourceLanguage,
tr: trTranslations as ResourceLanguage,
ua: uaTranslations as ResourceLanguage,
vi: viTranslations as ResourceLanguage,
zh: zhTranslations as ResourceLanguage,
"zh-CN": zhCnTranslations as ResourceLanguage,
} as const;
Expand Down
Loading