Localisation: own the generator, generate the default strings.xml (19 keys English-only everywhere), migrate ~44 literals, CI gate

Đang mở
#82 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
25/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
android, kotlin, python
Lĩnh vực
ci-cd, localization

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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$d style); "Loaded N chars"-style strings should become <plurals> on migration
Ngôn ngữ chính
Kotlin
Star
2
Fork
0
Merge trung bình
4 giờ 43 phút
Pull request đã merge (30 ngày)
8

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của dasher-project/Dasher-Android

Tất cả issue của dasher-project/Dasher-Android

Issue tương tự

Thêm issue về Kotlin

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.