Commit dfcffc7f by papapatrick Committed by GitHub

I18n: Completed i18n&&proofread some translations (#2619)

* i18n-1

* i18n: Completed the remaining parts of i18n and proofread some translations

* i18n: add default lang&&add app template i18n
parent b4238257
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')
}
};
......
import { Permission } from './controller';
import { PermissionListType } from './type';
import { i18nT } from '../../../web/i18n/utils';
export enum AuthUserTypeEnum {
token = 'token',
root = 'root',
......@@ -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')
}
};
......@@ -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'
......
import { i18nT } from '../../../../web/i18n/utils';
import { NullPermission, PermissionKeyEnum, PermissionList } from '../constant';
export enum DatasetPermissionKeyEnum {}
......@@ -5,15 +6,15 @@ 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')
}
};
......
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')
}
};
......
......@@ -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'
......
{
"Delete_all": "Delete all",
"chat_history": "chat record",
"chat_input_guide_lexicon_is_empty": "No vocabulary has been configured yet",
"citations": "{{num}} citations",
"Delete_all": "Clear All Lexicon",
"chat_history": "Conversation History",
"chat_input_guide_lexicon_is_empty": "Lexicon not configured yet",
"citations": "{{num}} References",
"click_contextual_preview": "Click to see contextual preview",
"config_input_guide": "Configure input boot",
"config_input_guide_lexicon": "Configure thesaurus",
"config_input_guide_lexicon_title": "Configure thesaurus",
"content_empty": "Content is empty",
"contextual": "context",
"contextual_preview": "Contextual preview",
"csv_input_lexicon_tip": "Only supports CSV batch import, click to download the template",
"custom_input_guide_url": "Custom thesaurus address",
"delete_all_input_guide_confirm": "Confirm to delete all input guide lexicons",
"empty_directory": "There is nothing left to choose from in this directory~",
"file_amount_over": "Exceed maximum number of files {{max}}",
"in_progress": "in progress",
"input_guide": "Input guide",
"config_input_guide": "Set Up Input Guide",
"config_input_guide_lexicon": "Set Up Lexicon",
"config_input_guide_lexicon_title": "Set Up Lexicon",
"content_empty": "No Content",
"contextual": "{{num}} Contexts",
"contextual_preview": "Contextual Preview {{num}} Items",
"csv_input_lexicon_tip": "Only CSV batch import is supported, click to download the template",
"custom_input_guide_url": "Custom Lexicon URL",
"delete_all_input_guide_confirm": "Are you sure you want to clear the input guide lexicon?",
"empty_directory": "This directory is empty~",
"file_amount_over": "Exceeded maximum file quantity {{max}}",
"in_progress": "In Progress",
"input_guide": "Input Guide",
"input_guide_lexicon": "Lexicon",
"input_guide_tip": "You can configure some preset questions. When the user enters a question, the relevant question is retrieved from these preset questions for prompt.",
"insert_input_guide,_some_data_already_exists": "Duplicate data, automatically filtered, insert: {{len}} data",
"is_chatting": "Chatting...please wait for the end",
"items": "strip",
"module_runtime_and": "module run time and",
"multiple_AI_conversations": "Multiple AI conversations",
"new_chat": "new conversation",
"new_input_guide_lexicon": "New lexicon",
"no_workflow_response": "No running data",
"plugins_output": "Plugin output",
"question_tip": "From left to right, the response order of each module",
"rearrangement": "Search results rearranged",
"input_guide_tip": "You can set up some preset questions. When the user inputs a question, related questions from these presets will be suggested.",
"insert_input_guide,_some_data_already_exists": "Duplicate data detected, automatically filtered, {{len}} items inserted",
"is_chatting": "Chatting in progress... please wait until it finishes",
"items": "Items",
"module_runtime_and": "Total Module Runtime",
"multiple_AI_conversations": "Multiple AI Conversations",
"new_chat": "New Conversation",
"new_input_guide_lexicon": "New Lexicon",
"no_workflow_response": "No workflow data",
"plugins_output": "Plugin Output",
"question_tip": "From top to bottom, the response order of each module",
"rearrangement": "Rearrangement of Retrieval Results",
"response": {
"node_inputs": "Node input"
"node_inputs": "Node Inputs"
},
"select_file": "Select file",
"select_img": "Select images",
"stream_output": "stream output",
"view_citations": "View citations",
"web_site_sync": "Web site synchronization"
"select_file": "Select File",
"select_img": "Select Image",
"stream_output": "Stream Output",
"view_citations": "View References",
"web_site_sync": "Web Site Sync"
}
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -3,40 +3,48 @@
"Enable": "Enable",
"Enabled": "Enabled",
"collection": {
"Create update time": "Create/Update time",
"Training type": "Training type"
"Create update time": "Creation/Update Time",
"Training type": "Training Mode"
},
"collection_tags": "Tags",
"common_dataset": "Common dataset",
"common_dataset_desc": "Can be built by importing files, web links, or manual entry",
"confirm_to_rebuild_embedding_tip": "Are you sure to switch the knowledge base index?\nSwitching index is a very heavy operation that requires re-indexing all the data in your knowledge base, which may take a long time. Please ensure that the remaining points in your account are sufficient.\n\nIn addition, you need to be careful to modify the applications that select this knowledge base to avoid mixing them with other index model knowledge bases.",
"collection_tags": "Collection Tags",
"common_dataset": "General Dataset",
"common_dataset_desc": "Build a Dataset by importing files, web links, or manual input.",
"confirm_to_rebuild_embedding_tip": "Are you sure you want to switch the index for the Dataset?\nSwitching the index is a significant operation that requires re-indexing all data in your Dataset, which may take a long time. Please ensure your account has sufficient remaining points.\n\nAdditionally, you need to update the applications that use this Dataset to avoid conflicts with other indexed model Datasets.",
"dataset": {
"no_collections": "no collections",
"no_tags": "no tags"
"no_collections": "No datasets available",
"no_tags": "No tags available"
},
"external_file": "External file",
"external_file_dataset_desc": "You can import files from an external file library to build a knowledge base. Files are not stored twice",
"external_id": "File id",
"external_read_url": "External read url",
"external_read_url_tip": "You can configure the reading address of your file library. This allows users to read and authenticate. You can currently use the {{fileId}} variable to refer to the external file ID.",
"external_url": "File read url",
"file_model_function_tip": "For enhanced indexing and QA generation",
"filename": "filename",
"external_file": "External File Library",
"external_file_dataset_desc": "Import files from an external file library to build a Dataset. The files will not be stored again.",
"external_id": "File Reading ID",
"external_read_url": "External Preview URL",
"external_read_url_tip": "Configure the reading URL of your file library for user authentication. Use the {{fileId}} variable to refer to the external file ID.",
"external_url": "File Access URL",
"file_model_function_tip": "Enhances indexing and QA generation",
"filename": "Filename",
"folder_dataset": "Folder",
"rebuild_embedding_start_tip": "The task of switching index models has begun",
"rebuilding_index_count": "Rebuilding count: {{count}}",
"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": {
"Add New": "Add new",
"Add_new_tag": "Add new tag",
"Edit_tag": "Edit tag",
"add": "Add",
"Add New": "Add New",
"Add_new_tag": "Add New Tag",
"Edit_tag": "Edit Tag",
"add": "Create",
"cancel": "Cancel",
"delete_tag_confirm": "Confirm to delete tag",
"manage": "Manage",
"searchOrAddTag": "Search or add tags",
"tags": "Tags"
"delete_tag_confirm": "Confirm to delete the tag?",
"manage": "Tagging",
"searchOrAddTag": "Search or Add Tag",
"tags": "Tags",
"total_tags": "Total {{total}} tags"
},
"the_knowledge_base_has_indexes_that_are_being_trained_or_being_rebuilt": "The knowledge base has indexes that are being trained or being rebuilt",
"website_dataset": "Web site",
"website_dataset_desc": "Web site synchronization allows you to use a web page link to build a dataset"
"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",
"website_dataset_desc": "Website sync allows you to build a Dataset directly using a web link."
}
{
"bucket_chat": "Chat file",
"bucket_file": "Dataset file",
"click_to_view_raw_source": "View source",
"file_name": "File Name",
"file_size": "File Size",
"reached_max_file_count": "Maximum number of files reached",
"release_the_mouse_to_upload_the_file": "Release the mouse to upload the file",
"select_and_drag_file_tip": "Click or drag files here to upload",
"bucket_chat": "Conversation Files",
"bucket_file": "Dataset Documents",
"click_to_view_raw_source": "Click to View Original Source",
"file_name": "Filename",
"file_size": "Filesize",
"release_the_mouse_to_upload_the_file": "Release Mouse to Upload File",
"select_and_drag_file_tip": "Click or Drag Files Here to Upload",
"select_file_amount_limit": "You can select up to {{max}} files",
"some_file_count_exceeds_limit": "Exceeds {{maxCount}} files, automatically truncated",
"some_file_size_exceeds_limit": "Some files exceed: {{maxSize}}, have been filtered",
"support_file_type": "Supports {{fileType}} type files",
"support_max_count": "Supports up to {{maxCount}} files.",
"support_max_size": "Maximum size per file: {{maxSize}}.",
"upload_error_description": "Only supports uploading multiple files or one folder at a time",
"upload_failed": "Upload failed"
"some_file_count_exceeds_limit": "Exceeded {{maxCount}} files, automatically truncated",
"some_file_size_exceeds_limit": "Some files exceed {{maxSize}}, filtered out",
"support_file_type": "Supports {{fileType}} file types",
"support_max_count": "Supports up to {{maxCount}} files",
"support_max_size": "Maximum file size is {{maxSize}}",
"upload_failed": "Upload Failed",
"reached_max_file_count": "Maximum file count reached",
"upload_error_description": "Only multiple files or a single folder can be uploaded at a time"
}
{
"app_key_tips": "These keys have the current application identification, refer to the document for specific use ",
"basic_info": "Basic information",
"app_key_tips": "These keys are already linked to the current application. Check the documentation for detailed usage.",
"basic_info": "Basic Info",
"copy_link_hint": "Copy the link below to the specified location",
"create_api_key": "Create new Key",
"create_link": "Create link",
"create_api_key": "Create New Key",
"create_link": "Create Link",
"default_response": "Default Response",
"edit_api_key": "Edit Key information",
"edit_feishu_bot": "Edit Feishu Robot",
"edit_api_key": "Edit Key Details",
"edit_feishu_bot": "Edit Feishu Bot",
"edit_link": "Edit",
"feishu_api": "Feishu interface",
"feishu_bot": "Feishu Robot",
"feishu_bot_desc": "Directly access Feishu Robot through API",
"feishu_name": "Lark",
"key_alias": "key alias, for display only ",
"key_tips": "You can use the API Key to access certain interfaces (you can't access the app, you need to use the API key within the app to access the app)",
"link_name": "Name of the share link",
"new_feishu_bot": "Added Feishu robot",
"feishu_api": "Feishu API",
"feishu_bot": "Feishu Bot",
"feishu_bot_desc": "Connect to Feishu Bot directly via API",
"feishu_name": "Feishu",
"key_alias": "Key alias, for display only",
"key_tips": "You can use the API key to access specific interfaces (cannot access the application, use the in-app API key for that)",
"link_name": "Share Link Name",
"new_feishu_bot": "Add New Feishu Bot",
"official_account": {
"api": "WeChat public account API",
"create_modal_title": "Create a WeChat public account to access",
"desc": "Directly access WeChat official account through API",
"edit_modal_title": "Edit WeChat public account access",
"name": "WeChat public account access",
"params": "Wechat params"
"api": "WeChat Official Account API",
"create_modal_title": "Create WeChat Official Account Integration",
"desc": "Connect to WeChat Official Account directly via API",
"edit_modal_title": "Edit WeChat Official Account Integration",
"name": "WeChat Official Account Integration",
"params": "WeChat Official Account Parameters"
},
"publish_name": "name",
"publish_name": "Name",
"qpm_is_empty": "QPM cannot be empty",
"qpm_tips": "How many times per minute can each IP ask at most",
"request_address": "Request address",
"show_share_link_modal_title": "Get started",
"token_auth": "Token authentication",
"token_auth_tips": "Identity verification server address, if this value is filled, a request will be sent to the specified server before each conversation to perform identity verification",
"token_auth_use_cases": "View usage instructions for identity verification",
"qpm_tips": "Maximum number of queries per minute per IP",
"request_address": "Request URL",
"show_share_link_modal_title": "Get Started",
"token_auth": "Token Authentication",
"token_auth_tips": "Token authentication server URL. If provided, a request will be sent to the specified server for authentication before each conversation.",
"token_auth_use_cases": "View Token Authentication Guide",
"wecom": {
"api": "Qiwei API",
"bot": "Enterprise WeChat robot",
"bot_desc": "Directly access enterprise WeChat robots through API",
"create_modal_title": "Create a Qiwei robot",
"edit_modal_title": "Edit Qiwei Robot",
"title": "Publish to enterprise WeChat robot"
"api": "WeCom API",
"bot": "WeCom Bot",
"bot_desc": "Connect to WeCom Bot directly via API",
"create_modal_title": "Create WeCom Bot",
"edit_modal_title": "Edit WeCom Bot",
"title": "Publish to WeCom Bot"
}
}
{
"bill": {
"balance": "Balance",
"buy_plan": "Buy a package",
"buy_standard_plan_success": "Package purchased successfully",
"contact_customer_service": "Contact customer service",
"conversion": "exchange",
"convert_error": "Redemption failed",
"convert_success": "Redemption successful",
"current_token_price": "Current points price",
"not_need_invoice": "Balance payment, unable to issue invoice",
"price": "price",
"renew_plan": "Renewal package",
"standard_valid_tip": "Package usage rules: The system gives priority to using more advanced packages, and the original unused packages will take effect later.",
"token_expire_1year": "Points are valid for one year",
"tokens": "integral",
"use_balance": "Use balance",
"use_balance_hint": "Due to the system upgrade, the original \"automatic renewal and deduction from balance\" mode has been cancelled, and the balance recharge entrance has been closed. \nYour balance can be used to purchase points",
"valid_time": "Effective time",
"you_can_convert": "You can redeem",
"buy_plan": "Purchase Plan",
"buy_standard_plan_success": "Plan Purchase Successful",
"contact_customer_service": "Contact Support",
"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",
"yuan": "Yuan"
},
"promotion": {
"register": "Register",
"pay": "Pay"
},
"bind_inform_account_error": "Abnormal binding notification account",
"bind_inform_account_success": "Binding notification account successful",
"code_error": {
"app_error": {
"invalid_app_type": "Wrong application type",
"invalid_owner": "Illegal app owner"
}
},
"bind_inform_account_error": "Failed to Bind Notification Account",
"bind_inform_account_success": "Notification Account Bound Successfully",
"delete": {
"admin_failed": "Failed to delete administrator",
"admin_success": "Administrator deleted successfully"
"admin_failed": "Failed to Delete Admin",
"admin_success": "Admin Deleted Successfully"
},
"has_chosen": "chosen",
"has_chosen": "Selected",
"login": {
"error": "Login exception",
"failed": "Login failed",
"login_account": "Login to {{account}} account",
"login_error": "wrong user name or password",
"password_condition": "Password maximum 60 characters",
"success": "login successful",
"to_register": "If you don’t have an account, please register."
"error": "Login Error",
"failed": "Login Failed",
"login_account": "Login to {{account}} Account",
"login_error": "Incorrect Username or Password",
"password_condition": "Password can be up to 60 characters",
"success": "Login Successful",
"to_register": "No account? Register"
},
"name": "name",
"name": "Name",
"notification": {
"Bind Notification Pipe Hint": "Bind the email address or mobile phone number for receiving notifications to ensure that you receive important system notifications in a timely manner.",
"remind_owner_bind": "Please remind the creator to bind the notification account"
"Bind Notification Pipe Hint": "Please bind a notification receiving account to ensure you receive notifications such as plan expiration reminders, ensuring your service runs smoothly.",
"remind_owner_bind": "Please remind the creator to bind a notification account"
},
"operations": "operate",
"operations": "Actions",
"password": {
"change_error": "Exception when changing password",
"code_required": "verification code must be filled",
"code_send_error": "Verification code sending exception",
"code_sended": "Verification code sent",
"change_error": "Password Change Error",
"code_required": "Verification Code Required",
"code_send_error": "Failed to Send Verification Code",
"code_sended": "Verification Code Sent",
"confirm": "Confirm Password",
"email_phone": "Email/Mobile phone number",
"email_phone_error": "Email/mobile phone number format error",
"email_phone_void": "Email/mobile phone number cannot be empty",
"get_code": "get verification code",
"get_code_again": "Reacquire after s",
"new_password": "New password (4~20 digits)",
"not_match": "Two passwords are inconsistent",
"password_condition": "Password must be at least 4 characters and at most 20 characters",
"password_required": "password can not be blank",
"retrieve": "Retrieve password",
"retrieved": "Password has been retrieved",
"retrieved_account": "Retrieve {{account}} account",
"to_login": "Go to login",
"verification_code": "Verification code"
"email_phone": "Email/Phone Number",
"email_phone_error": "Invalid Email/Phone Number Format",
"email_phone_void": "Email/Phone Number Cannot Be Empty",
"get_code": "Get Verification Code",
"get_code_again": "Get Again in s",
"new_password": "New Password (4-20 characters)",
"not_match": "Passwords Do Not Match",
"password_condition": "Password must be between 4 and 20 characters",
"password_required": "Password Cannot Be Empty",
"retrieve": "Retrieve Password",
"retrieved": "Password Retrieved",
"retrieved_account": "Retrieve {{account}} Account",
"to_login": "Go to Login",
"verification_code": "Verification Code"
},
"permission": {
"Manage": "administrator",
"Manage tip": "Team administrator, with full permissions",
"Read": "Read only",
"Read desc": "Members can only read related resources and cannot create new resources.",
"Manage": "Admin",
"Manage tip": "Team admin with full permissions",
"Read": "Read Only",
"Read desc": "Members can only read related resources, cannot create new resources",
"Write": "Write",
"Write tip": "In addition to readable resources, you can also create new resources",
"change_owner": "transfer ownership",
"change_owner_failed": "Transfer ownership failed",
"change_owner_placeholder": "Enter username to find account",
"change_owner_success": "Successfully transferred ownership",
"change_owner_tip": "Your administrator rights will be retained after the transfer",
"change_owner_to": "transferred to",
"only_collaborators": "Collaborator access only",
"team_read": "Team accessible",
"team_write": "Team editable"
"Write tip": "In addition to read access, can create new resources",
"only_collaborators": "Collaborators Only",
"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 exception",
"failed": "registration failed",
"register_account": "Register {{account}} account",
"success": "registration success",
"to_login": "Already have an account? Log in"
"confirm": "Confirm Registration",
"error": "Registration Error",
"failed": "Registration Failed",
"register_account": "Register {{account}} Account",
"success": "Registration Successful",
"to_login": "Already have an account? Login"
},
"search_user": "Search username",
"search_user": "Search Username",
"synchronization": {
"button": "Sync now",
"placeholder": "Please enter sync label",
"title": "Fill in the tag synchronization link and click the sync button to synchronize"
"button": "Sync Now",
"placeholder": "Enter Sync Tag",
"title": "Enter the sync tag link and click the sync button to synchronize"
},
"team": {
"Add manager": "Add manager",
"add_collaborator": "Add collaborators",
"manage_collaborators": "Manage collaborators",
"no_collaborators": "No collaborators yet"
"Add manager": "Add Admin",
"add_collaborator": "Add Collaborator",
"manage_collaborators": "Manage Collaborators",
"no_collaborators": "No Collaborators"
},
"usage": {
"feishu": "Lark",
"official_account": "Official account",
"share": "share link",
"wecom": "Enterprise WeChat"
"feishu": "Feishu",
"official_account": "Official Account",
"share": "Share Link",
"wecom": "WeCom"
}
}
......@@ -179,5 +179,12 @@
"user_file_input_desc": "用户上传的文档和图片链接",
"user_select": "用户选择",
"user_select_tip": "该模块可配置多个选项,以供对话时选择。不同选项可导向不同工作流支线"
},
"permission": {
"des": {
"read": "可使用该应用进行对话",
"write": "可查看和编辑应用",
"manage": "写权限基础上,可配置发布渠道、查看对话日志、分配该应用权限"
}
}
}
......@@ -531,6 +531,7 @@
"feishu": "飞书",
"official_account": "公众号",
"online": "在线使用",
"free_login": "免登录链接",
"share": "外部链接调用",
"team": "团队空间对话",
"test": "测试",
......@@ -647,8 +648,7 @@
"success": "开始同步"
}
},
"training": {
}
"training": {}
},
"data": {
"Auxiliary Data": "辅助数据",
......@@ -926,7 +926,18 @@
"Team app": "团队应用",
"Tool module": "工具",
"UnKnow Module": "未知模块",
"http body placeholder": "与 Apifox 相同的语法"
"http body placeholder": "与 Apifox 相同的语法",
"empty_workflow": "空白工作流",
"empty_app": "空白应用",
"empty_plugin": "空白插件",
"system_config": "系统配置",
"system_config_info": "可以配置应用的系统参数",
"work_start": "流程开始",
"self_input": "自定义插件输入",
"self_output": "自定义插件输出",
"config_params": "可以配置应用的系统参数",
"ai_chat": "AI 对话",
"ai_chat_intro": "AI 大模型对话"
},
"templates": {
"Load plugin error": "加载插件失败"
......@@ -1159,6 +1170,9 @@
"Collaborator": "协作者",
"Default permission": "默认权限",
"Manage": "管理",
"manager": "管理员",
"read": "读权限",
"write": "写权限",
"No InheritPermission": "已限制权限,不再继承父级文件夹的权限,",
"Not collaborator": "暂无协作者",
"Owner": "创建者",
......
......@@ -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": "可管理整个知识库数据和信息"
}
}
}
......@@ -104,5 +104,10 @@
"official_account": "公众号",
"share": "分享链接",
"wecom": "企业微信"
},
"permission_des": {
"read": "成员仅可阅读相关资源,无法新建资源",
"write": "除了可读资源外,还可以新建新的资源",
"manage": "可创建资源、邀请、删除成员"
}
}
......@@ -216,7 +216,7 @@ function AddMemberModal({ onClose }: AddModalPropsType) {
borderRadius={'md'}
h={'32px'}
>
{perLabel}
{t(perLabel as any)}
<ChevronDownIcon fontSize={'md'} />
</Flex>
}
......
......@@ -187,7 +187,7 @@ function PermissionSelect({
>
<Radio isChecked={selectedSingleValue === item.value} />
<Box ml={4}>
<Box>{item.name}</Box>
<Box>{t(item.name as any)}</Box>
<Box color={'myGray.500'} fontSize={'mini'}>
{t(item.description as any)}
</Box>
......
......@@ -4,6 +4,7 @@ import Tag from '@fastgpt/web/components/common/Tag';
import React from 'react';
import { useContextSelector } from 'use-context-selector';
import { CollaboratorContext } from './context';
import { useTranslation } from 'next-i18next';
export type PermissionTagsProp = {
permission: PermissionValueType;
......@@ -11,7 +12,7 @@ export type PermissionTagsProp = {
function PermissionTags({ permission }: PermissionTagsProp) {
const { getPerLabelList } = useContextSelector(CollaboratorContext, (v) => v);
const { t } = useTranslation();
const perTagList = getPerLabelList(permission);
return (
......@@ -26,7 +27,7 @@ function PermissionTags({ permission }: PermissionTagsProp) {
px={3}
fontSize={'xs'}
>
{item}
{t(item as any)}
</Tag>
))}
</Flex>
......
......@@ -20,9 +20,9 @@ const PermissionTag = ({
const commonLabel = (() => {
if (permission.isOwner) return t('common:permission.Owner');
if (permission.hasManagePer) return PermissionList['manage'].name;
if (permission.hasWritePer) return PermissionList['write'].name;
if (permission.hasReadPer) return PermissionList['read'].name;
if (permission.hasManagePer) return t(PermissionList['manage'].name as any);
if (permission.hasWritePer) return t(PermissionList['write'].name as any);
if (permission.hasReadPer) return t(PermissionList['read'].name as any);
return;
})();
......@@ -44,8 +44,10 @@ const PermissionTag = ({
permission.hasManagePer,
permission.hasReadPer,
permission.hasWritePer,
permission.isOwner,
permission.value,
permissionList
permissionList,
t
]);
return (
<HStack>
......
......@@ -61,7 +61,7 @@ function PermissionManage() {
ml={3}
borderRadius={'sm'}
>
{TeamPermissionList['manage'].description}
{t(TeamPermissionList['manage'].description as any)}
</Box>
</Flex>
{userInfo?.team.role === 'owner' && (
......
......@@ -306,7 +306,7 @@ const MyInfo = ({ onOpenContact }: { onOpenContact: () => void }) => {
<strong>{formatStorePrice2Read(userInfo?.team?.balance).toFixed(3)}</strong>{' '}
{t('user:bill.yuan')}
</Box>
{/* TODO:暂时隐藏 */}
{userInfo?.permission.hasManagePer && !!standardPlan && (
<Button variant={'primary'} size={'sm'} ml={5} onClick={onOpenConversionModal}>
{t('user:bill.conversion')}
......
......@@ -83,7 +83,7 @@ const FeiShuEditModal = ({
fontSize={'sm'}
>
<Flex alignItems={'center'}>
<MyIcon name="book" mr="1" />
<MyIcon w={'17px'} h={'17px'} name="book" mr="1" />
{t('common:common.Read document')}
</Flex>
</Link>
......
......@@ -85,7 +85,7 @@ const OffiAccountEditModal = ({
fontSize={'sm'}
>
<Flex alignItems={'center'}>
<MyIcon name="book" mr="1" />
<MyIcon name="book" w={'17px'} h={'17px'} mr="1" />
{t('common:common.Read document')}
</Flex>
</Link>
......
......@@ -82,7 +82,7 @@ const WecomEditModal = ({
fontSize={'sm'}
>
<Flex alignItems={'center'}>
<MyIcon name="book" mr="1" />
<MyIcon name="book" w={'17px'} h={'17px'} mr="1" />
{t('common:common.Read document')}
</Flex>
</Link>
......
......@@ -194,7 +194,11 @@ const TagManageModal = ({ onClose }: { onClose: () => void }) => {
pt={6}
>
<MyIcon name="menu" w={5} />
<Box ml={2} fontWeight={'semibold'} flex={'1 0 0'}>{`共${tagsTotal}个标签`}</Box>
<Box ml={2} fontWeight={'semibold'} flex={'1 0 0'}>
{t('dataset:tag.total_tags', {
total: tagsTotal
})}
</Box>
<Button
size={'sm'}
leftIcon={<MyIcon name="common/addLight" w={4} />}
......
......@@ -4,7 +4,7 @@ import { useTranslation } from 'next-i18next';
import { useRouter } from 'next/router';
import { useSystemStore } from '@/web/common/system/useSystemStore';
import type { FastGPTFeConfigsType } from '@fastgpt/global/common/system/types/index.d';
import { change2DefaultLng, setLngStore } from '@/web/common/utils/i18n';
import { change2DefaultLng, LangEnum, setLngStore } from '@/web/common/utils/i18n';
import { useMemoizedFn, useMount } from 'ahooks';
import { TrackEventName } from '../common/system/constants';
......@@ -40,11 +40,13 @@ export const useInitApp = () => {
const initUserLanguage = useMemoizedFn(() => {
// get default language
const targetLng = change2DefaultLng(i18n.language);
if (targetLng) {
setLngStore(targetLng);
router.replace(router.asPath, undefined, { locale: targetLng });
}
const targetLng =
change2DefaultLng(i18n.language) ||
(['zh', 'zh-CN'].includes(navigator.language) ? 'zh' : 'en');
setLngStore(targetLng);
router.replace(router.asPath, undefined, { locale: targetLng });
});
useMount(() => {
......
......@@ -32,8 +32,8 @@ export const emptyTemplates: Record<
nodes: [
{
nodeId: 'userGuide',
name: '系统配置',
intro: '可以配置应用的系统参数',
name: i18nT('common:core.module.template.system_config'),
intro: i18nT('common:core.module.template.config_params'),
avatar: 'core/workflow/template/systemConfig',
flowNodeType: FlowNodeTypeEnum.systemConfig,
position: {
......@@ -95,7 +95,7 @@ export const emptyTemplates: Record<
},
{
nodeId: '448745',
name: '流程开始',
name: i18nT('common:core.module.template.work_start'),
intro: '',
avatar: 'core/workflow/template/workflowStart',
flowNodeType: FlowNodeTypeEnum.workflowStart,
......@@ -109,9 +109,9 @@ export const emptyTemplates: Record<
key: 'userChatInput',
renderTypeList: [FlowNodeInputTypeEnum.reference, FlowNodeInputTypeEnum.textarea],
valueType: WorkflowIOValueTypeEnum.string,
label: '用户问题',
label: i18nT('common:core.module.input.label.user question'),
required: true,
toolDescription: '用户问题'
toolDescription: i18nT('common:core.module.input.label.user question')
}
],
outputs: [
......@@ -126,8 +126,8 @@ export const emptyTemplates: Record<
},
{
nodeId: 'loOvhld2ZTKa',
name: 'AI 对话',
intro: 'AI 大模型对话',
name: i18nT('common:core.module.template.ai_chat'),
intro: i18nT('common:core.module.template.ai_chat_intro'),
avatar: 'core/workflow/template/aiChat',
flowNodeType: FlowNodeTypeEnum.chatNode,
showStatus: true,
......@@ -210,16 +210,16 @@ export const emptyTemplates: Record<
key: 'userChatInput',
renderTypeList: [FlowNodeInputTypeEnum.reference, FlowNodeInputTypeEnum.textarea],
valueType: WorkflowIOValueTypeEnum.string,
label: '用户问题',
label: i18nT('common:core.module.input.label.user question'),
required: true,
toolDescription: '用户问题',
toolDescription: i18nT('common:core.module.input.label.user question'),
value: ['448745', 'userChatInput']
},
{
key: 'quoteQA',
renderTypeList: [FlowNodeInputTypeEnum.settingDatasetQuotePrompt],
label: '',
debugLabel: '知识库引用',
debugLabel: i18nT('common:core.module.Dataset quote.label'),
description: '',
valueType: WorkflowIOValueTypeEnum.datasetQuote
}
......@@ -255,12 +255,12 @@ export const emptyTemplates: Record<
},
[AppTypeEnum.workflow]: {
avatar: 'core/app/type/workflowFill',
name: '空白工作流',
name: i18nT('common:core.module.template.empty_workflow'),
nodes: [
{
nodeId: 'userGuide',
name: '系统配置',
intro: '可以配置应用的系统参数',
name: i18nT('common:core.module.template.system_config'),
intro: i18nT('common:core.module.template.system_config_info'),
avatar: 'core/workflow/template/systemConfig',
flowNodeType: 'userGuide',
position: {
......@@ -322,7 +322,7 @@ export const emptyTemplates: Record<
},
{
nodeId: '448745',
name: '流程开始',
name: i18nT('common:core.module.template.work_start'),
intro: '',
avatar: 'core/workflow/template/workflowStart',
flowNodeType: 'workflowStart',
......@@ -336,9 +336,9 @@ export const emptyTemplates: Record<
key: 'userChatInput',
renderTypeList: ['reference', 'textarea'],
valueType: 'string',
label: '用户问题',
label: i18nT('common:core.module.input.label.user question'),
required: true,
toolDescription: '用户问题'
toolDescription: i18nT('common:core.module.input.label.user question')
}
],
outputs: [
......@@ -356,11 +356,11 @@ export const emptyTemplates: Record<
},
[AppTypeEnum.plugin]: {
avatar: 'core/app/type/pluginFill',
name: '空白插件',
name: i18nT('common:core.module.template.empty_plugin'),
nodes: [
{
nodeId: 'pluginInput',
name: '自定义插件输入',
name: i18nT('common:core.module.template.self_input'),
avatar: 'core/workflow/template/workflowStart',
flowNodeType: FlowNodeTypeEnum.pluginInput,
showStatus: false,
......@@ -374,7 +374,7 @@ export const emptyTemplates: Record<
},
{
nodeId: 'pluginOutput',
name: '自定义插件输出',
name: i18nT('common:core.module.template.self_output'),
avatar: '/imgs/workflow/output.png',
flowNodeType: FlowNodeTypeEnum.pluginOutput,
showStatus: false,
......
......@@ -162,16 +162,16 @@ export function form2AppWorkflow(
key: 'userChatInput',
renderTypeList: [FlowNodeInputTypeEnum.reference, FlowNodeInputTypeEnum.textarea],
valueType: WorkflowIOValueTypeEnum.string,
label: '用户问题',
label: i18nT('common:core.module.input.label.user question'),
required: true,
toolDescription: '用户问题',
toolDescription: i18nT('common:core.module.input.label.user question'),
value: [workflowStartNodeId, 'userChatInput']
},
{
key: 'quoteQA',
renderTypeList: [FlowNodeInputTypeEnum.settingDatasetQuotePrompt],
label: '',
debugLabel: '知识库引用',
debugLabel: i18nT('common:core.module.Dataset quote.label'),
description: '',
valueType: WorkflowIOValueTypeEnum.datasetQuote,
value: selectedDatasets ? [datasetNodeId, 'quoteQA'] : undefined
......@@ -467,7 +467,7 @@ export function form2AppWorkflow(
key: 'userChatInput',
renderTypeList: [FlowNodeInputTypeEnum.reference, FlowNodeInputTypeEnum.textarea],
valueType: WorkflowIOValueTypeEnum.string,
label: '用户问题',
label: i18nT('common:core.module.input.label.user question'),
required: true,
value: [workflowStartNodeId, 'userChatInput']
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment