{"versions":{"0.1.0":{"name":"@huanlin/dsh-plugin-better-locale","version":"0.1.0","publishConfig":{"access":"public"},"keywords":["dsh-plugin"],"description":"DSH web 插件：通过运行时 monkey-patch LocaleRuntime.lookup 注入第三语言（ja/ko/...）覆盖，保持 dsh active locale 不变；通过 DSH 设置页（通用分区）暴露切换 UI。 | DSH web plugin: injects third-language (ja/ko/...) overrides via a runtime monkey-patch of LocaleRuntime.lookup, leaving the dsh acti","type":"module","license":"AGPL-3.0","main":"./lib/index.js","types":"./lib/types/index.d.ts","exports":{".":{"types":"./lib/types/index.d.ts","import":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","import":"./lib/invariant.js"},"./client":{"types":"./lib/types/client/index.d.ts","default":"./lib/client.js"},"./src/*":"./src/*","./package.json":"./package.json"},"dsh":{"bundle":{"patch":"./cordis.patch.yml"},"client":{"inject":["@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-locale","@deepseek-ai/dsh-client-ui-primitives","@deepseek-ai/dsh-client-ui-settings","@deepseek-ai/dsh-client-ui-slots"],"platform":"web"}},"peerDependencies":{"@deepseek-ai/cordis":"^4.0.1-rc.1","@deepseek-ai/dsh-client-locale":"^0.1.0-rc.8","@deepseek-ai/dsh-client-runtime":"^0.1.0-rc.8","@deepseek-ai/dsh-client-ui-primitives":"^0.1.0-rc.8","@deepseek-ai/dsh-client-ui-settings":"^0.1.0-rc.8","@deepseek-ai/dsh-client-ui-slots":"^0.1.0-rc.8","@deepseek-ai/dsh-invariants":"^0.1.0-rc.8","react":"^18.2.0","react-dom":"^18.2.0"},"peerDependenciesMeta":{"@deepseek-ai/dsh-client-locale":{"optional":true},"@deepseek-ai/dsh-client-runtime":{"optional":true},"@deepseek-ai/dsh-client-ui-primitives":{"optional":true},"@deepseek-ai/dsh-client-ui-settings":{"optional":true},"@deepseek-ai/dsh-client-ui-slots":{"optional":true},"@deepseek-ai/dsh-invariants":{"optional":true},"react":{"optional":true},"react-dom":{"optional":true}},"devDependencies":{"@deepseek-ai/dsh-client-locale":"0.1.1-rc.1","@deepseek-ai/dsh-client-runtime":"0.1.1-rc.1","@deepseek-ai/dsh-client-ui-primitives":"0.1.1-rc.1","@deepseek-ai/dsh-client-ui-settings":"0.1.1-rc.1","@deepseek-ai/dsh-client-ui-slots":"0.1.1-rc.1","@deepseek-ai/dsh-invariants":"0.1.1-rc.1","@types/node":"^22.20.1","@types/react":"~18.3.31","@types/react-dom":"~18.3.0","jsdom":"^25.0.1","react":"^18.2.0","react-dom":"^18.2.0","tsdown":"^0.15.0","typescript":"^5.9.2","vitest":"^3.2.7"},"engines":{"node":">=22.0.0"},"scripts":{"typecheck":"tsc --noEmit -p tsconfig.json","test":"vitest run","build":"tsdown -c tsdown.config.ts && tsc -p tsconfig.json","bundle:client":"tsdown -c tsdown.config.ts"},"_nodeVersion":"24.17.0","_id":"@huanlin/dsh-plugin-better-locale@0.1.0","dist":{"integrity":"sha512-fGXDgVq1R3gVTi2M9TMn2x5ROqiaYkhEsFJqYF5xiVUFfs9KjwIpOF0ZbhUyK6vFBOeYP4uetc/ZVknQb38WrQ==","shasum":"4e552382f02318a15bc148ec35a4b554dcc88478","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@huanlin/dsh-plugin-better-locale/-/dsh-plugin-better-locale-0.1.0.tgz","fileCount":62,"unpackedSize":2927173,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIC58lrTxyloadM8REoMAx8eXgsGkOfiLhc5cexWeeOjzAiAI440tlQAbkLHEI0Lxdrt/YwD43Wz2wbN1AVF6/7Upqg=="}],"size":737465},"_npmUser":{"name":"anonymous","email":"linsmc@126.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"linsmc@126.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/dsh-plugin-better-locale_0.1.0_1787468023718_0.1183210483012811"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-08-23T06:53:43.896Z","publish_time":1787468023896,"_source_registry_name":"default","contributors":[]},"0.3.0":{"name":"@huanlin/dsh-plugin-better-locale","version":"0.3.0","publishConfig":{"access":"public"},"keywords":["dsh-plugin"],"description":"DSH web 插件：通过 DSH v0.1.2-alpha.1 原生第三方语言 API（locale.addLanguage + register(ns, locale, dict)）注册 19 种内置语言字典（ja/ko/fr/...），语言直接出现在 DSH 设置页原生 Language 行中切换，未覆盖文案按 fallback 链回退英文。 | DSH web plugin: registers 19 bundled third-language dictionaries (ja/ko/fr/..","type":"module","license":"AGPL-3.0","main":"./lib/index.js","types":"./lib/types/index.d.ts","exports":{".":{"types":"./lib/types/index.d.ts","import":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","import":"./lib/invariant.js"},"./client":{"types":"./lib/types/client/index.d.ts","default":"./lib/client.js"},"./src/*":"./src/*","./package.json":"./package.json"},"dsh":{"bundle":{"patch":"./cordis.patch.yml"},"client":{"inject":["@deepseek-ai/dsh-client-locale"],"platform":"web"}},"scripts":{"typecheck":"tsc --noEmit -p tsconfig.json && node scripts/check-upstream-merges.mjs","test":"vitest run","build":"tsdown -c tsdown.config.ts && tsc -p tsconfig.json","bundle:client":"tsdown -c tsdown.config.ts","gen:translations":"node scripts/generate-translation-md.mjs"},"peerDependencies":{"@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-client-locale":"^0.1.2-alpha.1","@deepseek-ai/dsh-invariants":"^0.1.2-alpha.1"},"peerDependenciesMeta":{"@deepseek-ai/cordis":{"optional":true},"@deepseek-ai/dsh-client-locale":{"optional":true},"@deepseek-ai/dsh-invariants":{"optional":true}},"devDependencies":{"@types/node":"^22.20.1","tsdown":"^0.15.0","typescript":"^5.9.2","vitest":"^3.2.7"},"engines":{"node":">=22.0.0"},"gitHead":"a66e457d804bc4e21f96090331769e16ca0dcc50","_id":"@huanlin/dsh-plugin-better-locale@0.3.0","_nodeVersion":"24.17.0","_npmVersion":"11.13.0","dist":{"integrity":"sha512-RpZVteQeFyNsPviGSrba/G+gdy/3fBrJdLh2BLgsBGP45EtBH1t6OiWOjawDtMjT9EtYdODiAo5Z83nfpFKTRA==","shasum":"6986dc72e5ac99cae277fb27701960abed8bcab6","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@huanlin/dsh-plugin-better-locale/-/dsh-plugin-better-locale-0.3.0.tgz","fileCount":57,"unpackedSize":4459902,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQC9KiJ92YrA2ZhAasCaJ+Pbx8NjfXd8+CxZsJsSEN/iogIgAkbDw6Mdg1gbPvTL6GdvIrFEHRvmrmzqBUNhya8UP04="}],"size":960750},"_npmUser":{"name":"anonymous","email":"linsmc@126.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"linsmc@126.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/dsh-plugin-better-locale_0.3.0_1787908576753_0.26566181647233766"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-08-28T09:16:16.923Z","publish_time":1787908576923,"_source_registry_name":"default","contributors":[]},"0.3.1":{"_id":"@huanlin/dsh-plugin-better-locale@0.3.1","dsh":{"bundle":{"patch":"./cordis.patch.yml"},"client":{"inject":["@deepseek-ai/dsh-client-locale"],"platform":"web"}},"dist":{"shasum":"32670f6388b4ada47f0b4aee2bed090e4a5e483f","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@huanlin/dsh-plugin-better-locale/-/dsh-plugin-better-locale-0.3.1.tgz","fileCount":54,"integrity":"sha512-hUdM264fkUSEOaowqIBryPQJkVi3kslJhTm5wuurI6ZXsJHgw7GhCPwBC/ZK3f9v008yvT85uT2Rv0Yf19GE/g==","signatures":[{"sig":"MEYCIQCcLKBKik+FusmowU8g7IqmThcCpcaUxcAm0ZYnZMKFMQIhAJjJvSrrzIOKEExSjlzpvhWHipwCar6ENa3es7GdMc3d","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDgTi8zxjVhFuAFgl0BGC3MNtCax941q013lHRodvA0oQIhAOBcaMRKr44vFlTLNaS/Xczl0gP8AJP5hsjoJD5UnWcB"}],"unpackedSize":4955064,"size":1092895},"main":"./lib/index.js","name":"@huanlin/dsh-plugin-better-locale","type":"module","types":"./lib/types/index.d.ts","engines":{"node":">=22.0.0"},"exports":{".":{"types":"./lib/types/index.d.ts","import":"./lib/index.js"},"./src/*":"./src/*","./client":{"types":"./lib/types/client/index.d.ts","default":"./lib/client.js"},"./package.json":"./package.json"},"license":"AGPL-3.0","scripts":{"test":"vitest run","build":"tsdown -c tsdown.config.ts && tsc -p tsconfig.json","typecheck":"tsc --noEmit -p tsconfig.json && node scripts/check-upstream-merges.mjs","bundle:client":"tsdown -c tsdown.config.ts","gen:translations":"node scripts/generate-translation-md.mjs"},"version":"0.3.1","_npmUser":{"name":"anonymous","email":"linsmc@126.com"},"keywords":["dsh-plugin"],"description":"DSH web 插件：通过 DSH v0.1.2-alpha.1 原生第三方语言 API（locale.addLanguage + register(ns, locale, dict)）注册 19 种内置语言字典（ja/ko/fr/...），语言直接出现在 DSH 设置页原生 Language 行中切换，未覆盖文案按 fallback 链回退英文。 | DSH web plugin: registers 19 bundled third-language dictionaries (ja/ko/fr/..","directories":{},"maintainers":[{"name":"anonymous","email":"linsmc@126.com"}],"_nodeVersion":"24.17.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsdown":"^0.15.0","vitest":"^3.2.7","typescript":"^5.9.2","@types/node":"^22.20.1"},"peerDependencies":{"@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-client-locale":"^0.1.2-rc.1"},"peerDependenciesMeta":{"@deepseek-ai/cordis":{"optional":true},"@deepseek-ai/dsh-client-locale":{"optional":true}},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/dsh-plugin-better-locale_0.3.1_1788521673389_0.9983391146473348"},"_cnpmcore_publish_time":"2026-09-04T11:34:33.509Z","publish_time":1788521673509,"_source_registry_name":"default","contributors":[]},"0.4.1":{"_id":"@huanlin/dsh-plugin-better-locale@0.4.1","dsh":{"bundle":{"patch":"./cordis.patch.yml"},"client":{"inject":["@deepseek-ai/dsh-client-locale"],"platform":"web"}},"dist":{"shasum":"27909f844d6274388ab65158da047cd76eaf03e2","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@huanlin/dsh-plugin-better-locale/-/dsh-plugin-better-locale-0.4.1.tgz","fileCount":54,"integrity":"sha512-QObbFu31Zs3zE56naByc3UEd24CK8SB+DfZGiMjw0bFM3/k5D+mQ9D+sOQGu5NoPiqcIkV0YZder4WG1QWOeAA==","signatures":[{"sig":"MEUCIEghaEdK3ccMBdDs9/DuIk/OQizpMww89pnz8Ra8ZhvvAiEAuOh+QxqdESPCendC2gPs9FcNO7BZ6k5p438eAOEIjdQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIHsSK3w5WvvNxVYahGeiyWpx5YWNEiZAe6CTmKeg2YUHAiBaITLCk50CDI0k1Yq/wV+ga+BcsVj9852jXGBnqP4uuQ=="}],"unpackedSize":6352217,"size":1404033},"main":"./lib/index.js","name":"@huanlin/dsh-plugin-better-locale","type":"module","types":"./lib/types/index.d.ts","engines":{"node":">=22.0.0"},"exports":{".":{"types":"./lib/types/index.d.ts","import":"./lib/index.js"},"./src/*":"./src/*","./client":{"types":"./lib/types/client/index.d.ts","default":"./lib/client.js"},"./package.json":"./package.json"},"license":"AGPL-3.0","scripts":{"test":"vitest run","build":"tsdown -c tsdown.config.ts && tsc -p tsconfig.json","typecheck":"tsc --noEmit -p tsconfig.json && node scripts/check-upstream-merges.mjs","bundle:client":"tsdown -c tsdown.config.ts","gen:translations":"node scripts/generate-translation-md.mjs"},"version":"0.4.1","_npmUser":{"name":"anonymous","email":"linsmc@126.com"},"keywords":["dsh-plugin"],"description":"DSH web 插件：通过 DSH v0.1.5-rc.1 原生第三方语言 API（locale.addLanguage + register(ns, locale, dict)）注册 19 种内置语言字典（ja/ko/fr/...），语言直接出现在 DSH 设置页原生 Language 行中切换，未覆盖文案按 fallback 链回退英文。 | DSH web plugin: registers 19 bundled third-language dictionaries (ja/ko/fr/...) ","directories":{},"maintainers":[{"name":"anonymous","email":"linsmc@126.com"}],"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsdown":"^0.15.0","vitest":"^3.2.7","typescript":"^5.9.2","@types/node":"^22.20.1"},"peerDependencies":{"@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-client-locale":"^0.1.5-rc.1"},"peerDependenciesMeta":{"@deepseek-ai/cordis":{"optional":true},"@deepseek-ai/dsh-client-locale":{"optional":true}},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/dsh-plugin-better-locale_0.4.1_1789051999653_0.08037677755916128"},"_cnpmcore_publish_time":"2026-09-10T14:53:19.772Z","publish_time":1789051999772,"_source_registry_name":"default","contributors":[]},"0.4.2":{"_id":"@huanlin/dsh-plugin-better-locale@0.4.2","dsh":{"bundle":{"patch":"./cordis.patch.yml"},"client":{"inject":["@deepseek-ai/dsh-client-locale"],"platform":"web"}},"dist":{"shasum":"33aaeadb4327a26711fd7df874c351b90694a036","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@huanlin/dsh-plugin-better-locale/-/dsh-plugin-better-locale-0.4.2.tgz","fileCount":54,"integrity":"sha512-KlgKDWudQ4h4NBLsVHAMxgNySuB8LDv3vnBZ6XHAo4Imyt7sONlCr2vJvjAnADpbJP13LnibNmIbmfZAYaOYnQ==","signatures":[{"sig":"MEUCIQDkOpI88aOkZpQnyHucjlwRXdv8iXEgwJuA3LeC9dZHEAIgff8Akj4S+4MXBiMCnY6ggJfqTZ4H8lgYn/TuU86mu2c=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQC7DY1YdVAgfgiVZDLA3yWP+KSvZ42AYtwIFt+71KyNXQIgJrt3bXhwBQ0RtshVB9DoZc31I9Y7D2cmgBc6cEYvfHs="}],"unpackedSize":6403832,"size":1420397},"main":"./lib/index.js","name":"@huanlin/dsh-plugin-better-locale","type":"module","types":"./lib/types/index.d.ts","engines":{"node":">=22.0.0"},"exports":{".":{"types":"./lib/types/index.d.ts","import":"./lib/index.js"},"./src/*":"./src/*","./client":{"types":"./lib/types/client/index.d.ts","default":"./lib/client.js"},"./package.json":"./package.json"},"license":"AGPL-3.0","scripts":{"test":"vitest run","build":"tsdown -c tsdown.config.ts && tsc -p tsconfig.json","typecheck":"tsc --noEmit -p tsconfig.json && node scripts/check-upstream-merges.mjs","bundle:client":"tsdown -c tsdown.config.ts","gen:translations":"node scripts/generate-translation-md.mjs"},"version":"0.4.2","_npmUser":{"name":"anonymous","email":"linsmc@126.com"},"keywords":["dsh-plugin"],"description":"DSH web 插件：通过 DSH v0.1.5-rc.1 原生第三方语言 API（locale.addLanguage + register(ns, locale, dict)）注册 19 种内置语言字典（ja/ko/fr/...），语言直接出现在 DSH 设置页原生 Language 行中切换，未覆盖文案按 fallback 链回退英文。 | DSH web plugin: registers 19 bundled third-language dictionaries (ja/ko/fr/...) ","directories":{},"maintainers":[{"name":"anonymous","email":"linsmc@126.com"}],"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsdown":"^0.15.0","vitest":"^3.2.7","typescript":"^5.9.2","@types/node":"^22.20.1"},"peerDependencies":{"@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-client-locale":"^0.1.5-rc.2"},"peerDependenciesMeta":{"@deepseek-ai/cordis":{"optional":true},"@deepseek-ai/dsh-client-locale":{"optional":true}},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/dsh-plugin-better-locale_0.4.2_1789122490906_0.023215861890177214"},"_cnpmcore_publish_time":"2026-09-11T10:28:11.070Z","publish_time":1789122491070,"_source_registry_name":"default","contributors":[]},"0.4.3":{"_id":"@huanlin/dsh-plugin-better-locale@0.4.3","dsh":{"bundle":{"patch":"./cordis.patch.yml"},"client":{"inject":["@deepseek-ai/dsh-client-locale"],"platform":"web"}},"dist":{"shasum":"40e58d08b46ed0cf5ac9ec5dbae4792341ef054c","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@huanlin/dsh-plugin-better-locale/-/dsh-plugin-better-locale-0.4.3.tgz","fileCount":54,"integrity":"sha512-V31RU4DzrY17XMooHmOH5kz/LcOwB3v3rtvU88jOthIoW7CTEfOkeDvH074p5bt64ZATIq9OKNz6ORLSWO1jDg==","signatures":[{"sig":"MEUCIQC+xZChpcsMmZRWQPoMXEigMVTt+0CL67sw3RQe5iA+XgIgLx3yhzuDVcnxiS3qp+3qi2423YWjrLeB3+gSnpTf/60=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQD1d1IAg9BVrBt7B7H0Rxm4Ik/f8qDRR6h65aKFvj3cvwIgG0uKfwScTOQkC7HeSKFQLXba9UICcBbK9dR8yvenG1k="}],"unpackedSize":6403832,"size":1420397},"main":"./lib/index.js","name":"@huanlin/dsh-plugin-better-locale","type":"module","types":"./lib/types/index.d.ts","engines":{"node":">=22.0.0"},"exports":{".":{"types":"./lib/types/index.d.ts","import":"./lib/index.js"},"./src/*":"./src/*","./client":{"types":"./lib/types/client/index.d.ts","default":"./lib/client.js"},"./package.json":"./package.json"},"license":"AGPL-3.0","scripts":{"test":"vitest run","build":"tsdown -c tsdown.config.ts && tsc -p tsconfig.json","typecheck":"tsc --noEmit -p tsconfig.json && node scripts/check-upstream-merges.mjs","bundle:client":"tsdown -c tsdown.config.ts","gen:translations":"node scripts/generate-translation-md.mjs"},"version":"0.4.3","_npmUser":{"name":"anonymous","email":"linsmc@126.com"},"keywords":["dsh-plugin"],"description":"DSH web 插件：通过 DSH v0.1.5-rc.1 原生第三方语言 API（locale.addLanguage + register(ns, locale, dict)）注册 19 种内置语言字典（ja/ko/fr/...），语言直接出现在 DSH 设置页原生 Language 行中切换，未覆盖文案按 fallback 链回退英文。 | DSH web plugin: registers 19 bundled third-language dictionaries (ja/ko/fr/...) ","directories":{},"maintainers":[{"name":"anonymous","email":"linsmc@126.com"}],"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsdown":"^0.15.0","vitest":"^3.2.7","typescript":"^5.9.2","@types/node":"^22.20.1"},"peerDependencies":{"@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-client-locale":"^0.1.5-rc.2"},"peerDependenciesMeta":{"@deepseek-ai/cordis":{"optional":true},"@deepseek-ai/dsh-client-locale":{"optional":true}},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/dsh-plugin-better-locale_0.4.3_1789122505487_0.08935712893984582"},"_cnpmcore_publish_time":"2026-09-11T10:28:25.619Z","publish_time":1789122505619,"_source_registry_name":"default","contributors":[]}},"dist-tags":{"latest":"0.4.3"},"name":"@huanlin/dsh-plugin-better-locale","time":{"created":"2026-08-23T15:59:00.780Z","modified":"2026-09-11T10:28:38.241Z","0.1.0":"2026-08-23T06:53:43.896Z","0.3.0":"2026-08-28T09:16:16.923Z","0.3.1":"2026-09-04T11:34:33.509Z","0.4.1":"2026-09-10T14:53:19.772Z","0.4.2":"2026-09-11T10:28:11.070Z","0.4.3":"2026-09-11T10:28:25.619Z"},"readme":"<p align=\"center\">\r\n  <a href=\"https://dshfind.com/zh/plugins/huanlinoto/dsh-plugin-better-locale\"><img src=\"https://dshfind.com/api/card/huanlinoto/dsh-plugin-better-locale?lang=zh\" alt=\"dsh-plugin-better-locale card\"></a>\r\n</p>\r\n\r\n# dsh-plugin-better-locale\r\n\r\n[中文](README.zh-CN.md) | **English**\r\n\r\nA DSH web plugin that ships bundled third-language dictionaries (Japanese / Korean / French / German / ... — 19 languages) for DSH's own built-in UI namespaces, plus a compile-time **drift engine** that keeps the dictionaries tracking every DSH release. Languages are registered through DSH v0.1.2-alpha.1's native language-pack API (`locale.addLanguage` + `locale.register(ns, locale, dict)`), so they appear directly in DSH's own Language settings row; uncovered copy falls back along DSH's per-key fallback chain.\r\n\r\n| | |\r\n|---|---|\r\n| **Package** | `@huanlin/dsh-plugin-better-locale` |\r\n| **Repo** | `huanlinoto/dsh-plugin-better-locale` |\r\n| **Requires** | DSH `dsh-v0.1.5-rc.1` or newer |\r\n| **License** | AGPL-3.0 |\r\n\r\n## Invariants\r\n\r\nThis package publishes **no `./invariant` export**. Per the DSH invariant rules effective since v0.1.2-rc.1, an invariant is only published when independent observations can diverge; here every language contribution (catalog entry + namespace dictionaries) is registered through `ctx.effect`, so fiber disposal / HMR removes exactly what was added (covered by `tests/apply.spec.ts`), and the plugin holds no mutable state of its own — the empty invariant companion was therefore removed.\r\n\r\n## Supported languages\r\n\r\n| Language | id | Label |\r\n|---|---|---|\r\n| Japanese | `ja` | 日本語 |\r\n| Korean | `ko` | 한국어 |\r\n| French | `fr` | Français |\r\n| German | `de` | Deutsch |\r\n| Portuguese | `pt` | Português |\r\n| Arabic | `ar` | العربية |\r\n| Hindi | `hi` | हिन्दी |\r\n| Indonesian | `id` | Bahasa Indonesia |\r\n| Turkish | `tr` | Türkçe |\r\n| Vietnamese | `vi` | Tiếng Việt |\r\n| Thai | `th` | ไทย |\r\n| Russian | `ru` | Русский |\r\n| Italian | `it` | Italiano |\r\n| Dutch | `nl` | Nederlands |\r\n| Swedish | `sv` | Svenska |\r\n| Polish | `pl` | Polski |\r\n| Traditional Chinese (HK) | `zh-HK` | 繁體中文（香港） |\r\n| Traditional Chinese (TW) | `zh-TW` | 繁體中文（台灣） |\r\n| Traditional Chinese (MO) | `zh-MO` | 繁體中文（澳門） |\r\n\r\n## Install\r\n\r\n```sh\r\n# npm registry\r\ndsh plugin --profile web add \"@huanlin/dsh-plugin-better-locale\"\r\n\r\n# or github ref\r\ndsh plugin --profile web add \"github:huanlinoto/dsh-plugin-better-locale\"\r\n```\r\n\r\nAfter install, restart `dsh web` and hard-refresh the browser (`Ctrl+Shift+R`).\r\n\r\n## Usage\r\n\r\nOpen **Settings → General → Language**: every bundled language is listed alongside DSH's built-in 中文 / English. Pick one and the whole UI switches immediately — the selection persists in DSH's durable `locale.preference` setting (survives browsers and devices sharing the same DSH home), and `<html lang>` follows.\r\n\r\nUncovered namespaces / keys fall back through DSH's per-key fallback chain (selected language → declared fallback → `en`; the Traditional Chinese variants declare `zh`, so their gaps show Simplified Chinese rather than English). Coverage table: `TRANSLATION.md` (regenerate with `pnpm run gen:translations`).\r\n\r\n## Coverage & scope\r\n\r\n- **DSH itself only:** the dictionaries translate DSH's built-in namespaces (`common` / `settings.locale` / `command` / ... — every namespace merged into DSH's `LocaleNamespaceMap`, 39 namespaces / 1233 keys × 19 languages at current coverage). The scope is **machine-locked at compile time**: `pnpm typecheck` fails if the dictionaries miss an upstream namespace/key (drift) or carry one upstream does not own (trespass).\r\n- **The drift engine:** after upgrading the DSH checkout, run `pnpm typecheck` — red means upstream added or renamed copy; translate until green. `scripts/check-upstream-merges.mjs` (part of the same command) fails when a new upstream merge module is not yet imported by the assertion file, so new namespaces can never slip in unnoticed.\r\n- **Third-party plugins are out of scope by design:** a plugin's own namespaces belong to that plugin. Unmigrated plugins coexist with zero errors (their copy falls back to English); migration is a few lines of native API — see the [Developer Guide](docs/developer-guide/README.md).\r\n\r\n## Migration from 0.1.x (v0.1.2-alpha.1 adaptation)\r\n\r\n0.1.x injected third languages by monkey-patching `LocaleRuntime.prototype.lookup` and borrowing DSH's English slot (selection in a custom settings row, persisted to localStorage, English-only activation). DSH v0.1.2-alpha.1 made all of that native, and the plugin dropped the hack:\r\n\r\n- the custom \"Language override\" settings row is gone — use DSH's native Language row;\r\n- persistence moved from browser localStorage to DSH's `locale.preference` setting;\r\n- the override now works with any DSH active locale (no \"switch to English first\" step);\r\n- the `ctx.betterLocale` service was removed — register plugin dictionaries through `ctx.locale` directly.\r\n\r\n## Known limitations\r\n\r\n- **Coverage is a process, not a promise:** the dictionaries track the upstream merge table exactly at each release of this plugin (currently 39 namespaces / 1233 keys × 19 languages); between a DSH upgrade and a better-locale update, new upstream copy falls back along the fallback chain. Run `pnpm typecheck` in the repo to see any gap.\r\n- **Traditional Chinese variants fall back to Simplified Chinese:** `zh-HK` / `zh-TW` / `zh-MO` declare `fallback: 'zh'` — missing keys show the Simplified dictionary (chain `zh-TW` → `zh` → `en`), not English.\r\n- **Third-party plugin copy is not translated here:** those namespaces belong to their plugins (see the Developer Guide); expect English for unmigrated plugins while a third language is active.\r\n- **Web only:** the client bundle targets the browser; it does not run in Node.\r\n\r\n## License\r\n\r\nAGPL-3.0","users":{}}