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:
@@ -421,4 +421,24 @@ export const tr: Record<string, string> = {
|
||||
pluginDocsPanelDesc: 'DSH kenar çubuğunda «Genel belgeler»: herhangi bir çalışma alanından kendi Markdown notlarınızı okuyun — dosya listesi, ana hat, Chrome / VS Code’da açma ve kopyalama düğmeleri; belgeler dizini yapılandırılabilir (varsayılan ~/.dsh/docs)',
|
||||
pluginEgoBrowserDesc: 'DeepSeek Harness için aracı tarayıcı: 32 ego_* aracı gerçek bir Chromium’u yönetir; kenar çubuğundaki yerel «ego tarayıcı» sekmesi aracının ziyaret ettiği her sayfayı canlı gösterir — tıklayarak, sürükleyerek ve yazarak kontrolü devralabilirsiniz. better-sidebar varsa sekme otomatik kaydedilir, yoksa yüzen baloncuğa düşer',
|
||||
pluginBilingualReaderDesc: 'DSH kenar çubuğunda PDF okuyun: yerel PDF görüntüleme, LLM ile çevirmek için metin seçin, bağlamı kullanarak ve ana sohbetten tamamen izole',
|
||||
pluginSentinelName: 'dsh-sentinel Uyandırma sistemi',
|
||||
pluginEgoBrowserName: 'ego-browser Ajan tarayıcısı',
|
||||
pluginBetterOverleafName: 'dsh-better-overleaf Overleaf sekmesi',
|
||||
pluginDocsPanelName: 'dsh-docs-panel Genel belgeler',
|
||||
pluginFlowglassName: 'dsh-flowglass Flowglass',
|
||||
pluginGitForgeName: 'dsh-git-forge Git kimlik bilgileri',
|
||||
pluginGitRemotesName: 'dsh-git-remotes Git uzak depoları',
|
||||
pluginGithubWorkbenchName: 'dsh-github-workbench GitHub çalışma tezgâhı',
|
||||
pluginSidebarQaName: 'dsh-sidebar-qa Seç ve sor',
|
||||
pluginSidenoteName: 'dsh-sidenote Yan sohbet',
|
||||
pluginServerDeckName: 'dsh-server-deck Sunucu paneli',
|
||||
pluginSuhuangScrollName: 'dsh-suhuang-scroll Suhuang Scroll',
|
||||
pluginSshTunnelName: 'dsh-ssh-tunnel SSH tüneli',
|
||||
pluginTurnReviewName: 'dsh-turn-review Tur incelemesi',
|
||||
pluginBilingualReaderName: 'dsh-bilingual-reader İki dilli okuyucu',
|
||||
pluginOfficeName: 'Office önizlemesi',
|
||||
pluginMdExportName: 'Markdown dışa aktarma',
|
||||
pluginCodeNavName: 'Kod önizleme gezgini',
|
||||
pluginVideoPreviewName: 'Video önizlemesi',
|
||||
presetDshDesktopDesc: 'Electron gelişmiş (çerçevesiz) mod: macOS üstte 20px ayırır; Windows, WCO yokken başlık çubuğu için 32px ayırır',
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user