Skip to content

Commit 9eb2a0a

Browse files
committed
fix:18n
1 parent e2d4fdf commit 9eb2a0a

4 files changed

Lines changed: 42 additions & 12 deletions

File tree

src/frontend/platform/public/locales/en-US/bs.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,11 @@
155155
"roleNamePrompt": "Role name cannot exceed 50 characters",
156156
"roleNameRequired": "Role name is required",
157157
"atLeastOneSpaceRequired": "At least one space is required",
158+
"spaceAuthorization": "空间授权",
159+
"spaceAuthorizationDesc": "选择该角色可以访问的空间",
160+
"spaceName": "空间名称",
161+
"workspace": "工作台",
162+
"adminSpace": "管理后台",
158163
"roleNameExists": "Role name already exists",
159164
"groupNameExists": "UserGroup name already exists",
160165
"groupNamePrompt": "UserGroup name cannot exceed 30 characters",

src/frontend/platform/public/locales/ja/bs.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,11 @@
162162
"roleNameExists": "ロール名はすでに存在します",
163163
"parameterConfig": "パラメータ設定",
164164
"language": "言語",
165+
"spaceAuthorization": "スペース権限",
166+
"spaceAuthorizationDesc": "このロールがアクセスできるスペースを選択",
167+
"spaceName": "スペース名",
168+
"workspace": "ワークスペース",
169+
"adminSpace": "管理コンソール",
165170
"assistantAuthorization": "アシスタント権限付与",
166171
"assistantName": "アシスタント名",
167172
"userList": "ユーザー一覧",

src/frontend/platform/public/locales/zh-Hans/bs.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,14 +157,19 @@
157157
"managePermission": "管理权限",
158158
"roleNamePrompt": "角色名称不能超过50字符",
159159
"roleNameRequired": "角色名称不可为空",
160-
"atLeastOneSpaceRequired": "至少选择一个空间",
160+
"atLeastOneSpaceRequired": "至少选择一个空间权限",
161161
"groupNameExists": "用户组名称不可重复",
162162
"groupNamePrompt": "用户组名称不能超过30字符",
163163
"groupNameRequired": "用户组名称不可为空",
164164
"roleNameExists": "角色名称已存在",
165165
"parameterConfig": "参数配置",
166-
166+
"spaceAuthorization": "空间授权",
167+
"spaceAuthorizationDesc": "选择该角色可以访问的空间",
168+
"spaceName": "空间名称",
169+
"workspace": "工作台",
170+
"adminSpace": "管理后台",
167171
"language": "语言",
172+
168173
"assistantAuthorization": "助手权限",
169174
"assistantName": "助手名称",
170175
"userList": "用户列表",

src/frontend/platform/src/pages/SystemPage/components/EditRole.tsx

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ const SearchPanne = ({
101101
page_num: page,
102102
page_size: pageSize
103103
};
104-
console.log(type, 7877);
105104

106105
switch (type) {
107106
case 'flow':
@@ -352,7 +351,7 @@ export default function EditRole({ id, name, groupId, onChange, onBeforeChange }
352351

353352
const [form, setForm] = useState({
354353
name,
355-
useSkills: [], useLibs: [], useAssistant: [], useFlows: [], useTools: [], useMenu: [MenuType.BUILD, MenuType.KNOWLEDGE, MenuType.MODEL, MenuType.EVALUATION, MenuType.BOARD],
354+
useSkills: [], useLibs: [], useAssistant: [], useFlows: [], useTools: [], useMenu: [MenuType.BUILD, MenuType.KNOWLEDGE, MenuType.MODEL, MenuType.EVALUATION],
356355
manageLibs: [], manageAssistants: [], manageSkills: [], manageFlows: [], manageTools: [], useBoards: [], manageBoards: [],
357356
allowCreateBoard: false,
358357
});
@@ -521,33 +520,48 @@ export default function EditRole({ id, name, groupId, onChange, onBeforeChange }
521520
{/* 空间授权 - 完全独立于菜单权限 */}
522521
<div className="mt-10">
523522
<div className="items-center relative">
524-
<p className="text-xl font-bold">{t('空间授权')}</p>
525-
<p className="text-sm text-[#8F959E]">{t('选择该角色可以访问的空间')}</p>
523+
<p className="text-xl font-bold">{t('system.spaceAuthorization')}</p>
524+
<p className="text-sm text-[#8F959E]">
525+
{t('system.spaceAuthorizationDesc')}
526+
</p>
526527
</div>
528+
527529
<div className="w-full">
528530
<Table>
529531
<TableHeader>
530532
<TableRow>
531-
<TableHead>{t('空间名称')}</TableHead>
532-
<TableHead className="text-right w-[75px]">{t('system.viewPermission')}</TableHead>
533+
<TableHead>{t('system.spaceName')}</TableHead>
534+
<TableHead className="text-right w-[75px]">
535+
{t('system.viewPermission')}
536+
</TableHead>
533537
</TableRow>
534538
</TableHeader>
539+
535540
<TableBody>
536541
<TableRow>
537-
<TableCell className="font-medium">{t('工作台')}</TableCell>
542+
<TableCell className="font-medium">
543+
{t('system.workspace')}
544+
</TableCell>
538545
<TableCell className="text-center">
539546
<Switch
540547
checked={spacePermissions.workspace}
541-
onCheckedChange={(bln) => handleSpacePermissionChange('workspace', bln)}
548+
onCheckedChange={(bln) =>
549+
handleSpacePermissionChange('workspace', bln)
550+
}
542551
/>
543552
</TableCell>
544553
</TableRow>
554+
545555
<TableRow>
546-
<TableCell className="font-medium">{t('管理后台')}</TableCell>
556+
<TableCell className="font-medium">
557+
{t('system.adminSpace')}
558+
</TableCell>
547559
<TableCell className="text-center">
548560
<Switch
549561
checked={spacePermissions.admin}
550-
onCheckedChange={(bln) => handleSpacePermissionChange('admin', bln)}
562+
onCheckedChange={(bln) =>
563+
handleSpacePermissionChange('admin', bln)
564+
}
551565
/>
552566
</TableCell>
553567
</TableRow>
@@ -556,6 +570,7 @@ export default function EditRole({ id, name, groupId, onChange, onBeforeChange }
556570
</div>
557571
</div>
558572

573+
559574
{/* 权限 Tabs */}
560575
<div className="flex gap-6 border-b mt-10">
561576
{PERMISSION_TABS.map(tab => (

0 commit comments

Comments
 (0)