i18n: localize the About window update section + Crowdin sync#275
i18n: localize the About window update section + Crowdin sync#275AprilNEA wants to merge 1 commit into
Conversation
Route the About window's update-status strings (Checking, Available, Downloading, Installing, Staged, Errored, plus the action labels and footer links) through tr! and add their keys to all 20 locale files. Adds the Crowdin sync workflow that keeps the non-English locales in step with en.yml. (Fixes an implicit_clone clippy lint on the Errored arm in passing.)
Greptile SummaryThis PR routes all About-window update-status strings through
Confidence Score: 4/5The Rust code and locale files are clean; the only concern is in the new Crowdin workflow configuration. The .github/workflows/crowdin.yml — the
|
| Filename | Overview |
|---|---|
| .github/workflows/crowdin.yml | New Crowdin sync workflow; the PR body template references a non-existent export_languages key to describe language filtering, and actions are pinned to mutable tags despite having write permissions. |
| crates/openlogi-gui/src/windows/about.rs | All update-status strings and action button labels routed through tr!; implicit_clone lint on the Errored arm fixed with .clone(). Logic is correct. |
| crates/openlogi-gui/locales/en.yml | 14 new i18n keys added for update-status strings and footer links; all keys are consistent with how they are called in about.rs. |
| crates/openlogi-gui/locales/da.yml | 14 new translation keys added; all interpolation placeholders preserved correctly. |
| crates/openlogi-gui/locales/zh-CN.yml | 14 new translation keys added; full-width colon used appropriately in Chinese error string. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["Push to master\n(en.yml / crowdin.yml changed)"] --> B[crowdin.yml workflow]
C["Daily cron\n(03:17 UTC)"] --> B
D[workflow_dispatch] --> B
B --> E["Upload source\n(en.yml → Crowdin)"]
E --> F["Download translations\n(all Crowdin languages)"]
F --> G{"In languages_mapping?"}
G -- "yes (ja,ru,zh-CN,zh-HK,zh-TW,it)" --> H["File written with\nmapped locale code"]
G -- "no (14 other locales)" --> I["File written with\nCrowdin native code\n(may differ from existing files)"]
H --> J["Commit to crowdin/i18n branch"]
I --> J
J --> K["Open / update PR\nagainst master"]
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A["Push to master\n(en.yml / crowdin.yml changed)"] --> B[crowdin.yml workflow]
C["Daily cron\n(03:17 UTC)"] --> B
D[workflow_dispatch] --> B
B --> E["Upload source\n(en.yml → Crowdin)"]
E --> F["Download translations\n(all Crowdin languages)"]
F --> G{"In languages_mapping?"}
G -- "yes (ja,ru,zh-CN,zh-HK,zh-TW,it)" --> H["File written with\nmapped locale code"]
G -- "no (14 other locales)" --> I["File written with\nCrowdin native code\n(may differ from existing files)"]
H --> J["Commit to crowdin/i18n branch"]
I --> J
J --> K["Open / update PR\nagainst master"]
Reviews (1): Last reviewed commit: "i18n: localize the About window update s..." | Re-trigger Greptile
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} | ||
| CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} |
There was a problem hiding this comment.
export_languages key referenced in PR body but absent from crowdin.yml
The generated PR description claims "intentionally limited by export_languages in crowdin.yml", but the existing crowdin.yml has no export_languages key — only a languages_mapping covering 6 of the 20 locales. languages_mapping controls filename transformation, not which languages Crowdin downloads. Without export_languages, the action will attempt to download translations for every language present in the Crowdin project. For languages outside the mapping (da, de, el, es, fi, fr, ko, nb, nl, pl, pt-BR, pt-PT, sv), Crowdin falls back to its own locale codes, which could create wrong-named files (e.g. pt_BR.yml instead of pt-BR.yml) or silently overwrite the manually-maintained locales if the codes happen to match.
| upload_sources: true | ||
| upload_translations: false | ||
| download_translations: true | ||
| localization_branch_name: crowdin/i18n |
There was a problem hiding this comment.
Actions pinned to mutable tags
Both actions/checkout@v4 and crowdin/github-action@v2 are referenced by mutable version tags. If either tag is re-pointed upstream, subsequent workflow runs will silently pick up the new commit. For a workflow that has contents: write and pull-requests: write permissions, pinning to an immutable SHA removes that exposure surface.
Routes the About window's update-status strings (Checking, Available, Downloading, Installing, Staged, Errored, plus the action labels and footer links) through
tr!and adds their keys to all 20 locale files. Adds the Crowdin sync workflow that keeps the non-English locales in step withen.yml.Also fixes an
implicit_cloneclippy lint on theErroredarm in passing.Notes
locale_files_have_the_same_keystest passes).