feat: English and Chinese, and selectable chat text
- 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
This commit is contained in:
1 parent
da4bfb6826
commit
7b5bccf28f
42 files changed
+1943
-735
No files matched your search
@@ -0,0 +1,71 @@
|
||||
// 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> enServers = {
|
||||
'需要密码': 'Password',
|
||||
// Server list
|
||||
'连接你的 OpenChamber 服务器': 'Connect to your OpenChamber server',
|
||||
'添加服务器': 'Add server',
|
||||
'配对链接': 'Pairing link',
|
||||
'经由 Relay · {0}': 'Via Relay · {0}',
|
||||
'经由 {0}': 'Via {0}',
|
||||
'已连接': 'Connected',
|
||||
'连接': 'Connect',
|
||||
'编辑': 'Edit',
|
||||
'删除': 'Delete',
|
||||
'删除服务器?': 'Delete server?',
|
||||
'“{0}”将从列表移除,设备令牌也会删除。':
|
||||
'“{0}” will be removed from the list, and its device token will be deleted.',
|
||||
'取消': 'Cancel',
|
||||
'配对失败': 'Pairing failed',
|
||||
|
||||
// Connect form
|
||||
'连接 {0}': 'Connect to {0}',
|
||||
'名称': 'Name',
|
||||
'如 我的电脑': 'e.g. My computer',
|
||||
'通过 Relay 连接': 'Connect through Relay',
|
||||
'端到端加密;服务器与设备令牌保持不变':
|
||||
'End-to-end encrypted; the server and device token stay the same',
|
||||
'服务器地址': 'Server address',
|
||||
'代理(可选)': 'Proxy (optional)',
|
||||
'http://… 或 socks5://…': 'http://… or socks5://…',
|
||||
'自签证书指纹(可选)': 'Self-signed certificate fingerprint (optional)',
|
||||
'SHA-256 十六进制': 'SHA-256 hex',
|
||||
'信任自签名证书': 'Trust self-signed certificates',
|
||||
'密码(如果需要)': 'Password (if required)',
|
||||
'服务器密码;服务器未设置可留空':
|
||||
'Server password; leave empty if the server has none',
|
||||
|
||||
// Pairing dialog
|
||||
'在 OpenChamber 网页端打开「连接设备」,粘贴链接或直接扫描二维码。'
|
||||
'链接里带一次性密钥,以及直连地址或私有 Relay。':
|
||||
'In the OpenChamber web app, open “Connect a device”, then paste the link '
|
||||
'or scan the QR code. The link carries a one-time key and either a '
|
||||
'direct address or a private Relay.',
|
||||
'扫码': 'Scan QR code',
|
||||
'粘贴': 'Paste',
|
||||
'配对并连接': 'Pair and connect',
|
||||
|
||||
// QR scanner
|
||||
'没有可用的相机': 'No camera available',
|
||||
'没有收到相机画面,请关闭后重试':
|
||||
'No camera frames received; close and try again',
|
||||
'还没识别到二维码,试着靠近一点或让二维码占满取景框':
|
||||
'No QR code yet; move closer or fill the frame with the code',
|
||||
'需要相机权限才能扫码。请在系统设置里允许 OpenChamber 使用相机。':
|
||||
'Camera permission is required to scan. Allow OpenChamber to use the '
|
||||
'camera in system settings.',
|
||||
'无法打开相机:{0}': 'Could not open the camera: {0}',
|
||||
'这不是 OpenChamber 配对二维码': 'This is not an OpenChamber pairing QR code',
|
||||
'二维码解码出错,请重试': 'Could not decode the QR code; try again',
|
||||
'这个相机不支持手电筒': 'This camera does not support the flashlight',
|
||||
'重试': 'Retry',
|
||||
'关闭': 'Close',
|
||||
'手电筒': 'Flashlight',
|
||||
'把配对二维码放进框内': 'Put the pairing QR code inside the frame',
|
||||
'在 OpenChamber 网页端打开「连接设备」,选择二维码':
|
||||
'In the OpenChamber web app, open “Connect a device” and choose the QR '
|
||||
'code',
|
||||
'{0} · 已扫描 {1} 帧 / 解码 {2} 次':
|
||||
'{0} · {1} frames scanned / {2} decode attempts',
|
||||
};
|
||||
Reference in new issue
Block a user