mirror of
https://github.com/labring/FastGPT.git
synced 2025-10-14 15:11:13 +00:00
feature: 4.10.1 (#5201)
* add dynamic inputRender (#5127) * dynamic input component * fix * fix * fix * perf: dynamic render input * update doc * perf: error catch * num input ui * fix form render (#5177) * perf: i18n check * add log * doc * Sync dataset (#5181) * perf: api dataset create (#5047) * Sync dataset (#5120) * add * wait * restructure dataset sync, update types and APIs, add sync hints, and remove legacy logic * feat: add function to retrieve real file ID from third-party doc library and rename team permission check function for clarity * fix come console * refactor: rename team dataset limit check functions for clarity, update API dataset sync limit usage, and rename root directory to "ROOT_FOLDER" * frat: update sync dataset login * fix delete.ts * feat: update pnpm-lock.yaml to include bullmq, fix comments in api.d.ts and type.d.ts, rename API file ID field, optimize dataset sync logic, and add website sync feature with related APIs * feat: update CollectionCard to support site dataset sync, add API root ID constant and init sync API * feat: add RootCollectionId constant to replace hardcoded root ID --------- Co-authored-by: dreamer6680 <146868355@qq.com> * perf: code * feat: update success message for dataset sync, revise related i18n texts, and optimize file selection logic (#5166) Co-authored-by: dreamer6680 <146868355@qq.com> * perf: select file * Sync dataset (#5180) * feat: update success message for dataset sync, revise related i18n texts, and optimize file selection logic * fix: make listfile function return rawid string --------- Co-authored-by: dreamer6680 <146868355@qq.com> * init sh * fix: ts --------- Co-authored-by: dreamer6680 <1468683855@qq.com> Co-authored-by: dreamer6680 <146868355@qq.com> * update doc * i18n --------- Co-authored-by: heheer <heheer@sealos.io> Co-authored-by: dreamer6680 <1468683855@qq.com> Co-authored-by: dreamer6680 <146868355@qq.com>
This commit is contained in:
31
packages/web/i18n/constants.ts
Normal file
31
packages/web/i18n/constants.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
export const I18N_NAMESPACES = [
|
||||
'common',
|
||||
'dataset',
|
||||
'app',
|
||||
'file',
|
||||
'publish',
|
||||
'workflow',
|
||||
'user',
|
||||
'chat',
|
||||
'login',
|
||||
'account_info',
|
||||
'account_usage',
|
||||
'account_bill',
|
||||
'account_apikey',
|
||||
'account_setting',
|
||||
'account_inform',
|
||||
'account_promotion',
|
||||
'account_thirdParty',
|
||||
'account',
|
||||
'account_team',
|
||||
'account_model',
|
||||
'dashboard_mcp'
|
||||
];
|
||||
|
||||
export const I18N_NAMESPACES_MAP = I18N_NAMESPACES.reduce(
|
||||
(acc, namespace) => {
|
||||
acc[namespace] = true;
|
||||
return acc;
|
||||
},
|
||||
{} as Record<string, boolean>
|
||||
);
|
@@ -77,6 +77,7 @@
|
||||
"select_file_img": "Upload file / image",
|
||||
"select_img": "Upload Image",
|
||||
"source_cronJob": "Scheduled execution",
|
||||
"start_chat": "Start",
|
||||
"stream_output": "Stream Output",
|
||||
"unsupported_file_type": "Unsupported file types",
|
||||
"upload": "Upload",
|
||||
|
@@ -77,7 +77,6 @@
|
||||
"Save": "Save",
|
||||
"Save_and_exit": "Save and Exit",
|
||||
"Search": "Search",
|
||||
"Select_all": "Select all",
|
||||
"Setting": "Setting",
|
||||
"Status": "Status",
|
||||
"Submit": "Submit",
|
||||
@@ -355,7 +354,6 @@
|
||||
"core.chat.Select dataset Desc": "Select a Dataset to store the expected answer",
|
||||
"core.chat.Send Message": "Send",
|
||||
"core.chat.Speaking": "I'm Listening, Please Speak...",
|
||||
"core.chat.Start Chat": "Start Chat",
|
||||
"core.chat.Type a message": "Enter a Question, Press [Enter] to Send / Press [Ctrl(Alt/Shift) + Enter] for New Line",
|
||||
"core.chat.Unpin": "Unpin",
|
||||
"core.chat.You need to a chat app": "You Do Not Have an Available App",
|
||||
|
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"Enable": "Enable",
|
||||
"Select_all": "Select all files",
|
||||
"add_file": "Import",
|
||||
"api_file": "API Dataset",
|
||||
"api_url": "API Url",
|
||||
@@ -24,6 +25,7 @@
|
||||
"close_auto_sync": "Are you sure you want to turn off automatic sync?",
|
||||
"collection.Create update time": "Creation/Update Time",
|
||||
"collection.Training type": "Training",
|
||||
"collection.sync.submit": "The synchronization task has been submitted",
|
||||
"collection.training_type": "Chunk type",
|
||||
"collection_data_count": "Data amount",
|
||||
"collection_metadata_custom_pdf_parse": "PDF enhancement analysis",
|
||||
@@ -147,6 +149,7 @@
|
||||
"pleaseFillUserIdAndToken": "Please fill in User ID and Token",
|
||||
"preview_chunk": "Preview chunks",
|
||||
"preview_chunk_empty": "File content is empty",
|
||||
"preview_chunk_folder_warning": "Directory does not support preview",
|
||||
"preview_chunk_intro": "A total of {{total}} blocks, up to 10",
|
||||
"preview_chunk_not_selected": "Click on the file on the left to preview",
|
||||
"process.Auto_Index": "Automatic index generation",
|
||||
@@ -178,7 +181,7 @@
|
||||
"split_sign_period": "period",
|
||||
"split_sign_question": "question mark",
|
||||
"split_sign_semicolon": "semicolon",
|
||||
"start_sync_website_tip": "Confirm to start synchronizing data? \nThe old data will be deleted and retrieved again, please confirm!",
|
||||
"start_sync_dataset_tip": "Do you really start synchronizing the entire knowledge base?",
|
||||
"status_error": "Running exception",
|
||||
"sync_collection_failed": "Synchronization collection error, please check whether the source file can be accessed normally",
|
||||
"sync_schedule": "Timing synchronization",
|
||||
|
65
packages/web/i18n/i18next.d.ts
vendored
Normal file
65
packages/web/i18n/i18next.d.ts
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
import 'i18next';
|
||||
import type account_team from './zh-CN/account_team.json';
|
||||
import type account from './zh-CN/account.json';
|
||||
import type account_thirdParty from './zh-CN/account_thirdParty.json';
|
||||
import type account_promotion from './zh-CN/account_promotion.json';
|
||||
import type account_inform from './zh-CN/account_inform.json';
|
||||
import type account_setting from './zh-CN/account_setting.json';
|
||||
import type account_apikey from './zh-CN/account_apikey.json';
|
||||
import type account_bill from './zh-CN/account_bill.json';
|
||||
import type account_usage from './zh-CN/account_usage.json';
|
||||
import type account_info from './zh-CN/account_info.json';
|
||||
import type common from './zh-CN/common.json';
|
||||
import type dataset from './zh-CN/dataset.json';
|
||||
import type app from './zh-CN/app.json';
|
||||
import type file from './zh-CN/file.json';
|
||||
import type publish from './zh-CN/publish.json';
|
||||
import type workflow from './zh-CN/workflow.json';
|
||||
import type user from './zh-CN/user.json';
|
||||
import type chat from './zh-CN/chat.json';
|
||||
import type login from './zh-CN/login.json';
|
||||
import type account_model from './zh-CN/account_model.json';
|
||||
import type dashboard_mcp from './zh-CN/dashboard_mcp.json';
|
||||
import type { I18N_NAMESPACES } from './constants';
|
||||
|
||||
export interface I18nNamespaces {
|
||||
common: typeof common;
|
||||
dataset: typeof dataset;
|
||||
app: typeof app;
|
||||
file: typeof file;
|
||||
publish: typeof publish;
|
||||
workflow: typeof workflow;
|
||||
user: typeof user;
|
||||
chat: typeof chat;
|
||||
login: typeof login;
|
||||
account_info: typeof account_info;
|
||||
account_usage: typeof account_usage;
|
||||
account_bill: typeof account_bill;
|
||||
account_apikey: typeof account_apikey;
|
||||
account_setting: typeof account_setting;
|
||||
account_inform: typeof account_inform;
|
||||
account_promotion: typeof account_promotion;
|
||||
account: typeof account;
|
||||
account_team: typeof account_team;
|
||||
account_thirdParty: typeof account_thirdParty;
|
||||
account_model: typeof account_model;
|
||||
dashboard_mcp: typeof dashboard_mcp;
|
||||
}
|
||||
|
||||
export type I18nNsType = (keyof I18nNamespaces)[];
|
||||
|
||||
export type ParseKeys<Ns extends keyof I18nNamespaces = keyof I18nNamespaces> = {
|
||||
[K in Ns]: `${K}:${keyof I18nNamespaces[K] & string}`;
|
||||
}[Ns];
|
||||
|
||||
export type I18nKeyFunction = {
|
||||
<Key extends ParseKeys>(key: Key): Key;
|
||||
};
|
||||
|
||||
declare module 'i18next' {
|
||||
interface CustomTypeOptions {
|
||||
returnNull: false;
|
||||
defaultNS: I18N_NAMESPACES;
|
||||
resources: I18nNamespaces;
|
||||
}
|
||||
}
|
@@ -1,3 +1,3 @@
|
||||
import { type I18nKeyFunction } from '../types/i18next';
|
||||
import { type I18nKeyFunction } from './i18next';
|
||||
|
||||
export const i18nT: I18nKeyFunction = (key) => key;
|
||||
|
@@ -109,7 +109,7 @@
|
||||
"join_update_time": "加入/更新时间",
|
||||
"kick_out_team": "移除成员",
|
||||
"label_sync": "标签同步",
|
||||
"leave": "已离职",
|
||||
"leave": "离开",
|
||||
"leave_team_failed": "离开团队异常",
|
||||
"log_admin_add_plan": "【{{name}}】将给团队id为【{{teamId}}】的团队添加了套餐",
|
||||
"log_admin_add_user": "【{{name}}】创建了一个名为【{{userName}}】的用户",
|
||||
@@ -218,7 +218,7 @@
|
||||
"recover_team_member": "成员恢复",
|
||||
"relocate_department": "部门移动",
|
||||
"remark": "备注",
|
||||
"remove_tip": "确认将 {{username}} 移出团队?成员将被标记为“已离职”,不删除操作数据,账号下资源自动转让给团队所有者。",
|
||||
"remove_tip": "确认将 {{username}} 移出团队?成员将被标记为“离开”,不删除操作数据,账号下资源自动转让给团队所有者。",
|
||||
"restore_tip": "确认将 {{username}} 加入团队吗?仅恢复该成员账号可用性及相关权限,无法恢复账号下资源。",
|
||||
"restore_tip_title": "恢复确认",
|
||||
"retain_admin_permissions": "保留管理员权限",
|
||||
|
@@ -77,6 +77,7 @@
|
||||
"select_file_img": "上传文件/图片",
|
||||
"select_img": "上传图片",
|
||||
"source_cronJob": "定时执行",
|
||||
"start_chat": "开始对话",
|
||||
"stream_output": "流输出",
|
||||
"unsupported_file_type": "不支持的文件类型",
|
||||
"upload": "上传",
|
||||
|
@@ -77,7 +77,6 @@
|
||||
"Save": "保存",
|
||||
"Save_and_exit": "保存并退出",
|
||||
"Search": "搜索",
|
||||
"Select_all": "全选",
|
||||
"Setting": "设置",
|
||||
"Status": "状态",
|
||||
"Submit": "提交",
|
||||
@@ -355,7 +354,6 @@
|
||||
"core.chat.Select dataset Desc": "选择一个知识库存储预期答案",
|
||||
"core.chat.Send Message": "发送",
|
||||
"core.chat.Speaking": "我在听,请说...",
|
||||
"core.chat.Start Chat": "开始对话",
|
||||
"core.chat.Type a message": "输入问题,发送 [Enter]/换行 [Ctrl(Alt/Shift) + Enter]",
|
||||
"core.chat.Unpin": "取消置顶",
|
||||
"core.chat.You need to a chat app": "你没有可用的应用",
|
||||
@@ -1301,7 +1299,7 @@
|
||||
"user.team.role.Visitor": "访客",
|
||||
"user.team.role.writer": "可写成员",
|
||||
"user.type": "类型",
|
||||
"user_leaved": "已离开",
|
||||
"user_leaved": "离开",
|
||||
"value": "值",
|
||||
"verification": "验证",
|
||||
"xx_search_result": "{{key}} 的搜索结果",
|
||||
|
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"Enable": "启用",
|
||||
"Select_all": "选择所有文件",
|
||||
"add_file": "添加文件",
|
||||
"api_file": "API 文件库",
|
||||
"api_url": "接口地址",
|
||||
@@ -24,6 +25,7 @@
|
||||
"close_auto_sync": "确认关闭自动同步功能?",
|
||||
"collection.Create update time": "创建/更新时间",
|
||||
"collection.Training type": "训练模式",
|
||||
"collection.sync.submit": "已提交同步任务",
|
||||
"collection.training_type": "处理模式",
|
||||
"collection_data_count": "数据量",
|
||||
"collection_metadata_custom_pdf_parse": "PDF增强解析",
|
||||
@@ -147,6 +149,7 @@
|
||||
"pleaseFillUserIdAndToken": "请填写 User ID 和 Token",
|
||||
"preview_chunk": "分块预览",
|
||||
"preview_chunk_empty": "文件内容为空",
|
||||
"preview_chunk_folder_warning": "目录不支持预览",
|
||||
"preview_chunk_intro": "共 {{total}} 个分块,最多展示 10 个",
|
||||
"preview_chunk_not_selected": "点击左侧文件后进行预览",
|
||||
"process.Auto_Index": "自动索引生成",
|
||||
@@ -178,7 +181,7 @@
|
||||
"split_sign_period": "句号",
|
||||
"split_sign_question": "问号",
|
||||
"split_sign_semicolon": "分号",
|
||||
"start_sync_website_tip": "确认开始同步数据?将会删除旧数据后重新获取,请确认!",
|
||||
"start_sync_dataset_tip": "确实开始同步整个知识库?",
|
||||
"status_error": "运行异常",
|
||||
"sync_collection_failed": "同步集合错误,请检查是否能正常访问源文件",
|
||||
"sync_schedule": "定时同步",
|
||||
|
@@ -77,6 +77,7 @@
|
||||
"select_file_img": "上傳檔案 / 圖片",
|
||||
"select_img": "上傳圖片",
|
||||
"source_cronJob": "定時執行",
|
||||
"start_chat": "開始對話",
|
||||
"stream_output": "串流輸出",
|
||||
"unsupported_file_type": "不支援的檔案類型",
|
||||
"upload": "上傳",
|
||||
|
@@ -77,7 +77,6 @@
|
||||
"Save": "儲存",
|
||||
"Save_and_exit": "儲存並離開",
|
||||
"Search": "搜尋",
|
||||
"Select_all": "全選",
|
||||
"Setting": "設定",
|
||||
"Status": "狀態",
|
||||
"Submit": "送出",
|
||||
@@ -355,7 +354,6 @@
|
||||
"core.chat.Select dataset Desc": "選擇一個知識庫來儲存預期回答",
|
||||
"core.chat.Send Message": "傳送",
|
||||
"core.chat.Speaking": "我在聽,請說...",
|
||||
"core.chat.Start Chat": "開始對話",
|
||||
"core.chat.Type a message": "輸入問題,按 [Enter] 傳送 / 按 [Ctrl(Alt/Shift) + Enter] 換行",
|
||||
"core.chat.Unpin": "取消釘選",
|
||||
"core.chat.You need to a chat app": "您沒有可用的應用程式",
|
||||
|
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"Enable": "啟用",
|
||||
"Select_all": "選中所有檔案",
|
||||
"add_file": "新增文件",
|
||||
"api_file": "API 檔案庫",
|
||||
"api_url": "介面位址",
|
||||
@@ -24,6 +25,7 @@
|
||||
"close_auto_sync": "確認關閉自動同步功能?",
|
||||
"collection.Create update time": "建立/更新時間",
|
||||
"collection.Training type": "分段模式",
|
||||
"collection.sync.submit": "已提交同步任務",
|
||||
"collection.training_type": "處理模式",
|
||||
"collection_data_count": "資料量",
|
||||
"collection_metadata_custom_pdf_parse": "PDF 增強解析",
|
||||
@@ -147,6 +149,7 @@
|
||||
"pleaseFillUserIdAndToken": "請填寫 User ID 和 Token",
|
||||
"preview_chunk": "分塊預覽",
|
||||
"preview_chunk_empty": "文件內容為空",
|
||||
"preview_chunk_folder_warning": "目錄不支持預覽",
|
||||
"preview_chunk_intro": "共 {{total}} 個分塊,最多展示 10 個",
|
||||
"preview_chunk_not_selected": "點選左側文件後進行預覽",
|
||||
"process.Auto_Index": "自動索引生成",
|
||||
@@ -178,7 +181,7 @@
|
||||
"split_sign_period": "句號",
|
||||
"split_sign_question": "問號",
|
||||
"split_sign_semicolon": "分號",
|
||||
"start_sync_website_tip": "確認開始同步資料?\n將會刪除舊資料後重新取得,請確認!",
|
||||
"start_sync_dataset_tip": "確實開始同步整個知識庫?",
|
||||
"status_error": "執行異常",
|
||||
"sync_collection_failed": "同步集合錯誤,請檢查是否能正常存取來原始檔",
|
||||
"sync_schedule": "定時同步",
|
||||
|
Reference in New Issue
Block a user