Localisation: own the generator, generate the default strings.xml (19 keys English-only everywhere), migrate ~44 literals, CI gate
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 25/100
- Issue 类型
- 重构
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 领域
- ci-cd, localization
调研方向
Start with the generator that currently lives in Dasher-GTK (Scripts/generate-from-shared.py) and the default values/strings.xml, then compare them with the literals in SettingsScreen.kt, DasherImeService.kt and MainActivity.kt. Done means the default strings file is generated from the catalogue, the hardcoded literals use stringResource, and a CI step fails when the generated output drifts. The issue spans several subsystems, so a newcomer should coordinate with maintainers before starting.
由索引模型根据 Issue 内容生成。
描述
What's missing (from the cross-platform localisation audit, 2026-10-31 — ui-string-audit.md in Dasher-Windows)
Android generates values-*/strings.xml for 33 locales (250 keys each) but three structural gaps leave real user-visible English:
1. The generator doesn't live here
Scripts/generate-from-shared.py lives in Dasher-GTK and writes cross-repo into ../Dasher-Android/app/src/main/res. Vendor it into this repo (with the shared-resources submodule) so Android owns its own pipeline and can CI-gate it.
2. The default values/strings.xml is hand-written, not generated
38 keys maintained by hand while 33 locale files are generated — so 19 of the 35 keys actually referenced in code are English-only in every locale (toolbar_*, settings_title, settings_close, settings_advanced, settings_reset_defaults/done, toolbar_speed, toolbar_auto, share_text, save_default_name, …). Generate the default file from the catalogue's en values and the gap disappears structurally.
3. ~44 distinct hardcoded literals bypass localisation entirely
SettingsScreen.kt (26 — "Privacy-preserving analytics", "App language", "Appearance", "Training data"…), DasherImeService.kt (16 — "Switch to emoji keyboard", "Resize"…), MainActivity.kt (8 — "No game text available", "Copied"…). ~7 are exact catalogue matches (drop-in stringResource swaps: Cancel, Reset, Training data, Reset training data?, Nothing to share, Dasher).
4. No freshness gate — and lint can't catch drift
Nothing regenerates + diffs the strings in CI (Dasher-Windows' build-installer.yml shows the pattern). Lint's MissingTranslation is explicitly disabled (checkReleaseBuilds=false, abortOnError=false) — worth re-enabling once the default file is generated.
Also
- Submodule pin is behind canonical (misses
preparing_dasher,float_needs_permission, and the 70-key chrome set with all its translations from the Windows migration) - Gotchas: digit-leading catalogue keys get an
s_prefix in the generator; positional format args (%1$dstyle); "Loaded N chars"-style strings should become<plurals>on migration
- 主要语言
- Kotlin
- 星标
- 2
- 派生
- 0
- 平均合并
- 4 小时 43 分钟
- 30 天内合并 PR
- 8
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
dasher-project/Dasher-Android 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 52/100
-
enhancement
难度 3/5 1-2 天 新手友好度 72/100
-
enhancement
难度 3/5 1-2 天 新手友好度 68/100
-
难度 4/5 3-5 天 新手友好度 68/100
-
难度 5/5 一周以上 新手友好度 42/100
查看 dasher-project/Dasher-Android 的全部 Issue
相似的 Issue
-
e2e-failure
难度 2/5 1-3 小时 新手友好度 78/100
home-assistant/android#7809 ·
维护者通常 1 天内回复
-
index-request triaged
难度 1/5 1 小时以内 新手友好度 78/100
JetBrains/klibs-io#611 · 2 条评论 ·
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 3 天内回复
-
afk-ok area:ci size:S
难度 2/5 1-3 小时 新手友好度 83/100
enorm-labs/event-junkie#4518 ·
维护者通常 1 天内回复