Repository navigation
feat: translations for German, Spanish, French, Dutch and Portuguese - #114
Merged
Merged
Conversation
Every string the card and editor show now lives in src/locales/en.json instead of inline registerStrings calls. English is bundled; each other language is its own hashed chunk (chartdeck-card.<lang>-<hash>.js) that loads only for users of that language, and cards and editors redraw when it lands. Source maps ship beside every file, and the release attaches all dist/*.js and dist/*.js.map.
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.
Chartdeck now speaks German, Spanish, French, Dutch and Portuguese, laid out the same way as Decluttering Card Plus.
src/locales/en.json(766 keys).src/locales/{de,es,fr,nl,pt}.jsontranslate all of them.chartdeck-card.<lang>-<hash>.js, loaded with a relative dynamic import only for people using that language. It is requested as the resource loads; until it lands the card reads English, and the card and every editor element redraw once it arrives (LanguageController).pt-BRfalls back topt, and any missing string falls back to English.scripts/clean-dist.mjsemptiesdist/before each build so old hashed chunks do not linger.dist/*.jsanddist/*.js.map; provenance attestation covers everydist/*.js. HACS downloads every.jsindist/, so Marketplace installs need nothing new.test/localize.test.tschecks every locale has every English key with the same placeholders, plus the loading and fallback behaviour.Tested on the dev instance with a German profile: only the German chunk was fetched and the card showed German text.