Skip to content

fix(i18n): translate the DankDash card manifest strings - #77

Merged
bernardopg merged 1 commit into
mainfrom
fix/manifest-translations
Oct 26, 2026
Merged

bernardopg merged 1 commit into
mainfrom
fix/manifest-translations

Conversation

@bernardopg

Copy link
Copy Markdown
Owner

Summary

DMS renders the DankDash card name and its options from plugin.json itself, through I18n.trFor(pluginId, term), and reads their translations from translations/<lang>.json in the plugin directory. The plugin shipped no such directory, so AI quotas, Providers, Fit to size, Tone and the tone choices stayed English in every locale. The QML bundles in i18n/ were already complete for 2.1.0.

  • Add translations/pt.json, es.json, de.json and zh.json (DMS format: the English term is its own bucket). Tone choices reuse the DMS catalog terms so the card matches the shell.
  • tests/test-i18n.sh now fails when a manifest term is missing, empty or left in English in any locale, or when a locale in i18n/ has no translations/ file.
  • Ship translations/ in the release archive check (scripts/package-release) and in the checkout install command; scripts/check-metadata guards the latter.
  • docs/usage.md: the card strings follow the DMS language, not the plugin's Language setting. AGENTS.md layout and i18n rule updated; CHANGELOG.md Unreleased bullet.

Related issues

None.

Type of change

  • Bug fix
  • Documentation / i18n

Checklist

  • plugin.json .version and CHANGELOG.md are consistent (not release-bearing)
  • New/changed provider scripts are executable and emit valid JSON (no provider changes)
  • i18n/en.json keys have translations in every locale (or the strings are user-neutral)
  • Every commit is signed off (git commit -s) under the DCO
  • CI is green

Local: tests/test-i18n.sh and scripts/check-metadata pass; removing a term from translations/de.json makes tests/test-i18n.sh fail.

DMS renders the plugin.json dash title and option labels itself through
I18n.trFor, reading translations/<lang>.json from the plugin directory.
The plugin shipped none, so the card name and its options stayed English
in every locale.

Add pt, es, de and zh tables reusing the DMS catalog terms for the tone
choices, make tests/test-i18n.sh fail on any untranslated manifest term,
and ship translations/ in the release archive and the checkout install.

Signed-off-by: Bernardo Pinto Gomes <bernardopgomes@hotmail.com>
@github-actions github-actions Bot added documentation Improvements or additions to documentation area:ci CI, workflows, tooling labels Oct 26, 2026
@bernardopg
bernardopg merged commit 6155f5b into main Oct 26, 2026
20 checks passed
@bernardopg
bernardopg deleted the fix/manifest-translations branch October 26, 2026 19:02
@bernardopg bernardopg mentioned this pull request Oct 26, 2026
5 of 7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ci CI, workflows, tooling documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant