mirror of
https://github.com/YspCoder/clawgo.git
synced 2026-05-06 03:37:31 +08:00
add webui
This commit is contained in:
303
webui/src/i18n/index.ts
Normal file
303
webui/src/i18n/index.ts
Normal file
@@ -0,0 +1,303 @@
|
||||
import i18n from 'i18next';
|
||||
import { initReactI18next } from 'react-i18next';
|
||||
import LanguageDetector from 'i18next-browser-languagedetector';
|
||||
|
||||
const resources = {
|
||||
en: {
|
||||
translation: {
|
||||
dashboard: 'Dashboard',
|
||||
chat: 'Chat',
|
||||
config: 'Config',
|
||||
cronJobs: 'Cron Jobs',
|
||||
nodes: 'Nodes',
|
||||
logs: 'Real-time Logs',
|
||||
skills: 'Skills',
|
||||
gatewayStatus: 'Gateway Status',
|
||||
online: 'Online',
|
||||
offline: 'Offline',
|
||||
activeSessions: 'Active Sessions',
|
||||
nodesOnline: 'Nodes Online',
|
||||
recentCron: 'Recent Cron Jobs',
|
||||
nodesSnapshot: 'Nodes Snapshot',
|
||||
refreshAll: 'Refresh All',
|
||||
refresh: 'Refresh',
|
||||
active: 'Active',
|
||||
paused: 'Paused',
|
||||
noCronJobs: 'No cron jobs found',
|
||||
noNodes: 'No nodes available',
|
||||
sessions: 'Sessions',
|
||||
startConversation: 'Start a conversation',
|
||||
typeMessage: 'Type a message...',
|
||||
configuration: 'Configuration',
|
||||
form: 'Form',
|
||||
rawJson: 'Raw JSON',
|
||||
reload: 'Reload',
|
||||
saveChanges: 'Save Changes',
|
||||
gatewaySettings: 'Gateway Settings',
|
||||
host: 'Host',
|
||||
port: 'Port',
|
||||
token: 'Token',
|
||||
agentDefaults: 'Agent Defaults',
|
||||
maxToolIterations: 'Max Tool Iterations',
|
||||
maxTokens: 'Max Tokens',
|
||||
providers: 'Providers',
|
||||
proxyTimeout: 'Proxy Timeout (sec)',
|
||||
system: 'System',
|
||||
enableShellTools: 'Enable Shell Tools',
|
||||
enableLogging: 'Enable Logging',
|
||||
pauseJob: 'Pause Job',
|
||||
startJob: 'Start Job',
|
||||
deleteJob: 'Delete Job',
|
||||
gatewayToken: 'Gateway Token',
|
||||
enterToken: 'Enter token...',
|
||||
addJob: 'Add Job',
|
||||
editJob: 'Edit Job',
|
||||
jobName: 'Job Name',
|
||||
kind: 'Kind',
|
||||
everyMs: 'Interval (ms)',
|
||||
cronExpression: 'Cron Expression',
|
||||
message: 'Message',
|
||||
deliver: 'Deliver',
|
||||
channel: 'Channel',
|
||||
to: 'To (Recipient)',
|
||||
cancel: 'Cancel',
|
||||
save: 'Save',
|
||||
create: 'Create',
|
||||
update: 'Update',
|
||||
configLabels: {
|
||||
gateway: 'Gateway',
|
||||
host: 'Host',
|
||||
port: 'Port',
|
||||
token: 'Token',
|
||||
agents: 'Agents',
|
||||
defaults: 'Defaults',
|
||||
max_tool_iterations: 'Max Tool Iterations',
|
||||
max_tokens: 'Max Tokens',
|
||||
providers: 'Providers',
|
||||
proxy: 'Proxy',
|
||||
timeout_sec: 'Timeout (Seconds)',
|
||||
shell: 'Shell',
|
||||
enabled: 'Enabled',
|
||||
logging: 'Logging',
|
||||
level: 'Log Level',
|
||||
format: 'Log Format',
|
||||
storage: 'Storage',
|
||||
path: 'Path',
|
||||
database: 'Database',
|
||||
type: 'Type',
|
||||
connection: 'Connection',
|
||||
security: 'Security',
|
||||
cors: 'CORS',
|
||||
allowed_origins: 'Allowed Origins',
|
||||
rate_limit: 'Rate Limit',
|
||||
requests_per_minute: 'Requests Per Minute',
|
||||
enabled_true: 'Enabled',
|
||||
enabled_false: 'Disabled',
|
||||
openai: 'OpenAI',
|
||||
gemini: 'Gemini',
|
||||
anthropic: 'Anthropic',
|
||||
api_key: 'API Key',
|
||||
model: 'Model',
|
||||
temperature: 'Temperature',
|
||||
top_p: 'Top P',
|
||||
top_k: 'Top K',
|
||||
presence_penalty: 'Presence Penalty',
|
||||
frequency_penalty: 'Frequency Penalty',
|
||||
stream: 'Stream',
|
||||
user: 'User',
|
||||
system_instruction: 'System Instruction',
|
||||
max_output_tokens: 'Max Output Tokens',
|
||||
response_mime_type: 'Response MIME Type',
|
||||
thinking_config: 'Thinking Config',
|
||||
thinking_level: 'Thinking Level',
|
||||
google_search: 'Google Search',
|
||||
google_maps: 'Google Maps',
|
||||
url_context: 'URL Context',
|
||||
api_base: 'API Base',
|
||||
organization: 'Organization',
|
||||
project: 'Project',
|
||||
region: 'Region',
|
||||
deployment_name: 'Deployment Name',
|
||||
version: 'Version',
|
||||
name: 'Name',
|
||||
description: 'Description',
|
||||
system_prompt: 'System Prompt',
|
||||
tools: 'Tools',
|
||||
auth: 'Authentication',
|
||||
jwt: 'JWT',
|
||||
secret: 'Secret',
|
||||
issuer: 'Issuer',
|
||||
audience: 'Audience',
|
||||
expires_in: 'Expires In',
|
||||
refresh_token: 'Refresh Token',
|
||||
access_token: 'Access Token',
|
||||
client_id: 'Client ID',
|
||||
client_secret: 'Client Secret',
|
||||
redirect_uri: 'Redirect URI',
|
||||
scope: 'Scope',
|
||||
state: 'State',
|
||||
retry: 'Retry',
|
||||
backoff: 'Backoff',
|
||||
factor: 'Factor',
|
||||
min_delay: 'Min Delay',
|
||||
max_delay: 'Max Delay',
|
||||
jitter: 'Jitter'
|
||||
}
|
||||
}
|
||||
},
|
||||
zh: {
|
||||
translation: {
|
||||
dashboard: '仪表盘',
|
||||
chat: '对话',
|
||||
config: '配置',
|
||||
cronJobs: '定时任务',
|
||||
nodes: '节点',
|
||||
logs: '实时日志',
|
||||
skills: '技能管理',
|
||||
gatewayStatus: '网关状态',
|
||||
online: '在线',
|
||||
offline: '离线',
|
||||
activeSessions: '活跃会话',
|
||||
nodesOnline: '在线节点',
|
||||
recentCron: '最近定时任务',
|
||||
nodesSnapshot: '节点快照',
|
||||
refreshAll: '刷新全部',
|
||||
refresh: '刷新',
|
||||
active: '活跃',
|
||||
paused: '已暂停',
|
||||
noCronJobs: '未找到定时任务',
|
||||
noNodes: '无可用节点',
|
||||
sessions: '会话',
|
||||
startConversation: '开始对话',
|
||||
typeMessage: '输入消息...',
|
||||
configuration: '配置',
|
||||
form: '表单',
|
||||
rawJson: '原始 JSON',
|
||||
reload: '重新加载',
|
||||
saveChanges: '保存更改',
|
||||
gatewaySettings: '网关设置',
|
||||
host: '主机',
|
||||
port: '端口',
|
||||
token: '令牌',
|
||||
agentDefaults: '代理默认值',
|
||||
maxToolIterations: '最大工具迭代次数',
|
||||
maxTokens: '最大 Token 数',
|
||||
providers: '提供商',
|
||||
proxyTimeout: '代理超时 (秒)',
|
||||
system: '系统',
|
||||
enableShellTools: '启用 Shell 工具',
|
||||
enableLogging: '启用日志',
|
||||
pauseJob: '暂停任务',
|
||||
startJob: '启动任务',
|
||||
deleteJob: '删除任务',
|
||||
gatewayToken: '网关令牌',
|
||||
enterToken: '输入令牌...',
|
||||
addJob: '新增任务',
|
||||
editJob: '编辑任务',
|
||||
jobName: '任务名称',
|
||||
kind: '类型',
|
||||
everyMs: '间隔 (毫秒)',
|
||||
cronExpression: 'Cron 表达式',
|
||||
message: '消息',
|
||||
deliver: '投递',
|
||||
channel: '频道',
|
||||
to: '接收者',
|
||||
cancel: '取消',
|
||||
save: '保存',
|
||||
create: '创建',
|
||||
update: '更新',
|
||||
configLabels: {
|
||||
gateway: '网关',
|
||||
host: '主机',
|
||||
port: '端口',
|
||||
token: '令牌',
|
||||
agents: '代理',
|
||||
defaults: '默认值',
|
||||
max_tool_iterations: '最大工具迭代次数',
|
||||
max_tokens: '最大 Token 数',
|
||||
providers: '提供商',
|
||||
proxy: '代理',
|
||||
timeout_sec: '超时时间 (秒)',
|
||||
shell: 'Shell',
|
||||
enabled: '已启用',
|
||||
logging: '日志',
|
||||
level: '日志级别',
|
||||
format: '日志格式',
|
||||
storage: '存储',
|
||||
path: '路径',
|
||||
database: '数据库',
|
||||
type: '类型',
|
||||
connection: '连接',
|
||||
security: '安全',
|
||||
cors: '跨域资源共享 (CORS)',
|
||||
allowed_origins: '允许的来源',
|
||||
rate_limit: '速率限制',
|
||||
requests_per_minute: '每分钟请求数',
|
||||
enabled_true: '已启用',
|
||||
enabled_false: '已禁用',
|
||||
openai: 'OpenAI',
|
||||
gemini: 'Gemini',
|
||||
anthropic: 'Anthropic',
|
||||
api_key: 'API 密钥',
|
||||
model: '模型',
|
||||
temperature: '温度',
|
||||
top_p: 'Top P',
|
||||
top_k: 'Top K',
|
||||
presence_penalty: '存在惩罚',
|
||||
frequency_penalty: '频率惩罚',
|
||||
stream: '流式传输',
|
||||
user: '用户',
|
||||
system_instruction: '系统指令',
|
||||
max_output_tokens: '最大输出 Token',
|
||||
response_mime_type: '响应 MIME 类型',
|
||||
thinking_config: '思考配置',
|
||||
thinking_level: '思考级别',
|
||||
google_search: '谷歌搜索',
|
||||
google_maps: '谷歌地图',
|
||||
url_context: 'URL 上下文',
|
||||
api_base: 'API 基础地址',
|
||||
organization: '组织',
|
||||
project: '项目',
|
||||
region: '区域',
|
||||
deployment_name: '部署名称',
|
||||
version: '版本',
|
||||
name: '名称',
|
||||
description: '描述',
|
||||
system_prompt: '系统提示词',
|
||||
tools: '工具',
|
||||
auth: '身份验证',
|
||||
jwt: 'JWT',
|
||||
secret: '密钥',
|
||||
issuer: '发行者',
|
||||
audience: '受众',
|
||||
expires_in: '过期时间',
|
||||
refresh_token: '刷新令牌',
|
||||
access_token: '访问令牌',
|
||||
client_id: '客户端 ID',
|
||||
client_secret: '客户端密钥',
|
||||
redirect_uri: '重定向 URI',
|
||||
scope: '范围',
|
||||
state: '状态',
|
||||
retry: '重试',
|
||||
backoff: '退避',
|
||||
factor: '因子',
|
||||
min_delay: '最小延迟',
|
||||
max_delay: '最大延迟',
|
||||
jitter: '抖动'
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
i18n
|
||||
.use(LanguageDetector)
|
||||
.use(initReactI18next)
|
||||
.init({
|
||||
resources,
|
||||
fallbackLng: 'zh',
|
||||
interpolation: {
|
||||
escapeValue: false,
|
||||
},
|
||||
});
|
||||
|
||||
export default i18n;
|
||||
Reference in New Issue
Block a user