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:
1 parent
9e1a034527
commit
fa301da29e
29 files changed
+510
-57
No files matched your search
@@ -419,4 +419,24 @@ export const ru: Record<string, string> = {
|
||||
pluginDocsPanelDesc: '«Глобальные документы» в боковой панели DSH: глобальные Markdown-заметки, доступные из любой рабочей области — список для чтения, навигация по плавающему оглавлению, открытие в Chrome / VS Code, копирование кода; каталог настраивается (по умолчанию ~/.dsh/docs)',
|
||||
pluginEgoBrowserDesc: 'Браузер агента для DeepSeek Harness: 32 инструмента ego_* управляют настоящим Chromium; встроенная вкладка «ego browser» в боковой панели показывает в реальном времени каждую страницу, которую посещает агент — кликайте, перетаскивайте и вводите текст, чтобы перехватить управление. Вкладка регистрируется автоматически при наличии better-sidebar, иначе используется плавающий пузырёк',
|
||||
pluginBilingualReaderDesc: 'Читайте PDF в боковой панели DSH: нативный просмотр PDF, выделите текст для перевода с помощью LLM, используя контекст и полностью изолированно от основного разговора',
|
||||
pluginSentinelName: 'dsh-sentinel Система пробуждения',
|
||||
pluginEgoBrowserName: 'ego-browser Браузер агента',
|
||||
pluginBetterOverleafName: 'dsh-better-overleaf Вкладка Overleaf',
|
||||
pluginDocsPanelName: 'dsh-docs-panel Глобальные документы',
|
||||
pluginFlowglassName: 'dsh-flowglass Flowglass',
|
||||
pluginGitForgeName: 'dsh-git-forge Учётные данные Git',
|
||||
pluginGitRemotesName: 'dsh-git-remotes Удалённые репозитории Git',
|
||||
pluginGithubWorkbenchName: 'dsh-github-workbench Рабочая среда GitHub',
|
||||
pluginSidebarQaName: 'dsh-sidebar-qa Выделить и спросить',
|
||||
pluginSidenoteName: 'dsh-sidenote Боковой чат',
|
||||
pluginServerDeckName: 'dsh-server-deck Панель серверов',
|
||||
pluginSuhuangScrollName: 'dsh-suhuang-scroll Suhuang Scroll',
|
||||
pluginSshTunnelName: 'dsh-ssh-tunnel SSH-туннель',
|
||||
pluginTurnReviewName: 'dsh-turn-review Ревью раунда',
|
||||
pluginBilingualReaderName: 'dsh-bilingual-reader Двуязычный ридер',
|
||||
pluginOfficeName: 'Предпросмотр Office',
|
||||
pluginMdExportName: 'Экспорт Markdown',
|
||||
pluginCodeNavName: 'Навигатор предпросмотра кода',
|
||||
pluginVideoPreviewName: 'Предпросмотр видео',
|
||||
presetDshDesktopDesc: 'Расширенный режим Electron (без рамки): macOS резервирует 20px сверху; Windows без WCO резервирует 32px под строку заголовка',
|
||||
}
|
||||
Reference in new issue
Block a user