Repository navigation
fix(i18n): translate the DankDash card manifest strings - #77
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
DMS renders the DankDash card name and its options from
plugin.jsonitself, throughI18n.trFor(pluginId, term), and reads their translations fromtranslations/<lang>.jsonin 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 ini18n/were already complete for 2.1.0.translations/pt.json,es.json,de.jsonandzh.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.shnow fails when a manifest term is missing, empty or left in English in any locale, or when a locale ini18n/has notranslations/file.translations/in the release archive check (scripts/package-release) and in the checkout install command;scripts/check-metadataguards the latter.docs/usage.md: the card strings follow the DMS language, not the plugin's Language setting.AGENTS.mdlayout and i18n rule updated;CHANGELOG.mdUnreleased bullet.Related issues
None.
Type of change
Checklist
plugin.json.versionandCHANGELOG.mdare consistent (not release-bearing)i18n/en.jsonkeys have translations in every locale (or the strings are user-neutral)git commit -s) under the DCOLocal:
tests/test-i18n.shandscripts/check-metadatapass; removing a term fromtranslations/de.jsonmakestests/test-i18n.shfail.