Skip to content

feat(registry): localized store descriptions via description_i18n - #1

Open
InstaZDLL wants to merge 2 commits into
mainfrom
feat/localized-registry-descriptions
Open

feat(registry): localized store descriptions via description_i18n#1
InstaZDLL wants to merge 2 commits into
mainfrom
feat/localized-registry-descriptions

Conversation

@InstaZDLL

@InstaZDLL InstaZDLL commented Jul 26, 2026

Copy link
Copy Markdown
Owner

Downstream of InstaZDLL/WaveFlow#440 (desktop PR: InstaZDLL/WaveFlow#444).

Store cards render registry.json verbatim, so the Apple Motion Artwork description stayed English in all 17 app languages while everything around it was translated.

What changes

  • registry.json — an optional description_i18n map next to description, 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 is additionalProperties: false, so CI would have rejected it otherwise), with a locale-code pattern and a note on why description must stay a string.
  • CONTRIBUTING.md — a "Translating what the user reads" section for plugin manifests (*_i18n sibling tables), plus the same rule spelled out for registry entries.
  • README.md — the example entry shows the field.

Why description stays a plain string

This 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_version can't help, being read after the decode that already failed. The sibling map is simply ignored by those builds.

Verification

  • ajv validation run locally exactly as validate-registry does it — passes
  • the v1.7.0 desktop wire struct (description: String) still decodes this file and yields the English string

Inert for users until WaveFlow 1.8.0 ships; harmless to every client before and after.

Summary by CodeRabbit

  • New Features
    • Added support for localized plugin store descriptions via a dedicated description_i18n translation field (while keeping description as plain text).
    • Updated the registry schema to validate locale-specific translations, known locale keys, and documented fallback behavior.
  • Documentation
    • Expanded contributor guidance on where and how to author translations in plugin manifests.
    • Updated README registry examples to include description_i18n.
  • Content Updates
    • Added localized descriptions for the Apple Artwork plugin.

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
Copilot AI review requested due to automatic review settings July 26, 2026 20:06

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: f7ac111f-a33a-4054-b328-11aac8965078

📥 Commits

Reviewing files that changed from the base of the PR and between 6eb5513 and 5a4f15e.

📒 Files selected for processing (2)
  • registry.json
  • schema/registry.schema.json

📝 Walkthrough

Walkthrough

The registry schema now supports localized plugin descriptions through a validated description_i18n map. Registry data, the README example, and contributor documentation demonstrate the field, locale handling, and compatibility requirements.

Changes

Localized plugin descriptions

Layer / File(s) Summary
Schema and registry data
schema/registry.schema.json, registry.json
Adds validation for description_i18n locale maps and localized descriptions for apple-artwork, while keeping description as a plain string.
Documentation and examples
CONTRIBUTING.md, README.md
Documents translation structure, locale fallback behavior, older-host compatibility, and a French registry example.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: copilot

Poem

A bunny found words in a language-map nest,
With French, German, and many more dressed.
The schema keeps strings tidy and bright,
While locales hop safely into sight.
Documentation thumps its paws: “Translate right!”

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding localized registry store descriptions via description_i18n.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/localized-registry-descriptions

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between d0abd91 and 6eb5513.

📒 Files selected for processing (4)
  • CONTRIBUTING.md
  • README.md
  • registry.json
  • schema/registry.schema.json

Comment thread registry.json Outdated
Comment thread schema/registry.schema.json Outdated
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.
Copilot AI review requested due to automatic review settings July 26, 2026 20:29
InstaZDLL added a commit to InstaZDLL/waveflow-plugin-apple-artwork that referenced this pull request Jul 26, 2026
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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants