chore: tweak i18n

This commit is contained in:
johnnyjoy 2024-08-18 12:43:50 +08:00
parent a3943f5b2d
commit c571720d42
3 changed files with 13 additions and 15 deletions

View File

@ -62,10 +62,7 @@
"nickname": "Nickname",
"email": "Email",
"role": "Role",
"profile": "Profile",
"action": {
"add-user": "Add user"
}
"profile": "Profile"
},
"settings": {
"self": "Setting",
@ -76,11 +73,14 @@
"workspace": {
"self": "Workspace settings",
"custom-style": "Custom style",
"enable-user-signup": {
"self": "Enable user signup",
"description": "Once enabled, other users can signup."
"disallow-user-registration": {
"self": "Disallow user registration"
},
"default-visibility": "Default visibility"
"default-visibility": "Default visibility",
"member": {
"self": "Member",
"add": "Add member"
}
}
}
}

View File

@ -44,7 +44,7 @@ const WorkspaceMembersSection = () => {
return (
<>
<div className="w-full flex flex-col sm:flex-row justify-start items-start gap-4 sm:gap-x-16">
<p className="sm:w-1/4 text-2xl shrink-0 font-semibold text-gray-900 dark:text-gray-500">Members</p>
<p className="sm:w-1/4 text-2xl shrink-0 font-semibold text-gray-900 dark:text-gray-500">{t("settings.workspace.member.self")}</p>
<div className="w-full sm:w-auto grow flex flex-col justify-start items-start gap-4">
<div className="w-full flex justify-end">
<Button
@ -55,7 +55,7 @@ const WorkspaceMembersSection = () => {
setCurrentEditingUser(undefined);
}}
>
{t("user.action.add-user")}
{t("settings.workspace.member.add")}
</Button>
</div>
<div className="w-full flow-root">

View File

@ -1,11 +1,13 @@
import { Switch } from "@mui/joy";
import toast from "react-hot-toast";
import { useTranslation } from "react-i18next";
import { workspaceServiceClient } from "@/grpcweb";
import { useWorkspaceStore } from "@/stores";
import { WorkspaceSetting } from "@/types/proto/api/v1/workspace_service";
import SSOSection from "./SSOSection";
const WorkspaceSecuritySection = () => {
const { t } = useTranslation();
const workspaceStore = useWorkspaceStore();
const toggleDisallowUserRegistration = async (on: boolean) => {
@ -30,10 +32,6 @@ const WorkspaceSecuritySection = () => {
return;
}
console.log("1", {
setting: workspaceSetting,
updateMask: updateMask,
});
try {
await workspaceServiceClient.updateWorkspaceSetting({
setting: workspaceSetting,
@ -56,7 +54,7 @@ const WorkspaceSecuritySection = () => {
size="lg"
checked={workspaceStore.setting.disallowUserRegistration}
onChange={(event) => toggleDisallowUserRegistration(event.target.checked)}
endDecorator={<span>Disallow user registration</span>}
endDecorator={<span>{t("settings.workspace.disallow-user-registration.self")}</span>}
/>
</div>
</div>