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
@@ -5,6 +5,20 @@
|
||||
|
||||
---
|
||||
|
||||
## 0.5.2 中英双语与长按选择文本(分支 `flutter`)
|
||||
|
||||
| 项 | 结果 |
|
||||
| --- | --- |
|
||||
| 语言 | 默认跟随系统(中文系统用中文,其它用英文),可在 设置 → 常规 → 语言 里固定「中文 / English」;选择保存在本机,启动时先读取再出第一帧,系统语言变化时「跟随系统」会立即重绘 |
|
||||
| 文案 | 界面文案以中文写在代码里,`tr()` / `trArgs()` 查英文表(`lib/l10n/en_*.dart`),`AppText` 取代 `Text` 自动翻译;缺条目回退中文,不会出现空文案。服务器与用户数据(会话标题、消息、任务名、文件内容等)不翻译 |
|
||||
| 系统组件 | 接入 `flutter_localizations`,日期/时间选择器、文本选择菜单等系统文案随语言切换 |
|
||||
| 选择文本 | 会话消息区包进 `SelectionArea`:手机上长按即可选中消息文本,并出现复制/全选菜单(此前只能选中工具输出等少数 `SelectableText`) |
|
||||
| 测试 | 新增 `test/l10n_test.dart`:查表回退、占位符替换、`AppText` 跟随语言、lib 里每个中文字面量都有英文条目;原有测试在中文下不变 |
|
||||
| 验证 | 模拟器:默认跟随系统(系统英文 → 英文界面);设置 → 常规 → 语言 切到中文,标题与整页立即变中文,重启后保持;再切英文并设回「跟随系统」。英文下设置索引、全部功能、计划任务、编辑器与系统时间选择器均为英文;中文下同页为中文。会话里长按消息文本出现选择手柄与 Copy / Share / Select all / Read aloud 菜单。98 项测试全过 |
|
||||
| 版本 | **0.5.2(code 502)** |
|
||||
|
||||
---
|
||||
|
||||
## 0.5.1 计划任务与「全部功能」入口(分支 `flutter`)
|
||||
|
||||
| 项 | 结果 |
|
||||
|
||||
Reference in new issue
Block a user