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:
@@ -413,4 +413,24 @@ export const ko: Record<string, string> = {
|
||||
pluginDocsPanelDesc: 'DSH 사이드바의 "전역 문서": 전역 Markdown 메모로, 어떤 작업 공간에서든 언제든 읽을 수 있습니다. 목록을 클릭해 읽기, 마우스를 올리면 개요로 이동, Chrome / VS Code에서 외부 열기, 코드 복사. 디렉터리를 설정할 수 있습니다(기본 ~/.dsh/docs)',
|
||||
pluginEgoBrowserDesc: 'DeepSeek Harness용 에이전트 브라우저: 32개의 ego_* 도구가 실제 Chromium을 구동하며, 사이드바의 네이티브 «ego 브라우저» 탭에서 에이전트가 방문하는 모든 페이지를 실시간으로 볼 수 있습니다 — 클릭, 드래그, 타이핑으로 직접 조작할 수 있습니다. better-sidebar가 있으면 탭을 자동 등록하고, 없으면 플로팅 버블로 대체합니다',
|
||||
pluginBilingualReaderDesc: 'DSH 사이드바에서 PDF 읽기: 네이티브 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