@emqx/shared-ui-i18n

中文文档
0.0.86发布于 2026/11/02Apache-2.0TypeScriptESM + CJS零依赖构建来源已验证近 30 天下载 2509

Traditional Chinese data integration resources are available through an optional subpath. They are not re-exported by the root entry, so existing consumers do not load these resources. The npm archive includes both entries.

原始使用文档

Shared UI i18n

Traditional Chinese data integration resources are available through an optional subpath. They are not re-exported by the root entry, so existing consumers do not load these resources. The npm archive includes both entries.

import {
  zhTWConnectorsLabel,
  zhTWActionsLabel,
  zhTWIntegrationDesc,
  zhTWSymbolLabel,
} from '@emqx/shared-ui-i18n/zh-TW/integration'

The first three exports use the same type/field structure as the corresponding Simplified Chinese resources; symbol labels are a flat key/value map. Register them with the application's own i18n instance. Merge connector labels first, action labels second, then application overrides. Merge description overrides after shared descriptions. Avoid mutating the exported objects when merging.

Keep Traditional Chinese keys aligned with the corresponding files in lib/zh. Preserve placeholders, code snippets and technical identifiers when translating. Application-specific wording belongs in the consuming project's overrides.

AI SQL generator resources use a separate optional entry:

import { zhTWRuleSQL } from '@emqx/shared-ui-i18n/zh-TW/ruleSQL'

Register this dictionary under the application's ruleSQL namespace, alongside enRuleSQL and zhRuleSQL from the root entry. Its keys match those dictionaries.

Built-in function resources are also optional:

import { zhTWRuleFunction } from '@emqx/shared-ui-i18n/zh-TW/ruleFunction'

app.use(FlowComponents, {
  locale: 'zh-TW',
  messages: { ruleFunction: zhTWRuleFunction },
})

Flow's messages option accepts additional common and flow dictionaries. Resources are selected by the consumer, so default component and utility imports do not include Traditional Chinese dictionaries. Missing zh-TW entries fall back to English, without implicitly using Simplified Chinese. Existing en/zh/ja consumers continue to use the built-in dictionaries.

Flow labels and validation messages have their own optional entry:

import { zhTWFlow } from '@emqx/shared-ui-i18n/zh-TW/flow'

app.use(FlowComponents, {
  locale: 'zh-TW',
  messages: { flow: zhTWFlow, ruleFunction: zhTWRuleFunction },
})

This dictionary covers all keys in zhFlow, including node status and AI connection settings. Add application-specific Flow messages separately when registering the application's own i18n instance.

版本与发布记录

@emqx/shared-ui-i18n 共发布 83 个版本,首次发布于 2023/11/08;过去 12 个月发布了 26 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.0.86latest2026/11/0211 天前
0.0.852026/10/2321 天前
0.0.842026/10/1628 天前
0.0.832026/09/141 个月前
0.0.822026/09/102 个月前
0.0.812026/09/022 个月前

关于 @emqx/shared-ui-i18n 的常见问题

@emqx/shared-ui-i18n 是什么?

Traditional Chinese data integration resources are available through an optional subpath. They are not re-exported by the root entry, so existing consumers do not load these resources. The npm archive includes both entries.

如何安装 @emqx/shared-ui-i18n?

在项目目录运行 npm install @emqx/shared-ui-i18n,或使用 pnpm add / yarn add / bun add。

@emqx/shared-ui-i18n 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@emqx/shared-ui-i18n 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@emqx/shared-ui-i18n 可以商用吗?

@emqx/shared-ui-i18n 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@emqx/shared-ui-i18n 的下载量有多少?

根据 npm 官方下载统计,@emqx/shared-ui-i18n 在 2026/10/14 – 2026/11/12 这 30 天内被下载 2,509 次,日均约 84 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@emqx/shared-ui-i18n 还在维护吗?

最新版本 0.0.86 发布于 2026/11/02(11 天前);至今共发布 83 个版本,其中过去 12 个月发布了 26 个;首次发布于 2023/11/08。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。