feat(registry): localized store descriptions via description_i18n - #1
feat(registry): localized store descriptions via description_i18n#1InstaZDLL wants to merge 2 commits into
Conversation
Store cards render registry.json verbatim, so the Apple Motion Artwork description stayed English in all 17 app languages while the chrome around it was translated. Add an optional `description_i18n` map next to `description` and fill it for the 16 non-English locales. WaveFlow 1.8.0+ picks the user's language (exact code -> base language -> en -> any entry); older builds ignore the unknown field and keep rendering the plain English string. `description` deliberately stays a plain string. This file is fetched by every WaveFlow ever installed, and a build predating localized descriptions fails to decode the whole catalogue if it finds an object there — its store would go dark for every plugin, and min_app_version can't rescue it since it is read after that decode. The schema now says so, CONTRIBUTING documents the sibling-table rule for both registry entries and plugin manifests, and additionalProperties:false meant the schema had to learn the new field anyway. Verified: ajv validation passes as in CI, and the v1.7.0 wire structs still decode this file. Refs InstaZDLL/WaveFlow#440
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe registry schema now supports localized plugin descriptions through a validated ChangesLocalized plugin descriptions
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@registry.json`:
- Line 17: Update the Russian translation for the "ru" entry in registry.json by
removing the comma between “Apple Music” and “отображаются”, leaving the rest of
the translation unchanged.
In `@schema/registry.schema.json`:
- Line 38: Align locale validation with the documented WaveFlow locale contract:
update schema/registry.schema.json at lines 38-38 to enumerate the supported
locale keys, or explicitly define the locale set as extensible; update
CONTRIBUTING.md at lines 76-76 if additional locale keys are intentionally
accepted. Ensure both sites consistently describe and enforce the same supported
locale behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: b554037f-f68a-4f2f-bd7d-20fb9dba9ff1
📒 Files selected for processing (4)
CONTRIBUTING.mdREADME.mdregistry.jsonschema/registry.schema.json
Two review findings: - the Russian description put a comma between subject and predicate. Switched to the participle form (отображаемые), which also mirrors the English noun phrase more closely than a finite verb did. - the locale pattern accepted any two-letter code and any suffix, while the app resolves keys verbatim against its 17 codes. A typo like "pt-br" or "jp" would have validated and then silently never rendered. An explicit enum fails it closed at review time instead. Verified with the CI validator: registry.json still passes and a "pt-br" key is now rejected.
The comma separated subject from predicate. Switched to the participle form (отображаемые), which also mirrors the English noun phrase more closely than a finite verb did. Same fix as the paired registry entry (InstaZDLL/waveflow-plugins#1), where the review caught it — the two strings are near-identical, so they stay in sync.
Downstream of InstaZDLL/WaveFlow#440 (desktop PR: InstaZDLL/WaveFlow#444).
Store cards render
registry.jsonverbatim, so the Apple Motion Artwork description stayed English in all 17 app languages while everything around it was translated.What changes
registry.json— an optionaldescription_i18nmap next todescription, filled for the 16 non-English locales (fr de es it nl pt pt-BR ru tr id ja ko zh-CN zh-TW ar hi). WaveFlow 1.8.0+ resolves exact code → base language →en→ any entry.schema/registry.schema.json— declares the new field (the entry isadditionalProperties: false, so CI would have rejected it otherwise), with a locale-code pattern and a note on whydescriptionmust stay a string.CONTRIBUTING.md— a "Translating what the user reads" section for plugin manifests (*_i18nsibling tables), plus the same rule spelled out for registry entries.README.md— the example entry shows the field.Why
descriptionstays a plain stringThis file is fetched by every WaveFlow ever installed. A build predating localized descriptions expects a string; hand it an object and it fails to decode the entire catalogue from all three delivery paths — that user's store goes dark for every plugin, not just this one.
min_app_versioncan't help, being read after the decode that already failed. The sibling map is simply ignored by those builds.Verification
validate-registrydoes it — passesdescription: String) still decodes this file and yields the English stringInert for users until WaveFlow 1.8.0 ships; harmless to every client before and after.
Summary by CodeRabbit
description_i18ntranslation field (while keepingdescriptionas plain text).description_i18n.