Skip to content

Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins

feat(plugins): show marketplace categories in the app's language (#2400)

Lane2f137dff7f2
diff --git a/apps/desktop/src/features/plugins/MarketplacePanel.tsx b/apps/desktop/src/features/plugins/MarketplacePanel.tsx
index 5f9adf4e4..9b620086e 100644
--- a/apps/desktop/src/features/plugins/MarketplacePanel.tsx
+++ b/apps/desktop/src/features/plugins/MarketplacePanel.tsx
@@ -73,7 +73,7 @@ export function MarketplacePanel({
aria-pressed={active}
onClick={() => setCategory(active ? "" : facet.id)}
>
- {facet.id}
+ {facet.name ?? facet.id}
{facet.count > 0 ? (
<span className="plugins-filter-count">{facet.count}</span>
) : null}
diff --git a/apps/desktop/test/market-browse-user-path.test.mjs b/apps/desktop/test/market-browse-user-path.test.mjs
index fa07a6e0d..e7aab134c 100644
--- a/apps/desktop/test/market-browse-user-path.test.mjs
+++ b/apps/desktop/test/market-browse-user-path.test.mjs
@@ -45,11 +45,12 @@ const catalog = Array.from({ length: 60 }, (_, i) => ({
author: "acme",
latestVersion: "1.0.0",
updatedAt: "2026-01-01T00:00:00Z",
- categories: [i % 5 === 0 ? "Writing" : "Tools"],
+ categories: [i % 5 === 0 ? "writing" : "tools"],
permissionSummary: [],
installable: true,
downloads: 100 - i,
}));
+const labels = { writing: { en: "Writing", "zh-CN": "写作与文档" }, tools: { en: "Tools", "zh-CN": "工具" } };
const browseCalls = [];
let hold = null;
let failNext = null;
@@ -67,7 +68,7 @@ function answer(input) {
plugins: filtered.slice((page - 1) * size, page * size),
total: filtered.length, page, pageSize: size, pageCount: Math.ceil(filtered.length / size),
sort: input.sort || "recommended",
- categories: [...counts].map(([id, count]) => ({ id, count })),
+ categories: [...counts].map(([id, count]) => ({ id, name: labels[id].en, count })),
source: "remote", providerId: "official", sourceUrl: "https://center.invalid/catalog.json",
};
}
@@ -176,9 +177,11 @@ window.marketProbe = async () => {
await click(byText(".plugins-sort-btn", label("sortRecommended")), "recommended missing");
const writing = [...document.querySelectorAll(".plugins-filter")].find((n) => n.textContent.startsWith("Writing"));
+ check(writing, "the chip must show the label, not the id");
check(writing?.querySelector(".plugins-filter-count")?.textContent === "12", "category count missing");
await click(writing, "writing chip missing");
- await until(() => lastCall().category === "Writing" && cards().length === 12 && settled(), "category not applied");
+ // The chip shows "Writing"; the filter carries the id it stands for.
+ await until(() => lastCall().category === "writing" && cards().length === 12 && settled(), "category not applied");
await click([...document.querySelectorAll(".plugins-filter")].find((n) => n.textContent.trim() === label("categoryAll")), "all chip missing");
await until(() => lastCall().category === "" && settled(), "category not cleared");
diff --git a/crates/host-core/src/plugins.rs b/crates/host-core/src/plugins.rs
index 96f3d365e..b990b01ad 100644
--- a/crates/host-core/src/plugins.rs
+++ b/crates/host-core/src/plugins.rs
@@ -35,13 +35,13 @@ mod validation;
pub use manifest::PluginManifest;
pub use marketplace::{market_channel_from_settings, MarketChannel, OFFICIAL_CHANNEL_CATALOG_URL};
+pub(crate) use model::{CategoryLabels, MarketCatalogEntry, MarketCatalogFile};
pub use model::{
InstallOptions, InstallResult, MarketDownloadInfo, MarketPluginDetail, MarketPluginSummary,
MarketProvenance, MarketReview, MarketVersion, PluginDisplayI18n, PluginI18nMap,
PluginMarketplaceMeta, PluginSettingDefinition, PluginSettingOption, PluginSummary,
PluginUiMeta, PluginUpdateInfo, PluginYankNotice,
};
-pub(crate) use model::{MarketCatalogEntry, MarketCatalogFile};
pub(crate) use progress::{
CancelToken, DownloadReport, InstallObserver, InstallPhase, InstallProgress, NoProgress,
TriedMirror,
diff --git a/crates/host-core/src/plugins/market_browse.rs b/crates/host-core/src/plugins/market_browse.rs
index 6bd89e7e2..49f7ccbc7 100644
--- a/crates/host-core/src/plugins/market_browse.rs
+++ b/crates/host-core/src/plugins/market_browse.rs
@@ -18,6 +18,7 @@ use std::collections::{BTreeMap, HashMap};
use std::sync::{Mutex, OnceLock};
use std::time::Instant;
+use super::marketplace::category_label;
use super::reviews::{encode_component, get_json_limited, review_origin_for_catalog};
use super::*;
@@ -129,6 +130,9 @@ impl MarketBrowseQuery {
#[serde(rename_all = "camelCase")]
pub struct MarketCategoryFacet {
pub id: String,
+ /// The label for the app's language, when the source published one.
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub name: Option<String>,
pub count: u64,
}
@@ -138,6 +142,8 @@ pub(crate) struct BrowsePage {
pub(crate) entries: Vec<MarketCatalogEntry>,
pub(crate) total: u64,
pub(crate) categories: Vec<MarketCategoryFacet>,
+ /// Labels for the page's category ids, from the center or the snapshot.
+ pub(crate) labels: CategoryLabels,
}
/// Where a page came from.
@@ -176,6 +182,8 @@ struct BrowseWire {
plugins: Vec<MarketCatalogEntry>,
#[serde(default)]
artifact_base_url: Option<String>,
+ #[serde(default)]
+ category_labels: CategoryLabels,
}
#[derive(Default)]
@@ -369,6 +377,7 @@ pub(crate) fn parse_remote_page(
}
Ok(BrowsePage {
entries,
+ labels: wire.category_labels,
total: wire.total,
categories: wire
.categories
@@ -412,6 +421,7 @@ pub(crate) fn local_browse(catalog: &MarketCatalogFile, query: &MarketBrowseQuer
.and_modify(|facet| facet.count += 1)
.or_insert_with(|| MarketCategoryFacet {
id: category.to_string(),
+ name: None,
count: 1,
});
}
@@ -473,6 +483,7 @@ pub(crate) fn local_browse(catalog: &MarketCatalogFile, query: &MarketBrowseQuer
categories.sort_by(|a, b| b.count.cmp(&a.count).then_with(|| a.id.cmp(&b.id)));
BrowsePage {
entries,
+ labels: catalog.category_labels.clone(),
total,
categories,
}
@@ -578,14 +589,25 @@ impl PluginManager {
plugins: page
.entries
.iter()
- .map(|entry| self.to_market_summary(entry))
+ .map(|entry| {
+ let mut summary = self.to_market_summary(entry);
+ self.localize_categories(entry, &mut summary, &page.labels);
+ summary
+ })
.collect(),
total: page.total,
page: query.page,
page_size,
page_count,
sort: query.sort.as_str(),
- categories: page.categories,
+ categories: page
+ .categories
+ .into_iter()
+ .map(|mut facet| {
+ facet.name = Some(category_label(&page.labels, &facet.id, &self.locale));
+ facet
+ })
+ .collect(),
source: match source {
BrowseSource::Remote => "remote",
BrowseSource::Local => "local",
@@ -725,14 +747,17 @@ mod tests {
got.categories,
vec![
MarketCategoryFacet {
+ name: None,
id: "Productivity".into(),
count: 2
},
MarketCategoryFacet {
+ name: None,
id: "Tools".into(),
count: 2
},
MarketCategoryFacet {
+ name: None,
id: "Writing".into(),
count: 1
},
@@ -744,6 +769,52 @@ mod tests {
assert_eq!(ids(&got), ["pi.browser", "pi.todo", "pi.git", "pi.notes"]);
}
+ #[test]
+ fn category_labels_fall_back_in_a_defined_order() {
+ let mut labels = CategoryLabels::new();
+ let mut zh = std::collections::BTreeMap::new();
+ zh.insert("en".to_string(), "Productivity".to_string());
+ zh.insert("zh-CN".to_string(), "效率工具".to_string());
+ labels.insert("productivity".to_string(), zh);
+
+ assert_eq!(category_label(&labels, "productivity", "zh-CN"), "效率工具");
+ // Traditional Chinese reads the Simplified label rather than English.
+ assert_eq!(category_label(&labels, "productivity", "zh-TW"), "效率工具");
+ assert_eq!(
+ category_label(&labels, "productivity", "de"),
+ "Productivity"
+ );
+ // A catalog that predates the vocabulary names nothing; the id stands.
+ assert_eq!(category_label(&labels, "themes", "zh-CN"), "themes");
+ }
+
+ #[test]
+ fn a_page_carries_the_labels_of_its_categories() {
+ let q = query(json!({ "pageSize": 2 }));
+ let payload = json!({
+ "total": 1,
+ "categoryLabels": {
+ "themes": { "en": "Themes", "zh-CN": "外观主题" }
+ },
+ "categories": [{ "id": "themes", "count": 1 }],
+ "plugins": [{
+ "id": "pi.parchment", "name": "Parchment", "description": "", "author": "acme",
+ "categories": ["themes"],
+ "versions": [{ "version": "1.0.0", "publishedAt": "2026-01-01T00:00:00Z",
+ "shasum": "ab", "url": "packages/x.piplug", "sizeBytes": 1, "permissions": [] }]
+ }]
+ });
+ let page = parse_remote_page(
+ "https://plugins.example/catalog.json",
+ &q,
+ payload.to_string().as_bytes(),
+ )
+ .unwrap();
+ assert_eq!(page.labels["themes"]["zh-CN"], "外观主题");
+ assert_eq!(category_label(&page.labels, "themes", "en"), "Themes");
+ assert_eq!(page.entries[0].categories, ["themes"]);
+ }
+
#[test]
fn browse_url_encodes_the_query() {
let q = query(json!({ "query": "待办 a&b", "category": "AI Tools", "seed": 9, "page": 2 }));
diff --git a/crates/host-core/src/plugins/marketplace.rs b/crates/host-core/src/plugins/marketplace.rs
index 832f0de25..79f331d3c 100644
--- a/crates/host-core/src/plugins/marketplace.rs
+++ b/crates/host-core/src/plugins/marketplace.rs
@@ -331,6 +331,25 @@ impl PluginManager {
}
}
+ /// Turn an entry's category ids into the labels the cards show, keeping the
+ /// ids for filtering.
+ ///
+ /// A catalog that predates the vocabulary carries no labels, and then the
+ /// id is what the reader sees — the same fallback the website uses.
+ pub(crate) fn localize_categories(
+ &self,
+ entry: &MarketCatalogEntry,
+ summary: &mut MarketPluginSummary,
+ labels: &CategoryLabels,
+ ) {
+ summary.category_ids = entry.categories.clone();
+ summary.categories = entry
+ .categories
+ .iter()
+ .map(|id| category_label(labels, id, &self.locale))
+ .collect();
+ }
+
pub fn market_search(
&self,
query: Option<&str>,
@@ -360,7 +379,9 @@ impl PluginManager {
continue;
}
}
- out.push(self.to_market_summary(&entry));
+ let mut summary = self.to_market_summary(&entry);
+ self.localize_categories(&entry, &mut summary, &catalog.category_labels);
+ out.push(summary);
}
Ok(out)
}
@@ -376,7 +397,8 @@ impl PluginManager {
entry
.versions
.sort_by(|a, b| compare_plugin_versions(&b.version, &a.version));
- let summary = self.to_market_summary(&entry);
+ let mut summary = self.to_market_summary(&entry);
+ self.localize_categories(&entry, &mut summary, &catalog.category_labels);
let permissions = latest_market_version(&entry.versions)
.map(|v| v.permissions.clone())
.unwrap_or_default();
@@ -547,6 +569,7 @@ impl PluginManager {
let installed = self.get(&entry.id);
let catalog_url = self.market_source_url();
MarketPluginSummary {
+ category_ids: Vec::new(),
id: entry.id.clone(),
name: localized_field(entry.i18n.as_ref(), &self.locale, |text| text.name.as_ref())
.cloned()
@@ -638,6 +661,30 @@ impl PluginManager {
}
}
+/// Label for one category id in one locale.
+///
+/// The exact locale wins; then the same language with another region
+/// (`zh-TW` reads `zh-CN`); then English; then the id itself.
+pub(crate) fn category_label(labels: &CategoryLabels, id: &str, locale: &str) -> String {
+ let Some(by_locale) = labels.get(id) else {
+ return id.to_string();
+ };
+ if let Some(text) = by_locale.get(locale).filter(|text| !text.trim().is_empty()) {
+ return text.clone();
+ }
+ let language = locale.split(['-', '_']).next().unwrap_or(locale);
+ if let Some((_, text)) = by_locale
+ .iter()
+ .find(|(key, text)| !text.trim().is_empty() && key.starts_with(language))
+ {
+ return text.clone();
+ }
+ if let Some(text) = by_locale.get("en").filter(|text| !text.trim().is_empty()) {
+ return text.clone();
+ }
+ id.to_string()
+}
+
pub(crate) fn host_supports_version(version: &MarketVersion) -> bool {
let Some(required) = version.min_pi_desktop.as_deref().map(str::trim) else {
return true;
diff --git a/crates/host-core/src/plugins/marketplace/catalog.rs b/crates/host-core/src/plugins/marketplace/catalog.rs
index c12c534eb..4af2ce9d6 100644
--- a/crates/host-core/src/plugins/marketplace/catalog.rs
+++ b/crates/host-core/src/plugins/marketplace/catalog.rs
@@ -7,6 +7,7 @@ pub(crate) fn built_in_catalog_at(data_dir: &Path) -> MarketCatalogFile {
let hello_bytes = bundled_package_bytes("demo.hello", "0.2.0").unwrap_or_default();
let notes_bytes = bundled_package_bytes("demo.workspace-notes", "0.1.0").unwrap_or_default();
MarketCatalogFile {
+ category_labels: CategoryLabels::new(),
schema_version: 1,
provider_id: "official".into(),
catalog_id: None,
diff --git a/crates/host-core/src/plugins/model.rs b/crates/host-core/src/plugins/model.rs
index 43a03d2f2..19ccba6f4 100644
--- a/crates/host-core/src/plugins/model.rs
+++ b/crates/host-core/src/plugins/model.rs
@@ -265,8 +265,12 @@ pub struct MarketPluginSummary {
#[serde(skip_serializing_if = "Option::is_none")]
pub downloads: Option<u64>,
pub updated_at: String,
+ /// Display labels for the categories, in the app's language.
#[serde(default)]
pub categories: Vec<String>,
+ /// The canonical category ids, for filtering.
+ #[serde(default, skip_serializing_if = "Vec::is_empty")]
+ pub category_ids: Vec<String>,
pub permission_summary: Vec<String>,
#[serde(default)]
pub verified: bool,
@@ -446,6 +450,10 @@ pub(crate) struct MarketCatalogEntry {
pub(crate) versions: Vec<MarketVersion>,
}
+/// Category labels keyed by category id, then by locale.
+pub(crate) type CategoryLabels =
+ std::collections::BTreeMap<String, std::collections::BTreeMap<String, String>>;
+
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub(crate) struct MarketCatalogFile {
/// Absent or 1 means the v1 schema. v2 adds provenance, review verdicts,
@@ -470,6 +478,11 @@ pub(crate) struct MarketCatalogFile {
/// base, so switching source never sends a download to another provider.
#[serde(default)]
pub(crate) artifact_base_url: Option<String>,
+ /// Category labels by id, in both guaranteed languages. Entries carry ids;
+ /// a client renders the label for its own language and falls back to the
+ /// id, so a catalog published before the vocabulary existed still renders.
+ #[serde(default, rename = "categoryLabels", alias = "category_labels")]
+ pub(crate) category_labels: CategoryLabels,
#[serde(default)]
pub(crate) plugins: Vec<MarketCatalogEntry>,
}
diff --git a/crates/host-core/src/rpc/market_browse_rpc_tests.rs b/crates/host-core/src/rpc/market_browse_rpc_tests.rs
index ce838e998..2c9f00013 100644
--- a/crates/host-core/src/rpc/market_browse_rpc_tests.rs
+++ b/crates/host-core/src/rpc/market_browse_rpc_tests.rs
@@ -136,19 +136,22 @@ fn remote_page() -> Value {
json!({
"total": 30,
"pageCount": 15,
- "categories": [{ "id": "Tools", "count": 30 }],
+ "categories": [{ "id": "developer-tools", "count": 30 }],
+ "categoryLabels": {
+ "developer-tools": { "en": "Developer Tools", "zh-CN": "开发工具" }
+ },
"artifactBaseUrl": null,
"plugins": [
{
"id": "acme.remote-only", "name": "Remote Only", "description": "From the center",
- "author": "acme", "categories": ["Tools"], "trust": "community", "downloads": 7,
+ "author": "acme", "categories": ["developer-tools"], "trust": "community", "downloads": 7,
"versions": [{ "version": "2.0.0", "publishedAt": "2026-03-01T00:00:00Z",
"shasum": "ab".repeat(32), "url": "packages/acme.remote-only-2.0.0.piplug",
"sizeBytes": 10, "permissions": ["ui.panel"] }]
},
{
"id": "acme.second", "name": "Second", "description": "",
- "author": "acme", "categories": ["Tools"],
+ "author": "acme", "categories": ["developer-tools"],
"versions": [{ "version": "1.0.0", "publishedAt": "2026-02-01T00:00:00Z",
"shasum": "cd".repeat(32), "url": "packages/acme.second-1.0.0.piplug",
"sizeBytes": 10, "permissions": [] }]
@@ -188,12 +191,21 @@ async fn browse_serves_the_centers_page_caches_it_and_opens_its_detail() {
(Some(2), Some(2), Some(15))
);
assert_eq!(first["sort"], "popular");
- assert_eq!(first["categories"][0]["id"], "Tools");
+ assert_eq!(first["categories"][0]["id"], "developer-tools");
+ // The facet carries the label for the host's language, and the card keeps
+ // both the label it shows and the id a filter selects.
+ assert!(
+ first["categories"][0]["name"].is_string(),
+ "facet has no label: {}",
+ first["categories"]
+ );
let plugins = first["plugins"].as_array().unwrap();
assert_eq!(plugins.len(), 2);
assert_eq!(plugins[0]["id"], "acme.remote-only");
assert_eq!(plugins[0]["latestVersion"], "2.0.0");
assert_eq!(plugins[0]["installed"], false);
+ assert_eq!(plugins[0]["categoryIds"][0], "developer-tools");
+ assert!(plugins[0]["categories"][0].as_str().unwrap() != "developer-tools");
let searches = center.searches();
assert_eq!(searches.len(), 1);
diff --git a/docs/spec/07-plugins/07-plugin-marketplace.md b/docs/spec/07-plugins/07-plugin-marketplace.md
index e4a6e92cb..faf41dd79 100644
--- a/docs/spec/07-plugins/07-plugin-marketplace.md
+++ b/docs/spec/07-plugins/07-plugin-marketplace.md
@@ -307,6 +307,26 @@ Client rules for v2:
optional until the center's signing phase lands. An unverifiable signature is
never treated as a valid one.
+### Category vocabulary
+
+A category is an **id**, never a display string. Ids are stable lowercase
+slugs in the plugin center's closed vocabulary: `ai-models`, `agents-workflow`,
+`memory-knowledge`, `developer-tools`, `productivity`, `usage-analytics`,
+`search-web`, `media-creative`, `integrations`, `desktop-system`, `themes`,
+`writing`, `fun`. Each carries an English and a Simplified Chinese label;
+Traditional Chinese reads the same label, and any other client language falls
+back to English, so a shelf is never blank.
+
+A plugin carries one to three ids, the first being its primary shelf. The
+catalog and every browse answer publish the labels by id (`categoryLabels` on
+`catalog.json` and `/api/v1/catalog/search`), so the desktop renders a shelf in
+the app's language without shipping its own copy: `MarketPluginSummary`
+carries the labels in `categories` and the ids in `categoryIds`, and a browse
+facet carries `name` beside its `id`. A filter sends the **id**; the center
+also accepts a label in either language so a link written before the
+vocabulary existed still selects what it meant. A catalog that predates the
+vocabulary carries no labels, and the id is rendered instead.
+
### MarketPluginSummary
```ts
type MarketPluginSummary = {
diff --git a/packages/shared/src/changelog-de.ts b/packages/shared/src/changelog-de.ts
index bf7469955..a57a26dda 100644
--- a/packages/shared/src/changelog-de.ts
+++ b/packages/shared/src/changelog-de.ts
@@ -12,6 +12,7 @@ export const deEntries: ChangelogEntry[] = [
"Bei chinesischer IME-Eingabe warten Slash-Befehle auf den Abschluss der Eingabe und bewahren den Entwurf, statt einen Schrägstrich zu duplizieren.",
"Neu generierte Prompts bleiben nach der letzten Antwort an der richtigen Stelle, wenn ihr Archiv außerhalb des geladenen Verlaufs fertig wird.",
"Den Plugin-Marktplatz als eine Liste durchsuchen, die beim Scrollen nachlädt, nach Empfohlen, Beliebt, Neueste oder Name sortieren und die Trefferzahl je Kategorie sehen; ist das Plugin-Center nicht erreichbar, antwortet der zuletzt gespeicherte Katalog.",
+ "Jedes Plugin liegt jetzt auf einem zweisprachigen Regal, sodass der Marktplatz auf Deutsch oder Englisch liest und nach derselben Kategorie filtert.",
],
},
{
diff --git a/packages/shared/src/changelog-en.ts b/packages/shared/src/changelog-en.ts
index c94c4529b..c0e285ba3 100644
--- a/packages/shared/src/changelog-en.ts
+++ b/packages/shared/src/changelog-en.ts
@@ -12,6 +12,7 @@ export const enEntries: ChangelogEntry[] = [
"With a Chinese IME, slash commands wait for composition to commit and preserve the draft instead of inserting a duplicate slash.",
"Regenerated prompts keep their position after the latest reply when their archive finishes outside the loaded history.",
"Browse the plugin marketplace as one list that loads more as you scroll, sort by recommended, popular, newest, or name, and see how many plugins match each category; the last saved catalog answers when the plugin center is unreachable.",
+ "Every plugin now sits on a bilingual shelf, so the marketplace reads in English or Chinese and filters by one shared category.",
],
},
{
diff --git a/packages/shared/src/changelog-es.ts b/packages/shared/src/changelog-es.ts
index 3726917e2..77ab09f78 100644
--- a/packages/shared/src/changelog-es.ts
+++ b/packages/shared/src/changelog-es.ts
@@ -12,6 +12,7 @@ export const esEntries: ChangelogEntry[] = [
"Con un IME chino, los comandos con barra esperan a que termine la composición y conservan el borrador para evitar insertar una barra duplicada.",
"Los prompts regenerados mantienen su posición después de la respuesta más reciente cuando su archivo se completa fuera del historial cargado.",
"Explora el marketplace de complementos en una lista que carga más al desplazarte, ordena por recomendados, populares, recientes o nombre y consulta cuántos coinciden en cada categoría; si el centro de complementos no responde, se usa el último catálogo guardado.",
+ "Cada complemento está ahora en un estante bilingüe, así que el marketplace se lee en español o chino y filtra por la misma categoría.",
],
},
{
diff --git a/packages/shared/src/changelog-fr.ts b/packages/shared/src/changelog-fr.ts
index c51fb7460..c51bfc05d 100644
--- a/packages/shared/src/changelog-fr.ts
+++ b/packages/shared/src/changelog-fr.ts
@@ -12,6 +12,7 @@ export const frEntries: ChangelogEntry[] = [
"Avec une IME chinoise, les commandes slash attendent la validation de la composition et préservent le brouillon au lieu de dupliquer la barre oblique.",
"Les prompts régénérés gardent leur place après la réponse la plus récente lorsque leur archivage se termine hors de l’historique chargé.",
"Parcourez la marketplace de plugins dans une liste qui se charge au défilement, triez par recommandés, populaires, récents ou nom, et voyez le nombre de résultats par catégorie ; le dernier catalogue enregistré répond si le centre de plugins est injoignable.",
+ "Chaque plugin est désormais rangé sur une étagère bilingue : la marketplace se lit en français ou en chinois et filtre par la même catégorie.",
],
},
{
diff --git a/packages/shared/src/changelog-ko.ts b/packages/shared/src/changelog-ko.ts
index c83db841c..5d0df92c0 100644
--- a/packages/shared/src/changelog-ko.ts
+++ b/packages/shared/src/changelog-ko.ts
@@ -12,6 +12,7 @@ export const koEntries: ChangelogEntry[] = [
"중국어 IME 사용 중에는 입력 조합이 끝날 때까지 슬래시 명령을 적용하지 않고 초안을 보존해 슬래시 중복 삽입을 막습니다.",
"다시 생성한 프롬프트는 보관 처리가 로드된 기록 범위 밖에서 끝나도 최신 답변 뒤의 올바른 위치를 유지합니다.",
"플러그인 마켓플레이스를 스크롤하면 계속 불러오는 하나의 목록으로 탐색하고 추천·인기·최신·이름순으로 정렬하며 카테고리별 일치 수를 확인할 수 있습니다. 플러그인 센터에 연결할 수 없으면 마지막으로 저장된 카탈로그를 사용합니다.",
+ "모든 플러그인이 이중 언어 카테고리로 정리되어, 마켓플레이스가 한국어와 중국어에서 같은 분류로 표시되고 필터링됩니다.",
],
},
{
diff --git a/packages/shared/src/changelog-pt-BR.ts b/packages/shared/src/changelog-pt-BR.ts
index bcd0893e7..57181d070 100644
--- a/packages/shared/src/changelog-pt-BR.ts
+++ b/packages/shared/src/changelog-pt-BR.ts
@@ -12,6 +12,7 @@ export const ptBREntries: ChangelogEntry[] = [
"Com um IME chinês, comandos com barra aguardam o fim da composição e preservam o rascunho, evitando inserir uma barra duplicada.",
"Prompts regenerados permanecem na posição correta após a resposta mais recente quando o arquivamento termina fora do histórico carregado.",
"Navegue pelo marketplace de plugins em uma lista que carrega mais ao rolar, ordene por recomendados, populares, recentes ou nome e veja quantos plugins correspondem a cada categoria; se a central de plugins não responder, o último catálogo salvo é usado.",
+ "Cada plugin agora fica em uma prateleira bilíngue, então o marketplace é lido em português ou chinês e filtra pela mesma categoria.",
],
},
{
diff --git a/packages/shared/src/changelog-tr.ts b/packages/shared/src/changelog-tr.ts
index 63ac64ebd..4c2f7ca2e 100644
--- a/packages/shared/src/changelog-tr.ts
+++ b/packages/shared/src/changelog-tr.ts
@@ -12,6 +12,7 @@ export const trEntries: ChangelogEntry[] = [
"Çince IME kullanırken eğik çizgi komutları, taslağı koruyarak metin girişinin tamamlanmasını bekler ve yinelenen eğik çizgiyi önler.",
"Yeniden oluşturulan istemler, arşivleri yüklenen geçmişin dışında tamamlandığında en son yanıttan sonraki doğru konumlarında kalır.",
"Eklenti pazarına kaydırdıkça yüklenen tek bir listede göz atın, önerilen, popüler, en yeni veya ada göre sıralayın ve her kategoride kaç eklentinin eşleştiğini görün; eklenti merkezine ulaşılamazsa son kaydedilen katalog kullanılır.",
+ "Her eklenti artık iki dilli bir rafa yerleşiyor; pazar yeri Türkçe veya Çince okunuyor ve aynı kategoriyle filtreleniyor.",
],
},
{
diff --git a/packages/shared/src/changelog-zh-CN.ts b/packages/shared/src/changelog-zh-CN.ts
index f8d9230cd..567694bed 100644
--- a/packages/shared/src/changelog-zh-CN.ts
+++ b/packages/shared/src/changelog-zh-CN.ts
@@ -12,6 +12,7 @@ export const zhCNEntries: ChangelogEntry[] = [
"使用中文输入法时,斜杠命令会等输入提交后再应用,同时保留草稿,避免重复插入斜杠。",
"重新生成的提示即使在已加载历史范围之外完成归档,也会保持在最新回答之后的正确位置。",
"插件市场改为滚动自动加载,可按推荐、最热、最新或名称排序,分类显示匹配数量;插件中心不可用时使用本机保存的目录。",
+ "所有插件都按双语分类归档,插件市场在中英文下都能正确显示,并按同一套分类筛选。",
],
},
{
diff --git a/packages/shared/src/changelog-zh-TW.ts b/packages/shared/src/changelog-zh-TW.ts
index 15fe0a7ff..a6ce7962a 100644
--- a/packages/shared/src/changelog-zh-TW.ts
+++ b/packages/shared/src/changelog-zh-TW.ts
@@ -12,6 +12,7 @@ export const zhTWEntries: ChangelogEntry[] = [
"使用中文輸入法時,斜線命令會等輸入提交後才套用,同時保留草稿,避免重複插入斜線。",
"重新產生的提示即使在已載入歷史範圍之外完成封存,也會維持在最新回覆之後的正確位置。",
"外掛市集改為捲動自動載入,可依推薦、最熱門、最新或名稱排序,分類會顯示符合數量;外掛中心無法使用時改用本機儲存的目錄。",
+ "所有外掛都依雙語分類歸檔,外掛市集在中英文下都能正確顯示,並依同一套分類篩選。",
],
},
{
diff --git a/packages/shared/src/types/marketplace.ts b/packages/shared/src/types/marketplace.ts
index 94e08748b..446284758 100644
--- a/packages/shared/src/types/marketplace.ts
+++ b/packages/shared/src/types/marketplace.ts
@@ -15,7 +15,10 @@ export type MarketPluginSummary = {
latestVersion: string;
downloads?: number;
updatedAt: string;
+ /** Category labels in the app's language, for display. */
categories?: string[];
+ /** The canonical category ids, for filtering. */
+ categoryIds?: string[];
permissionSummary: string[];
verified?: boolean;
/** Catalog v2 trust tier, as the host is willing to render it. */
@@ -46,7 +49,13 @@ export type MarketBrowseQuery = {
};
/** One category and how many of the query's matches carry it. */
-export type MarketCategoryFacet = { id: string; count: number };
+export type MarketCategoryFacet = {
+ /** The canonical category id; what a filter selects. */
+ id: string;
+ /** The label for the app's language, when the source published one. */
+ name?: string;
+ count: number;
+};
/** One page of the marketplace, as `market.browse` answers it. */
export type MarketBrowseResult = {