makecindy / makecindy/cindy

插件市场列表/详情按宿主语言本地化(需 registry 侧配合)(PR #338 follow-up)

Open
#392 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
2.7k
Forks
395
Avg merge
21h 48m
Merged PRs (30d)
776

Description

## 背景

PR #338 引入了宿主驱动的插件本地化契约(安装/运行时已生效)。review 中 Codex 指出市场浏览面仍显示基础语言(线程已按后续项 resolve)。

## 现状

- `apps/desktop/src/main/plugin-market/service.ts` 的列表/详情/更新入口消费的是 registry 元数据里的 manifest(`validateGhostManifest(plugin.currentRelease.manifest)`),locale 文件在 .cindy zip 内,浏览期不可得 → 市场卡片/详情显示基础语言,与已安装列表的本地化展示可能不一致。
- 安装/更新确认走 `GhostManager.inspect(zip)`,已本地化;权限增量 diff 按结构化 key 比较,不受影响。

## 方案方向

1. registry 发布侧在 release 元数据中携带 locale 资源(**服务端仓改动,需先行**)。
2. 客户端 `PluginMarketService` 拿到 locale 资源后,复用 `validateGhostManifestLocaleResource` / `resolveGhostManifestLocale` 同一套 validator 解析,避免与 GhostManager 契约漂移;宿主语言仍取 `getResolvedMainLocale()`,缺失回退英文。

## 依赖

- 服务端 registry 仓先提供 locale 元数据;本仓客户端跟进。

Contributor guide

Open the contributing guide

Research direction

Start with apps/desktop/src/main/plugin-market/service.ts and trace the list, detail, and update metadata paths. Review validateGhostManifestLocaleResource, resolveGhostManifestLocale, and getResolvedMainLocale, then wait for the registry release metadata to expose locale resources. Done means market cards and details use the host language, fall back to English, and remain consistent with installed-plugin displays.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
internationalization
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.