- settings → general → language picks system, Chinese or English; the choice is stored on the device and read before the first frame - our Chinese strings are translated through tr()/trArgs() and AppText, with the English in lib/l10n/en_*.dart; a missing entry falls back to Chinese and a test checks that every literal in lib has one - AppText rebuilds on a language change (it depends on the resolved locale), so const text and whole pages switch at once; the built-in date/time pickers and selection menu follow the same language - server and user data (titles, messages, prompts, paths) is never translated - the chat list sits in a SelectionArea: long-press selects message text and shows the copy/select-all menu - bump to 0.5.2
96 lines
4.2 KiB
Dart
96 lines
4.2 KiB
Dart
// English strings for one part of the app; merged into L10n's table. Keys are
|
||
// the Chinese text the code writes, including {0}, {1} placeholders for text
|
||
// that is built from parts.
|
||
const Map<String, String> enCore = {
|
||
// state.dart
|
||
'未连接': 'Not connected',
|
||
'保存失败:{0}': 'Could not save: {0}',
|
||
'配对链接无效或已过期': 'Pairing link is invalid or expired',
|
||
'服务器没有返回设备令牌': 'Server did not return a device token',
|
||
'配对失败': 'Pairing failed',
|
||
'Relay 服务器': 'Relay server',
|
||
'配对已失效,请重新配对': 'Pairing expired, please pair again',
|
||
'需要密码或已保存的凭据': 'Password or saved credentials required',
|
||
'登录成功但没有返回令牌': 'Signed in but no token was returned',
|
||
'密码错误,请重试': 'Wrong password, try again',
|
||
'连接超时:检查服务器与代理地址':
|
||
'Connection timed out: check the server and proxy address',
|
||
'连接被拒绝:服务器或代理未启动,或端口不对':
|
||
'Connection refused: server or proxy not running, or wrong port',
|
||
'无法解析地址:检查服务器或代理主机名':
|
||
'Could not resolve address: check the server or proxy hostname',
|
||
'网络不可达': 'Network unreachable',
|
||
'连接被断开:检查代理是否可用':
|
||
'Connection closed: check whether the proxy works',
|
||
'网络错误:{0}': 'Network error: {0}',
|
||
'使用 AI 压缩会话历史以减少上下文大小':
|
||
'Use AI to compact the session history and reduce context size',
|
||
'聊天': 'Chat',
|
||
'无法打开子代理会话:{0}': 'Could not open the subagent session: {0}',
|
||
'未连接服务器': 'Not connected to a server',
|
||
'服务器没有提供聊天目录': 'Server did not provide a chat directory',
|
||
'无法创建聊天目录:{0}': 'Could not create the chat directory: {0}',
|
||
'连接中断,正在重连…': 'Connection lost, reconnecting…',
|
||
'附件': 'Attachment',
|
||
|
||
// api/relay_tunnel.dart
|
||
'响应头无效': 'Invalid response headers',
|
||
'传输被中断': 'Transfer interrupted',
|
||
'无法连接 Relay:{0}': 'Could not connect to the relay: {0}',
|
||
'密钥协商失败:{0}': 'Key exchange failed: {0}',
|
||
'握手后收到明文帧': 'Received a plaintext frame after the handshake',
|
||
'解密失败:{0}': 'Decryption failed: {0}',
|
||
'Relay 连接出错:{0}': 'Relay connection error: {0}',
|
||
'Relay 连接已关闭({0} {1})': 'Relay connection closed ({0} {1})',
|
||
'Relay 连接已关闭': 'Relay connection closed',
|
||
'Relay 握手超时': 'Relay handshake timed out',
|
||
'WebSocket 子流被中断': 'WebSocket substream interrupted',
|
||
|
||
// pets/pet_library.dart
|
||
'文件为空': 'File is empty',
|
||
'宠物包不能超过 40MB': 'Pet pack cannot exceed 40 MB',
|
||
'不是有效的 zip 文件': 'Not a valid zip file',
|
||
'压缩包里没有 pack.json': 'The archive has no pack.json',
|
||
'pack.json 不是有效的宠物包': 'pack.json is not a valid pet pack',
|
||
'pack.json 缺少动画或状态': 'pack.json is missing animations or states',
|
||
'解压后超过 60MB': 'Extracted size exceeds 60 MB',
|
||
'动画 {0} 没有精灵图': 'Animation {0} has no sprite sheet',
|
||
'缺少精灵图 {0}': 'Missing sprite sheet {0}',
|
||
|
||
// model_prefs.dart
|
||
'默认': 'Default',
|
||
'无': 'None',
|
||
'极低': 'Minimal',
|
||
'低': 'Low',
|
||
'中': 'Medium',
|
||
'高': 'High',
|
||
'极高': 'Extra high',
|
||
|
||
// terminal_state.dart
|
||
'终端 {0}': 'Terminal {0}',
|
||
'终端 1': 'Terminal 1',
|
||
'终端': 'Terminal',
|
||
'已退出': 'Exited',
|
||
'退出码 {0}': 'Exit code {0}',
|
||
'终端连接失败': 'Terminal connection failed',
|
||
|
||
// api/transport.dart
|
||
'下载已取消': 'Download cancelled',
|
||
'代理地址无效:{0}': 'Invalid proxy address: {0}',
|
||
'不支持的代理协议:{0}(支持 http、https、socks5、socks5h)':
|
||
'Unsupported proxy protocol: {0} (supported: http, https, socks5, socks5h)',
|
||
'无法解析代理主机': 'Could not resolve the proxy host',
|
||
|
||
// api/models.dart
|
||
'偏好': 'Preference',
|
||
'参考': 'Reference',
|
||
'事实': 'Fact',
|
||
|
||
// api/shells.dart
|
||
'{0}秒': '{0}s',
|
||
'{0}分{1}秒': '{0}m{1}s',
|
||
|
||
// api/relay_transport.dart
|
||
'无法获取 WebSocket 令牌({0})': 'Could not get a WebSocket token ({0})',
|
||
};
|