diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f80fd945..7f9d590f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -299,9 +299,9 @@ importers: web/plugins/com.msgbyte.miaolang: specifiers: - miao-lang: ^1.0.3 + miao-lang: ^1.0.5 dependencies: - miao-lang: registry.npmmirror.com/miao-lang/1.0.3 + miao-lang: registry.npmmirror.com/miao-lang/1.0.5 web/plugins/com.msgbyte.notify: specifiers: {} @@ -12383,10 +12383,10 @@ packages: yargs-parser: registry.npmmirror.com/yargs-parser/20.2.9 dev: true - registry.npmmirror.com/miao-lang/1.0.3: - resolution: {integrity: sha1-J2mZeI9u7itgDbZqDXKz9TvL1qs=, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/miao-lang/download/miao-lang-1.0.3.tgz} + registry.npmmirror.com/miao-lang/1.0.5: + resolution: {integrity: sha512-aXfDZJ8aXR4fnMkJyJPGWf9gH55odkYNjxPTOlN6N4MH/+2Dt8d4TvM99bjyERG/tG4XprH9Q3bBQEkwKwXrRA==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/miao-lang/download/miao-lang-1.0.5.tgz} name: miao-lang - version: 1.0.3 + version: 1.0.5 dependencies: js-base64: registry.npmmirror.com/js-base64/3.7.2 dev: false diff --git a/web/plugins/com.msgbyte.miaolang/package.json b/web/plugins/com.msgbyte.miaolang/package.json index 74dfb6ba..3e16278e 100644 --- a/web/plugins/com.msgbyte.miaolang/package.json +++ b/web/plugins/com.msgbyte.miaolang/package.json @@ -4,6 +4,6 @@ "version": "0.0.0", "private": true, "dependencies": { - "miao-lang": "^1.0.3" + "miao-lang": "^1.0.5" } } diff --git a/web/plugins/com.msgbyte.miaolang/src/miaotrans.ts b/web/plugins/com.msgbyte.miaolang/src/miaotrans.ts index 7e83ca07..35d32f30 100644 --- a/web/plugins/com.msgbyte.miaolang/src/miaotrans.ts +++ b/web/plugins/com.msgbyte.miaolang/src/miaotrans.ts @@ -1,9 +1,11 @@ import Miao from 'miao-lang'; import { Translate } from './translate'; +import { getLanguage } from '@capital/common'; export function encode(human: string): string { return Miao.encode(human, { calls: Translate.calls, + halfwidthSymbol: getLanguage() !== 'zh-CN', }); }