Skip to content

Commit

Permalink
i18n: Completed the remaining parts of i18n and proofread some transl…
Browse files Browse the repository at this point in the history
…ations
  • Loading branch information
Patrickill committed Sep 5, 2024
1 parent 1b07265 commit 53f9b82
Show file tree
Hide file tree
Showing 24 changed files with 111 additions and 49 deletions.
8 changes: 4 additions & 4 deletions packages/global/support/permission/app/constant.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import { NullPermission, PermissionKeyEnum, PermissionList } from '../constant';
import { PermissionListType } from '../type';

import { i18nT } from '../../../../web/i18n/utils';
export enum AppPermissionKeyEnum {}
export const AppPermissionList: PermissionListType = {
[PermissionKeyEnum.read]: {
...PermissionList[PermissionKeyEnum.read],
description: '可使用该应用进行对话'
description: i18nT('app:permission.des.read')
},
[PermissionKeyEnum.write]: {
...PermissionList[PermissionKeyEnum.write],
description: '可查看和编辑应用'
description: i18nT('app:permission.des.write')
},
[PermissionKeyEnum.manage]: {
...PermissionList[PermissionKeyEnum.manage],
description: '写权限基础上,可配置发布渠道、查看对话日志、分配该应用权限'
description: i18nT('app:permission.des.manage')
}
};

Expand Down
14 changes: 7 additions & 7 deletions packages/global/support/permission/constant.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Permission } from './controller';
import { PermissionListType } from './type';

import { i18nT } from '../../../web/i18n/utils';
export enum AuthUserTypeEnum {
token = 'token',
root = 'root',
Expand All @@ -27,15 +27,15 @@ export const PermissionTypeMap = {
},
[PermissionTypeEnum.publicRead]: {
iconLight: 'support/permission/publicLight',
label: '团队可访问'
label: i18nT('user:permission.team_read')
},
[PermissionTypeEnum.publicWrite]: {
iconLight: 'support/permission/publicLight',
label: '团队可编辑'
label: i18nT('user:permission.team_write')
},
[PermissionTypeEnum.clbPrivate]: {
iconLight: 'support/permission/privateLight',
label: '仅协作者'
label: i18nT('user:permission.only_collaborators')
}
};

