refactor: more i18n

This commit is contained in:
Tristan Yang
2022-11-30 19:49:08 +08:00
parent 51ca2d52fa
commit 92dfe51d30
4 changed files with 19 additions and 10 deletions
+6 -1
View File
@@ -27,6 +27,11 @@
"enter": "Enter",
"last_tip": "Now lets invite others!",
"last_desc": "Send invitation link to your future community members:",
"done": "Done"
"done": "Done",
"welcome_page": "Welcome Page",
"set_name": "Set Name",
"admin_account": "Admin Account",
"who_sign_up": "Who Can Sign Up",
"invites": "Invites"
}
}
+6 -1
View File
@@ -27,6 +27,11 @@
"enter": "进入",
"last_tip": "现在,你可以邀请别人啦!",
"last_desc": "将邀请链接发送给将来要入驻的社区成员吧:",
"done": "完成"
"done": "完成",
"welcome_page": "欢迎",
"set_name": "设置名称",
"admin_account": "管理员账号",
"who_sign_up": "注册权限",
"invites": "邀请"
}
}
@@ -9,7 +9,6 @@ import ContextMenu, { Item } from "../../../common/component/ContextMenu";
import useUserOperation from "../../../common/hook/useUserOperation";
import { useAppSelector } from "../../../app/store";
import { useTranslation } from "react-i18next";
import { t } from "i18next";
type Props = {
context: "user" | "channel";
id: number;
+7 -7
View File
@@ -1,6 +1,6 @@
import { useCallback, useState } from "react";
import { Swiper } from "swiper/types";
import { t } from 'i18next';
// `name` for in-code usage, `label` for display
export interface Step {
name: string;
@@ -11,28 +11,28 @@ export interface Step {
const steps: Step[] = [
{
name: "welcomePage",
label: "Welcome Page"
label: t("welcome:onboarding.welcome_page")
},
{
name: "serverName",
label: "Set Name"
label: t("welcome:onboarding.set_name")
},
{
name: "adminAccount",
label: "Admin Account"
label: t("welcome:onboarding.admin_account")
},
{
name: "whoCanSignUp",
label: "Who Can Sign Up"
label: t("welcome:onboarding.who_sign_up")
},
{
name: "inviteLink",
label: "Invites",
label: t("welcome:onboarding.invites"),
canJumpTo: ["whoCanSignUp"]
},
{
name: "donePage",
label: "Done",
label: t("welcome:onboarding.done"),
canJumpTo: ["whoCanSignUp", "inviteLink"]
}
];