feat(i18n): localize plugin catalog names and shell preset desc
Catalog entry names (15 tab + 4 viewer) and the dsh-desktop shell preset
desc were raw hardcoded zh strings rendered straight into the add-plugin
modals and the title-bar scheme dropdown. Mirror the existing desc
pattern exactly: PluginEntry.name / ShellPreset.desc widen to the
i18n-friendly string-or-() =>-string union, the catalogs carry lazy
t('pluginXxxName') / t('presetDshDesktopDesc') lookups, and the
add-plugin modal (render, search filter, aria-labels) plus the scheme
SelectMenu resolve them like every other copy. The plain-string arm of
the union stays as the raw-name fallback, and t() itself never yields
empty text (missing keys render the key), so a dict gap can never blank
a name.
20 new dictionary keys added to zh/en (locales.ts), ja (locales-ja.ts),
and all 18 third-language dictionaries — tests/locales.spec.ts enforces
key-set equality against zh for every shipped dict (precedent: 9cc642b),
so the 'leave other locales-* untouched' shortcut would fail the hard
parity gate; real translations are provided instead.
Spec follow-ups (behavior change: names/descs now render through t()):
- plugin-list.spec.ts: name non-empty assertion resolves the union.
- add-plugin-modal.spec.tsx: sentinel/office name assertions resolve
from the catalog (en locale in tests) instead of pinning zh literals.
- shell-presets.spec.ts: desc non-empty assertion resolves the union.
This commit is contained in:
@@ -407,4 +407,24 @@ export const de: Record<string, string> = {
|
||||
pluginDocsPanelDesc: '„Globale Dokumente“ in der DSH-Seitenleiste: eigene Markdown-Notizen aus jedem Arbeitsbereich lesen – Dateiliste, Gliederung, Öffnen in Chrome / VS Code und Kopieren-Buttons; das Dokumentenverzeichnis ist konfigurierbar (Standard ~/.dsh/docs)',
|
||||
pluginEgoBrowserDesc: 'Der Agent-Browser für DeepSeek Harness: 32 ego_*-Tools steuern ein echtes Chromium; ein nativer „ego-Browser“-Tab in der Seitenleiste zeigt live jede Seite, die der Agent besucht – Klicken, Ziehen und Tippen zum Übernehmen. Registriert den Tab automatisch, wenn better-sidebar vorhanden ist, sonst eine schwebende Blase',
|
||||
pluginBilingualReaderDesc: 'PDFs im DSH-Seitenbereich lesen: native PDF-Anzeige, Text auswählen und mit dem LLM übersetzen — mit Kontext, vollständig vom Hauptgespräch isoliert',
|
||||
pluginSentinelName: 'dsh-sentinel Wecksystem',
|
||||
pluginEgoBrowserName: 'ego-browser Agent-Browser',
|
||||
pluginBetterOverleafName: 'dsh-better-overleaf Overleaf-Tab',
|
||||
pluginDocsPanelName: 'dsh-docs-panel Globale Dokumente',
|
||||
pluginFlowglassName: 'dsh-flowglass Flowglass',
|
||||
pluginGitForgeName: 'dsh-git-forge Git-Zugangsdaten',
|
||||
pluginGitRemotesName: 'dsh-git-remotes Git-Remotes',
|
||||
pluginGithubWorkbenchName: 'dsh-github-workbench GitHub-Workbench',
|
||||
pluginSidebarQaName: 'dsh-sidebar-qa Auswählen & Fragen',
|
||||
pluginSidenoteName: 'dsh-sidenote Seiten-Chat',
|
||||
pluginServerDeckName: 'dsh-server-deck Server-Deck',
|
||||
pluginSuhuangScrollName: 'dsh-suhuang-scroll Suhuang Scroll',
|
||||
pluginSshTunnelName: 'dsh-ssh-tunnel SSH-Tunnel',
|
||||
pluginTurnReviewName: 'dsh-turn-review Runden-Review',
|
||||
pluginBilingualReaderName: 'dsh-bilingual-reader Zweisprachiger Reader',
|
||||
pluginOfficeName: 'Office-Vorschau',
|
||||
pluginMdExportName: 'Markdown-Export',
|
||||
pluginCodeNavName: 'Code-Vorschau-Navigation',
|
||||
pluginVideoPreviewName: 'Video-Vorschau',
|
||||
presetDshDesktopDesc: 'Elektronischer Erweiterte-Modus (rahmenlos): macOS reserviert oben 20px; Windows reserviert ohne WCO 32px für die Titelleiste',
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user