Expand All @@ -53,19 +53,19 @@ export enum PermissionKeyEnum {
}
export const PermissionList: PermissionListType = {
[PermissionKeyEnum.read]: {
name: '读权限',
name: i18nT('common:permission.read'),
description: '',
value: 0b100,
checkBoxType: 'single'
},
[PermissionKeyEnum.write]: {
name: '写权限',
name: i18nT('common:permission.write'),
description: '',
value: 0b110, // 如果某个资源有特殊要求,再重写这个值
checkBoxType: 'single'
},
[PermissionKeyEnum.manage]: {
name: '管理员',
name: i18nT('common:permission.manager'),
description: '',
value: 0b111,
checkBoxType: 'single'
Expand Down
7 changes: 4 additions & 3 deletions packages/global/support/permission/dataset/constant.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
import { i18nT } from '../../../../web/i18n/utils';
import { NullPermission, PermissionKeyEnum, PermissionList } from '../constant';

export enum DatasetPermissionKeyEnum {}

export const DatasetPermissionList = {
[PermissionKeyEnum.read]: {
...PermissionList[PermissionKeyEnum.read],
description: '可查看知识库内容'
description: i18nT('dataset:permission.des.read')
},
[PermissionKeyEnum.write]: {
...PermissionList[PermissionKeyEnum.write],
description: '可增加和变更知识库内容'
description: i18nT('dataset:permission.des.write')
},
[PermissionKeyEnum.manage]: {
...PermissionList[PermissionKeyEnum.manage],
description: '可管理整个知识库数据和信息'
description: i18nT('dataset:permission.des.manage')
}
};

Expand Down
8 changes: 4 additions & 4 deletions packages/global/support/permission/user/constant.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import { PermissionKeyEnum, PermissionList, ReadPermissionVal } from '../constant';
import { PermissionListType } from '../type';

import { i18nT } from '../../../../web/i18n/utils';
export const TeamPermissionList: PermissionListType = {
[PermissionKeyEnum.read]: {
...PermissionList[PermissionKeyEnum.read],
description: '成员仅可阅读相关资源,无法新建资源'
description: i18nT('user:permission_des.read')
},
[PermissionKeyEnum.write]: {
...PermissionList[PermissionKeyEnum.write],
description: '除了可读资源外,还可以新建新的资源'
description: i18nT('user:permission_des.write')
},
[PermissionKeyEnum.manage]: {
...PermissionList[PermissionKeyEnum.manage],
description: '可创建资源、邀请、删除成员'
description: i18nT('user:permission_des.manage')
}
};

Expand Down
4 changes: 2 additions & 2 deletions packages/global/support/wallet/usage/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ export enum UsageSourceEnum {

export const UsageSourceMap = {
[UsageSourceEnum.fastgpt]: {
label: '在线使用'
label: i18nT('common:core.chat.logs.online')
},
[UsageSourceEnum.api]: {
label: 'Api'
},
[UsageSourceEnum.shareLink]: {
label: '免登录链接'
label: i18nT('common:core.chat.logs.free_login')
},
[UsageSourceEnum.training]: {
label: 'dataset.Training Name'
Expand Down
9 changes: 8 additions & 1 deletion packages/web/i18n/en/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,15 @@
},
"move_app": "Move Application",
"not_json_file": "Please select a JSON file",
"paste_config": "Paste Configuration",
"or_drag_JSON": "or drag in JSON file",
"paste_config": "Paste Configuration",
"permission": {
"des": {
"manage": "Based on write permissions, you can configure publishing channels, view conversation logs, and assign permissions to the application.",
"read": "Use the app to have conversations",
"write": "Can view and edit apps"
}
},
"plugin_cost_per_times": "{{cost}}/time",
"plugin_dispatch": "Plugin Invocation",
"plugin_dispatch_tip": "Adds extra capabilities to the model. The specific plugins to be invoked will be autonomously decided by the model.\nIf a plugin is selected, the Dataset invocation will automatically be treated as a special plugin.",
Expand Down
18 changes: 13 additions & 5 deletions packages/web/i18n/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@
"common": {
"Action": "Action",
"Add": "Add",
"copy_to_clipboard": "Copy to Clipboard",
"Add New": "Add New",
"Add Success": "Added Successfully",
"All": "All",
Expand All @@ -123,7 +122,6 @@
"Confirm": "Confirm",
"Confirm Create": "Confirm Creation",
"Confirm Import": "Confirm Import",
"export_to_json": "Export to JSON",
"Confirm Move": "Move Here",
"Confirm Update": "Confirm Update",
"Confirm to leave the page": "Confirm to Leave This Page?",
Expand Down Expand Up @@ -195,7 +193,6 @@
"Save Success": "Saved Successfully",
"Save_and_exit": "Save and Exit",
"Search": "Search",
"json_config": "JSON Configuration",
"Select File Failed": "File Selection Failed",
"Select template": "Select Template",
"Set Avatar": "Click to Set Avatar",
Expand Down Expand Up @@ -230,6 +227,7 @@
"confirm": {
"Common Tip": "Operation Confirmation"
},
"copy_to_clipboard": "Copy to Clipboard",
"course": {
"Read Course": "Read Course"
},
Expand All @@ -241,6 +239,7 @@
"too_many_request": "Too Many Requests, Please Try Again Later.",
"unKnow": "An Unexpected Error Occurred"
},
"export_to_json": "Export to JSON",
"failed": "Failed",
"folder": {
"Drag Tip": "Click to Drag",
Expand All @@ -260,6 +259,7 @@
"jsonEditor": {
"Parse error": "Possible JSON Error, Please Check Carefully"
},
"json_config": "JSON Configuration",
"link": {
"UnValid": "Invalid Link"
},
Expand Down Expand Up @@ -529,6 +529,7 @@
"logs": {
"api": "API Call",
"feishu": "Feishu",
"free_login": "No login link",
"official_account": "Official Account",
"online": "Online Use",
"share": "External Link Call",
Expand Down Expand Up @@ -647,7 +648,8 @@
"success": "Sync Started"
}
},
"training": {}
"training": {
}
},
"data": {
"Auxiliary Data": "Auxiliary Data",
Expand Down Expand Up @@ -857,6 +859,7 @@
},
"http": {
"Add props": "Add Parameter",
"Add props_and_tips": "To add parameters, enter \"/\" to invoke the variable list",
"AppId": "App ID",
"AppSecret": "AppSecret",
"ChatId": "Current Chat ID",
Expand All @@ -865,8 +868,10 @@
"Key already exists": "Key Already Exists",
"Key cannot be empty": "Parameter Name Cannot Be Empty",
"Props name": "Parameter Name",
"Props name_and_tips": "Parameter name, enter \"/\" to call up the variable list",
"Props tip": "You can set related parameters for the HTTP request\nYou can call global variables or external parameter inputs through {{key}}, currently available variables:\n{{variable}}",
"Props value": "Parameter Value",
"Props value_and_tips": "Parameter value, enter \"/\" to invoke the variable list",
"ResponseChatItemId": "AI Response ID",
"Url and params have been split": "Path parameters have been automatically added to Params",
"curl import": "cURL Import",
Expand Down Expand Up @@ -1173,7 +1178,10 @@
"change_owner_placeholder": "Enter Username to Search Account",
"change_owner_success": "Ownership Transferred Successfully",
"change_owner_tip": "Your permissions will not be retained after the transfer",
"change_owner_to": "Transfer to"
"change_owner_to": "Transfer to",
"manager": "administrator",
"read": "Read permission",
"write": "write permission"
},
"plugin": {
"App": "Select App",
Expand Down
10 changes: 9 additions & 1 deletion packages/web/i18n/en/dataset.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@
"file_model_function_tip": "Enhances indexing and QA generation",
"filename": "Filename",
"folder_dataset": "Folder",
"permission": {
"des": {
"manage": "Can manage the entire knowledge base data and information",
"read": "View knowledge base content",
"write": "Ability to add and change knowledge base content"
}
},
"rebuild_embedding_start_tip": "Index model switching task has started",
"rebuilding_index_count": "Number of indexes being rebuilt: {{count}}",
"tag": {
Expand All @@ -34,7 +41,8 @@
"delete_tag_confirm": "Confirm to delete the tag?",
"manage": "Tagging",
"searchOrAddTag": "Search or Add Tag",
"tags": "Tags"
"tags": "Tags",
"total_tags": "Total {{total}} tags"
},
"the_knowledge_base_has_indexes_that_are_being_trained_or_being_rebuilt": "The Dataset has indexes that are being trained or rebuilt",
"website_dataset": "Website Sync",
Expand Down
17 changes: 11 additions & 6 deletions packages/web/i18n/en/user.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,19 @@
"conversion": "Conversion",
"convert_error": "Conversion Failed",
"convert_success": "Conversion Successful",
"current_token_price": "Current Token Price",
"not_need_invoice": "Balance payment, invoice not available",
"price": "Price",
"renew_plan": "Renew Plan",
"standard_valid_tip": "Plan Usage Rules: Higher-level plans will be used first. Unused plans will be activated later.",
"token_expire_1year": "Tokens are valid for one year",
"tokens": "Tokens",
"use_balance": "Use Balance",
"use_balance_hint": "Due to system upgrade, the 'Auto-renewal from balance' mode is canceled, and the balance recharge option is closed. Your balance can be used to purchase tokens.",
"valid_time": "Effective Time",
"you_can_convert": "You can convert",
"renew_plan": "Renew Plan",
"current_token_price": "Current Token Price",
"yuan": "Yuan"
},
"promotion": {
"register": "Friend Registration",
"pay": "Friend Payment"
},
"bind_inform_account_error": "Failed to Bind Notification Account",
"bind_inform_account_success": "Notification Account Bound Successfully",
"delete": {
Expand Down Expand Up @@ -78,7 +74,16 @@
"team_read": "Team Read Access",
"team_write": "Team Write Access"
},
"permission_des": {
"manage": "Can create resources, invite, and delete members",
"read": "Members can only read related resources and cannot create new resources.",
"write": "In addition to readable resources, you can also create new resources"
},
"permissions": "Permissions",
"promotion": {
"pay": "Friend Payment",
"register": "Friend Registration"
},
"register": {
"confirm": "Confirm Registration",
"error": "Registration Error",
Expand Down
2 changes: 2 additions & 0 deletions packages/web/i18n/en/workflow.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@
"select_another_application_to_call": "You can choose another application to call",
"special_array_format": "Special array format, returns an empty array when the search result is empty.",
"start_with": "Starts With",
"system_variables": "system variables",
"target_fields_description": "A target field consists of 'description' and 'key'. Multiple target fields can be extracted.",
"template": {
"ai_chat": "AI Chat",
Expand All @@ -150,6 +151,7 @@
"trigger_after_application_completion": "Will be triggered after the application is fully completed",
"update_link_error": "Error updating link",
"update_specified_node_output_or_global_variable": "Can update the output value of a specified node or update global variables",
"use_user_id": "User ID",
"user_question": "User Question",
"variable_picker_tips": "Type node name or variable name to search",
"variable_update": "Variable Update",
Expand Down
7 changes: 7 additions & 0 deletions packages/web/i18n/zh/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -179,5 +179,12 @@
"user_file_input_desc": "用户上传的文档和图片链接",
"user_select": "用户选择",
"user_select_tip": "该模块可配置多个选项,以供对话时选择。不同选项可导向不同工作流支线"
},
"permission": {
"des": {
"read": "可使用该应用进行对话",
"write": "可查看和编辑应用",
"manage": "写权限基础上,可配置发布渠道、查看对话日志、分配该应用权限"
}
}
}
4 changes: 4 additions & 0 deletions packages/web/i18n/zh/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,7 @@
"feishu": "飞书",
"official_account": "公众号",
"online": "在线使用",
"free_login": "免登录链接",
"share": "外部链接调用",
"team": "团队空间对话",
"test": "测试",
Expand Down Expand Up @@ -1159,6 +1160,9 @@
"Collaborator": "协作者",
"Default permission": "默认权限",
"Manage": "管理",
"manager": "管理员",
"read": "读权限",
"write": "写权限",
"No InheritPermission": "已限制权限,不再继承父级文件夹的权限,",
"Not collaborator": "暂无协作者",
"Owner": "创建者",
Expand Down
12 changes: 10 additions & 2 deletions packages/web/i18n/zh/dataset.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,17 @@
"delete_tag_confirm": "确定删除标签?",
"manage": "标签管理",
"searchOrAddTag": "搜索或添加标签",
"tags": "标签"
"tags": "标签",
"total_tags": "共{{total}}个标签"
},
"the_knowledge_base_has_indexes_that_are_being_trained_or_being_rebuilt": "知识库有训练中或正在重建的索引",
"website_dataset": "Web 站点同步",
"website_dataset_desc": "Web 站点同步允许你直接使用一个网页链接构建知识库"
"website_dataset_desc": "Web 站点同步允许你直接使用一个网页链接构建知识库",
"permission": {
"des": {
"read": "可查看知识库内容",
"write": "可增加和变更知识库内容",
"manage": "可管理整个知识库数据和信息"
}
}
}
5 changes: 5 additions & 0 deletions packages/web/i18n/zh/user.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,5 +104,10 @@
"official_account": "公众号",
"share": "分享链接",
"wecom": "企业微信"
},
"permission_des": {
"read": "成员仅可阅读相关资源,无法新建资源",
"write": "除了可读资源外,还可以新建新的资源",
"manage": "可创建资源、邀请、删除成员"
}
}
Loading

0 comments on commit 53f9b82

Please sign in to comment.