Repository navigation
Commit 1929dbd
committed
fix: add missing tr() sources to .pro and regenerate translations
1. Root cause: src/deepin-editor.pro SOURCES/HEADERS was missing four
files containing tr() calls: common/iflytek_ai_assistant.cpp/.h,
common/text_file_saver.cpp, editor/markdown/markdownbridge.h and
widgets/pathsettintwgt.cpp/.h. lupdate never scanned them, so their
existing translations were marked "vanished" in the .ts catalogs and
lrelease dropped them from .qm; runtime tr() fell back to English
2. Fix: add all missing files to the .pro lists, then regenerate
deepin-editor.ts / zh_CN / zh_HK / zh_TW via lupdate. Per language
16 vanished entries become active with their existing translations:
3 iflytek prompts, 8 file-save error prompts (text_file_saver),
5 markdown code-block prompts (MarkdownBridge)
3. Impact: voice read-aloud/dictation prompts, file-save error
messages and markdown code-block actions now display Chinese
(Simplified and Traditional); no code logic or build behavior
changed. Remaining languages recover via the Transifex sync now
that the .pro is complete. The stale "视图模式" entry (Chinese-literal
source from an old iteration, superseded by the active "View Mode"
entry) is removed from all catalogs
Log: Fix English fallback for prompts from files missing in .pro
Influence:
1. Test voice read-aloud/dictation with audio devices disabled
2. Test saving a large file / read-only file to see Chinese error prompts
3. Test markdown code block collapse/expand/copy tooltips
4. Verify settings path labels stay Chinese (PR #694 not regressed)
5. Verify other translated strings remain correct
fix: 补全 .pro 缺失的翻译源文件并重新生成翻译
1. 根因:src/deepin-editor.pro 的 SOURCES/HEADERS 列表缺少四个含
tr() 调用的文件:common/iflytek_ai_assistant.cpp/.h、
common/text_file_saver.cpp、editor/markdown/markdownbridge.h、
widgets/pathsettintwgt.cpp/.h。lupdate 从未扫描过它们,已有译文
被标记为 vanished,lrelease 丢弃后 .qm 缺失,运行时 tr() 回退英文
2. 方案:将缺失文件全部补入 .pro,用 lupdate 重新生成
deepin-editor.ts / zh_CN / zh_HK / zh_TW。每个语言 16 条 vanished
条目恢复生效并保留原有译文:iflytek 提示 3 条、文件保存错误
提示 8 条(text_file_saver)、Markdown 代码块操作提示 5 条
3. 影响:语音朗读/听写提示、文件保存错误提示、Markdown 代码块
操作文案恢复正常显示中文(简体与繁体),不涉及代码逻辑与
编译行为。其余语言可经由 Transifex 同步在 .pro 补全后自动恢复。
"视图模式"为源码中已无调用的死条目(已被生效的
"View Mode" 条目取代),已从全部目录中删除
Log: 修复 .pro 缺失源文件导致的提示文案回退英文问题
Influence:
1. 测试禁用音频输出/输入设备时的语音朗读与听写提示
2. 测试大文件/只读文件保存失败时的错误提示文案
3. 测试 Markdown 代码块折叠/展开/复制的提示文案
4. 验证设置页打开/保存位置文案仍为中文(不回退 #694 的修复)
5. 验证其他已翻译文案不受影响
PMS: BUG-3807411 parent 1a2f7c1 commit 1929dbd
5 files changed
Lines changed: 1337 additions & 1239 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| |||
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| 48 | + | |
| 49 | + | |
47 | 50 | | |
48 | 51 | | |
49 | 52 | | |
| |||
61 | 64 | | |
62 | 65 | | |
63 | 66 | | |
| 67 | + | |
64 | 68 | | |
65 | 69 | | |
66 | 70 | | |
| |||
80 | 84 | | |
81 | 85 | | |
82 | 86 | | |
| 87 | + | |
| 88 | + | |
83 | 89 | | |
84 | 90 | | |
85 | 91 | | |
| |||
98 | 104 | | |
99 | 105 | | |
100 | 106 | | |
| 107 | + | |
101 | 108 | | |
102 | 109 | | |
103 | 110 | | |
| |||
0 commit comments