Repository navigation
feat(plugins): show marketplace categories in the app's language - #2400
Merged
Merged
Conversation
The plugin center now stores category ids and publishes their labels, so the desktop stops rendering a slug where a shelf belongs. A card carries the labels it displays and the ids a filter selects, a browse facet carries its label beside its id, and a catalog that predates the vocabulary falls back to the id rather than showing nothing.
Deploying pi-desktop with
|
| Latest commit: |
b8ba44f
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://5cbf98ce.pi-desktop.pages.dev |
| Branch Preview URL: | https://feat-plugin-category-labels.pi-desktop.pages.dev |
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.
Why
The plugin center now files every plugin under a fixed category id (
productivity,themes, …) and publishes the labels in English and Chinese, so the desktop was about to renderdeveloper-toolswhere a shelf belongs.What
categoryLabels;MarketPluginSummarykeeps the labels incategoriesand the ids in the newcategoryIds, and a browse facet carriesnamebeside itsid.market.browsereads labels from the center's page, the local snapshot fallback reads them from the catalog, and the RPC answer resolves both for the app's language.zh-TWreadszh-CN) → English → the id. A catalog published before the vocabulary existed still renders.nameand filters byid, so the language can change without changing what a click selects.Depends on AIUO-Net/pi-plugin-center
3c1f418/ release-v1.0.50, which is deployed. Compatible with an older center: no labels means ids render, exactly as today.Tests
cargo test -p host-core: newcategory_labels_fall_back_in_a_defined_orderanda_page_carries_the_labels_of_its_categories; the RPC fixture now asserts a facet carries its label and a card carries both the label it shows and the id a filter selects.market-browse-user-path): the chip showsWritingwhile the request carrieswriting.cargo fmt/clippyfor the touched files, and the marketplace render/IPC tests pass.Verified against production
/api/v1/pluginsreturns all 115 plugins with canonical ids andcategoryLabels({"en": "Productivity", "zh-CN": "效率工具"});catalog.jsoncarries the same map and every entry an id.