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
5 changes: 5 additions & 0 deletions src/components/PersonalPairingShareModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ const LANGUAGE_OPTIONS: LanguageOption[] = [
{ code: "sw", label: "Kiswahili" },
{ code: "ur", label: "اردو" },
{ code: "vi", label: "Tiếng Việt" },
{ code: "zh-TW", label: "繁體中文(台灣)" },
];

const LANGUAGE_COPY: Record<string, LanguageCopy> = {
Expand Down Expand Up @@ -124,6 +125,10 @@ const LANGUAGE_COPY: Record<string, LanguageCopy> = {
shareMessage:
"Mở liên kết này để kết nối với một trạm Conduit đáng tin cậy. Nếu liên kết bị chặn, hãy sao chép và dán vào tiện ích Personal Pairing trong ứng dụng Psiphon.",
},
"zh-TW": {
shareMessage:
"開啟此連結即可連線至可信任的 Conduit Station。如果連結遭封鎖,請複製連結,並貼到 Psiphon App 的個人配對小工具中。",
},
};

const PRIMARY_CTA_PURPLE = "#A475E3";
Expand Down
8 changes: 8 additions & 0 deletions src/i18n/i18n.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,14 @@ describe("i18n service", () => {
expect(i18n.hasResourceBundle("ar-XB", "translation")).toBe(true);
});

test("has zh-TW resources", () => {
expect(i18n.hasResourceBundle("zh-TW", "translation")).toBe(true);
});

test("has zh-Hant-TW resources", () => {
expect(i18n.hasResourceBundle("zh-Hant-TW", "translation")).toBe(true);
});

test("does not initialize twice", () => {
i18nService.initI18n();
expect(getLocales).toHaveBeenCalledTimes(1);
Expand Down
10 changes: 10 additions & 0 deletions src/i18n/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import translationSW from "@/src/i18n/locales/sw/translation.json";
import translationTR from "@/src/i18n/locales/tr/translation.json";
import translationUR from "@/src/i18n/locales/ur/translation.json";
import translationVI from "@/src/i18n/locales/vi/translation.json";
import translationZHTW from "@/src/i18n/locales/zh_TW/translation.json";

const resources = {
ar: {
Expand Down Expand Up @@ -80,6 +81,15 @@ const resources = {
vi: {
translation: translationVI,
},
"zh-TW": {
translation: translationZHTW,
},
"zh-Hant": {
translation: translationZHTW,
},
"zh-Hant-TW": {
translation: translationZHTW,
},
// en-XA and ar-XB are Pseudolocales for testing.
"en-XA": {
translation: translationXA,
Expand Down
Loading