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