@emqx/shared-ui-i18n 0.0.84 → 0.0.86
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +65 -0
- package/dist/en/flow.d.ts +32 -0
- package/dist/index.js +102 -2
- package/dist/index.umd.cjs +4 -4
- package/dist/ja/flow.d.ts +32 -0
- package/dist/zh/flow.d.ts +32 -0
- package/dist/zh-TW/actionsLabel.d.ts +1 -0
- package/dist/zh-TW/connectorsLabel.d.ts +1 -0
- package/dist/zh-TW/flow.cjs +1 -0
- package/dist/zh-TW/flow.d.ts +85 -0
- package/dist/zh-TW/flow.js +88 -0
- package/dist/zh-TW/integration.cjs +32 -0
- package/dist/zh-TW/integration.d.ts +4 -0
- package/dist/zh-TW/integration.js +1268 -0
- package/dist/zh-TW/integrationDesc.d.ts +1 -0
- package/dist/zh-TW/ruleFunction.cjs +1 -0
- package/dist/zh-TW/ruleFunction.d.ts +69 -0
- package/dist/zh-TW/ruleFunction.js +72 -0
- package/dist/zh-TW/ruleSQL.cjs +1 -0
- package/dist/zh-TW/ruleSQL.d.ts +16 -0
- package/dist/zh-TW/ruleSQL.js +19 -0
- package/dist/zh-TW/symbolLabel.d.ts +1 -0
- package/package.json +22 -2
package/README.md
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Shared UI i18n
|
|
2
|
+
|
|
3
|
+
Traditional Chinese data integration resources are available through an optional
|
|
4
|
+
subpath. They are not re-exported by the root entry, so existing consumers do not
|
|
5
|
+
load these resources. The npm archive includes both entries.
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import {
|
|
9
|
+
zhTWConnectorsLabel,
|
|
10
|
+
zhTWActionsLabel,
|
|
11
|
+
zhTWIntegrationDesc,
|
|
12
|
+
zhTWSymbolLabel,
|
|
13
|
+
} from '@emqx/shared-ui-i18n/zh-TW/integration'
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
The first three exports use the same type/field structure as the corresponding
|
|
17
|
+
Simplified Chinese resources; symbol labels are a flat key/value map. Register
|
|
18
|
+
them with the application's own i18n instance. Merge connector labels first,
|
|
19
|
+
action labels second, then application overrides. Merge description overrides
|
|
20
|
+
after shared descriptions. Avoid mutating the exported objects when merging.
|
|
21
|
+
|
|
22
|
+
Keep Traditional Chinese keys aligned with the corresponding files in lib/zh.
|
|
23
|
+
Preserve placeholders, code snippets and technical identifiers when translating.
|
|
24
|
+
Application-specific wording belongs in the consuming project's overrides.
|
|
25
|
+
|
|
26
|
+
AI SQL generator resources use a separate optional entry:
|
|
27
|
+
|
|
28
|
+
```ts
|
|
29
|
+
import { zhTWRuleSQL } from '@emqx/shared-ui-i18n/zh-TW/ruleSQL'
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Register this dictionary under the application's ruleSQL namespace, alongside
|
|
33
|
+
enRuleSQL and zhRuleSQL from the root entry. Its keys match those dictionaries.
|
|
34
|
+
|
|
35
|
+
Built-in function resources are also optional:
|
|
36
|
+
|
|
37
|
+
```ts
|
|
38
|
+
import { zhTWRuleFunction } from '@emqx/shared-ui-i18n/zh-TW/ruleFunction'
|
|
39
|
+
|
|
40
|
+
app.use(FlowComponents, {
|
|
41
|
+
locale: 'zh-TW',
|
|
42
|
+
messages: { ruleFunction: zhTWRuleFunction },
|
|
43
|
+
})
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Flow's messages option accepts additional common and flow dictionaries. Resources
|
|
47
|
+
are selected by the consumer, so default component and utility imports do not
|
|
48
|
+
include Traditional Chinese dictionaries. Missing zh-TW entries fall back to
|
|
49
|
+
English, without implicitly using Simplified Chinese. Existing en/zh/ja consumers
|
|
50
|
+
continue to use the built-in dictionaries.
|
|
51
|
+
|
|
52
|
+
Flow labels and validation messages have their own optional entry:
|
|
53
|
+
|
|
54
|
+
```ts
|
|
55
|
+
import { zhTWFlow } from '@emqx/shared-ui-i18n/zh-TW/flow'
|
|
56
|
+
|
|
57
|
+
app.use(FlowComponents, {
|
|
58
|
+
locale: 'zh-TW',
|
|
59
|
+
messages: { flow: zhTWFlow, ruleFunction: zhTWRuleFunction },
|
|
60
|
+
})
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
This dictionary covers all keys in zhFlow, including node status and AI connection
|
|
64
|
+
settings. Add application-specific Flow messages separately when registering the
|
|
65
|
+
application's own i18n instance.
|
package/dist/en/flow.d.ts
CHANGED
|
@@ -31,8 +31,39 @@ export declare const enFlow: {
|
|
|
31
31
|
incorrectInputOutputConnection: string;
|
|
32
32
|
incorrectOutputNodeConnection: string;
|
|
33
33
|
incorrectDefaultNodeConnection: string;
|
|
34
|
+
decisionQuestionsRequired: string;
|
|
35
|
+
decisionNameRequired: string;
|
|
36
|
+
decisionInstructionsRequired: string;
|
|
37
|
+
decisionDuplicateNames: string;
|
|
38
|
+
decisionChoicesRequired: string;
|
|
39
|
+
decisionChoiceValueRequired: string;
|
|
40
|
+
decisionDuplicateChoices: string;
|
|
41
|
+
decisionLevelsRequired: string;
|
|
42
|
+
decisionLevelLabelRequired: string;
|
|
43
|
+
decisionInvalidQuestionType: string;
|
|
34
44
|
input: string;
|
|
35
45
|
systemPromptDesc: string;
|
|
46
|
+
decisionQuestions: string;
|
|
47
|
+
decisionType: string;
|
|
48
|
+
decisionInstructions: string;
|
|
49
|
+
decisionPredicate: string;
|
|
50
|
+
decisionChoice: string;
|
|
51
|
+
decisionScore: string;
|
|
52
|
+
decisionChoices: string;
|
|
53
|
+
decisionLevels: string;
|
|
54
|
+
decisionLabel: string;
|
|
55
|
+
decisionDescription: string;
|
|
56
|
+
decisionValue: string;
|
|
57
|
+
decisionString: string;
|
|
58
|
+
decisionBoolean: string;
|
|
59
|
+
decisionRemove: string;
|
|
60
|
+
decisionAddChoice: string;
|
|
61
|
+
decisionAddLevel: string;
|
|
62
|
+
decisionAddQuestion: string;
|
|
63
|
+
decisionRemoveQuestion: string;
|
|
64
|
+
decisionMoveUp: string;
|
|
65
|
+
decisionMoveDown: string;
|
|
66
|
+
decisionLevelsHint: string;
|
|
36
67
|
model: string;
|
|
37
68
|
maxTokens: string;
|
|
38
69
|
anthropicVersion: string;
|
|
@@ -41,6 +72,7 @@ export declare const enFlow: {
|
|
|
41
72
|
geminiBaseUrlTips: string;
|
|
42
73
|
aiOutputAlias: string;
|
|
43
74
|
aiOutputAliasDesc: string;
|
|
75
|
+
decisionOutputHint: string;
|
|
44
76
|
aliasDesc: string;
|
|
45
77
|
connectTimeout: string;
|
|
46
78
|
recvTimeout: string;
|
package/dist/index.js
CHANGED
|
@@ -1008,7 +1008,8 @@ FROM
|
|
|
1008
1008
|
},
|
|
1009
1009
|
s3: {
|
|
1010
1010
|
host: "Host",
|
|
1011
|
-
port: "Port"
|
|
1011
|
+
port: "Port",
|
|
1012
|
+
region: "Signing Region"
|
|
1012
1013
|
},
|
|
1013
1014
|
azure_blob_storage: {
|
|
1014
1015
|
account_name: "Account Name",
|
|
@@ -1324,7 +1325,8 @@ FROM
|
|
|
1324
1325
|
},
|
|
1325
1326
|
s3: {
|
|
1326
1327
|
host: "地址",
|
|
1327
|
-
port: "端口"
|
|
1328
|
+
port: "端口",
|
|
1329
|
+
region: "签名区域"
|
|
1328
1330
|
},
|
|
1329
1331
|
azure_blob_storage: {
|
|
1330
1332
|
account_name: "账户名称",
|
|
@@ -2118,6 +2120,7 @@ HGETALL mqtt_acl:\${username}`
|
|
|
2118
2120
|
doc_as_upsert: "尝试更新的文档不存在时,将更新操作当作一个插入操作,并将提供的文档当作新文档插入。"
|
|
2119
2121
|
},
|
|
2120
2122
|
s3: {
|
|
2123
|
+
region: "用于对 S3 端点请求进行签名的区域,例如 `us-west-2`。显式配置的值优先于从端点地址推断的区域。留空时会从端点地址自动推断区域;无法推断时使用 `us-east-1`。当自定义端点地址不包含预期区域时,可通过此字段指定。",
|
|
2121
2124
|
acl: "上传的对象的访问权限。",
|
|
2122
2125
|
content: "要存储的对象的内容。默认情况下,它是包含所有字段的 JSON 文本格式。支持如 ${'{'}payload{'}'} 的占位符设置。存储格式取决于变量的格式,支持二进制内容。",
|
|
2123
2126
|
bucket: "将要上传文件的存储桶的名称。需要在 S3 中预先创建好,支持 ${'{'}var{'}'} 占位符格式。",
|
|
@@ -2664,6 +2667,7 @@ Default: 1, i.e., the primary shard.`,
|
|
|
2664
2667
|
doc_as_upsert: "Treat the update operation as an insert operation when the document to be updated does not exist, and insert the provided document as a new document."
|
|
2665
2668
|
},
|
|
2666
2669
|
s3: {
|
|
2670
|
+
region: "The region used to sign requests to the S3 endpoint, for example `us-west-2`. An explicit value takes precedence over the region inferred from the endpoint host. Leave empty to infer the region from the host, with `us-east-1` as the fallback when no region can be inferred. Set this field for custom endpoint hosts that do not contain the intended region.",
|
|
2667
2671
|
acl: "The Access Control List (ACL) to use for the uploaded objects.",
|
|
2668
2672
|
content: "The content of the object to be uploaded supports placeholders.",
|
|
2669
2673
|
bucket: "The name of the bucket to which files will be uploaded. Needs to be pre-created in S3. Supports the ${'{'}var{'}'} placeholder format.",
|
|
@@ -3418,8 +3422,39 @@ Default: 1, i.e., the primary shard.`,
|
|
|
3418
3422
|
incorrectInputOutputConnection: "请确认所有 Source 节点均正确连接到同一数据处理节点",
|
|
3419
3423
|
incorrectOutputNodeConnection: "请确认所有 Sink 节点均由同一数据处理节点输出",
|
|
3420
3424
|
incorrectDefaultNodeConnection: "请确认所有数据处理节点均按照顺序首尾相连",
|
|
3425
|
+
decisionQuestionsRequired: "请至少添加一个问题",
|
|
3426
|
+
decisionNameRequired: "请输入问题名称",
|
|
3427
|
+
decisionInstructionsRequired: "请为每个问题输入指令",
|
|
3428
|
+
decisionDuplicateNames: "问题名称不能重复",
|
|
3429
|
+
decisionChoicesRequired: "请至少添加一个选项",
|
|
3430
|
+
decisionChoiceValueRequired: "选项值必须是字符串或布尔值",
|
|
3431
|
+
decisionDuplicateChoices: "选项值不能重复",
|
|
3432
|
+
decisionLevelsRequired: "请至少添加一个评分等级",
|
|
3433
|
+
decisionLevelLabelRequired: "请输入每个评分等级的标签",
|
|
3434
|
+
decisionInvalidQuestionType: "请选择支持的问题类型",
|
|
3421
3435
|
input: "输入",
|
|
3422
3436
|
systemPromptDesc: "系统消息,用于引导 AI 模型生成符合预期的输出。例:将输入的 JSON 数据中,值为数字的 value 相加起来,并输出,只需返回输出结果。",
|
|
3437
|
+
decisionQuestions: "问题",
|
|
3438
|
+
decisionType: "类型",
|
|
3439
|
+
decisionInstructions: "指令",
|
|
3440
|
+
decisionPredicate: "判断(predicate)",
|
|
3441
|
+
decisionChoice: "选择(choice)",
|
|
3442
|
+
decisionScore: "评分(score)",
|
|
3443
|
+
decisionChoices: "选项",
|
|
3444
|
+
decisionLevels: "评分等级",
|
|
3445
|
+
decisionLabel: "标签",
|
|
3446
|
+
decisionDescription: "描述(可选)",
|
|
3447
|
+
decisionValue: "值",
|
|
3448
|
+
decisionString: "字符串",
|
|
3449
|
+
decisionBoolean: "布尔值",
|
|
3450
|
+
decisionRemove: "删除",
|
|
3451
|
+
decisionAddChoice: "添加选项",
|
|
3452
|
+
decisionAddLevel: "添加等级",
|
|
3453
|
+
decisionAddQuestion: "添加问题",
|
|
3454
|
+
decisionRemoveQuestion: "删除问题",
|
|
3455
|
+
decisionMoveUp: "上移",
|
|
3456
|
+
decisionMoveDown: "下移",
|
|
3457
|
+
decisionLevelsHint: "请按从低到高排列等级,评分使用从 0 开始的等级索引。",
|
|
3423
3458
|
model: "模型",
|
|
3424
3459
|
maxTokens: "最大令牌数",
|
|
3425
3460
|
anthropicVersion: "Anthropic 版本",
|
|
@@ -3428,6 +3463,7 @@ Default: 1, i.e., the primary shard.`,
|
|
|
3428
3463
|
geminiBaseUrlTips: "当前 Gemini 通过兼容 OpenAI 的接口来与之通信,请输入兼容 OpenAI 的基础 URL。",
|
|
3429
3464
|
aiOutputAlias: "输出结果别名",
|
|
3430
3465
|
aiOutputAliasDesc: "输出结果别名,用户在动作或后续处理中引用输出结果。",
|
|
3466
|
+
decisionOutputHint: "输出为包含 answers 数组的 JSON 字符串,可能包含概率、置信度和拒答。访问字段前需解码;请先处理失败时的空结果。",
|
|
3431
3467
|
aliasDesc: "别名如包含除字母、数字和下划线以外的字符,或以数字开头,或为 SQL 关键字时,请为别名加上双引号。",
|
|
3432
3468
|
connectTimeout: "连接超时",
|
|
3433
3469
|
recvTimeout: "接收数据超时时间",
|
|
@@ -3470,8 +3506,39 @@ Default: 1, i.e., the primary shard.`,
|
|
|
3470
3506
|
incorrectInputOutputConnection: "Please confirm that all source nodes are correctly connected to the same data processing node",
|
|
3471
3507
|
incorrectOutputNodeConnection: "Please confirm that all sink nodes are output from the same data processing node",
|
|
3472
3508
|
incorrectDefaultNodeConnection: "Please confirm that all data processing nodes are connected in sequence from start to end",
|
|
3509
|
+
decisionQuestionsRequired: "Add at least one question.",
|
|
3510
|
+
decisionNameRequired: "Enter a question name.",
|
|
3511
|
+
decisionInstructionsRequired: "Enter instructions for every question.",
|
|
3512
|
+
decisionDuplicateNames: "Question names must be unique.",
|
|
3513
|
+
decisionChoicesRequired: "Add at least one choice.",
|
|
3514
|
+
decisionChoiceValueRequired: "Choice values must be strings or booleans.",
|
|
3515
|
+
decisionDuplicateChoices: "Choice values must be unique.",
|
|
3516
|
+
decisionLevelsRequired: "Add at least one score level.",
|
|
3517
|
+
decisionLevelLabelRequired: "Enter a label for every score level.",
|
|
3518
|
+
decisionInvalidQuestionType: "Select a supported question type.",
|
|
3473
3519
|
input: "Input",
|
|
3474
3520
|
systemPromptDesc: "System message, used to guide AI models to generate outputs that meet expectations. Example: Add up the values of numeric keys in the input JSON data and output the result, only return the output result.",
|
|
3521
|
+
decisionQuestions: "Questions",
|
|
3522
|
+
decisionType: "Type",
|
|
3523
|
+
decisionInstructions: "Instructions",
|
|
3524
|
+
decisionPredicate: "Predicate",
|
|
3525
|
+
decisionChoice: "Choice",
|
|
3526
|
+
decisionScore: "Score",
|
|
3527
|
+
decisionChoices: "Choices",
|
|
3528
|
+
decisionLevels: "Score levels",
|
|
3529
|
+
decisionLabel: "Label",
|
|
3530
|
+
decisionDescription: "Description (optional)",
|
|
3531
|
+
decisionValue: "Value",
|
|
3532
|
+
decisionString: "String",
|
|
3533
|
+
decisionBoolean: "Boolean",
|
|
3534
|
+
decisionRemove: "Remove",
|
|
3535
|
+
decisionAddChoice: "Add choice",
|
|
3536
|
+
decisionAddLevel: "Add level",
|
|
3537
|
+
decisionAddQuestion: "Add question",
|
|
3538
|
+
decisionRemoveQuestion: "Remove question",
|
|
3539
|
+
decisionMoveUp: "Move up",
|
|
3540
|
+
decisionMoveDown: "Move down",
|
|
3541
|
+
decisionLevelsHint: "Order levels from lowest to highest. Scores use zero-based level indices.",
|
|
3475
3542
|
model: "Model",
|
|
3476
3543
|
maxTokens: "Max Tokens",
|
|
3477
3544
|
anthropicVersion: "Anthropic Version",
|
|
@@ -3480,6 +3547,7 @@ Default: 1, i.e., the primary shard.`,
|
|
|
3480
3547
|
geminiBaseUrlTips: "This Gemini connection uses an OpenAI-compatible API. Please enter a compatible Base URL.",
|
|
3481
3548
|
aiOutputAlias: "Output Result Alias",
|
|
3482
3549
|
aiOutputAliasDesc: "Output result alias, used to reference output results in actions or subsequent processing.",
|
|
3550
|
+
decisionOutputHint: "Returns a JSON string with an answers array, including probabilities, confidence values, and possible refusals. Decode it to access fields; handle empty results before decoding.",
|
|
3483
3551
|
aliasDesc: "If the alias contains characters other than letters, numbers, and underscores, or starts with a number, or is a SQL keyword, please add double quotes to the alias.",
|
|
3484
3552
|
connectTimeout: "Connect Timeout",
|
|
3485
3553
|
recvTimeout: "Receive Timeout",
|
|
@@ -3524,8 +3592,39 @@ Default: 1, i.e., the primary shard.`,
|
|
|
3524
3592
|
incorrectInputOutputConnection: "すべてのソースノードが同じデータ処理ノードに正しく接続されていることを確認してください",
|
|
3525
3593
|
incorrectOutputNodeConnection: "すべてのシンクノードが同じデータ処理ノードから出力されていることを確認してください",
|
|
3526
3594
|
incorrectDefaultNodeConnection: "すべてのデータ処理ノードが開始から終了まで順に接続されていることを確認してください",
|
|
3595
|
+
decisionQuestionsRequired: "質問を少なくとも 1 つ追加してください。",
|
|
3596
|
+
decisionNameRequired: "質問名を入力してください。",
|
|
3597
|
+
decisionInstructionsRequired: "すべての質問に指示を入力してください。",
|
|
3598
|
+
decisionDuplicateNames: "質問名は重複できません。",
|
|
3599
|
+
decisionChoicesRequired: "選択肢を少なくとも 1 つ追加してください。",
|
|
3600
|
+
decisionChoiceValueRequired: "選択肢の値は文字列または真偽値にしてください。",
|
|
3601
|
+
decisionDuplicateChoices: "選択肢の値は重複できません。",
|
|
3602
|
+
decisionLevelsRequired: "評価レベルを少なくとも 1 つ追加してください。",
|
|
3603
|
+
decisionLevelLabelRequired: "すべての評価レベルにラベルを入力してください。",
|
|
3604
|
+
decisionInvalidQuestionType: "対応する質問の種類を選択してください。",
|
|
3527
3605
|
input: "入力",
|
|
3528
3606
|
systemPromptDesc: "システムメッセージ。AI モデルに期待どおりの出力を生成させるために使用します。例:入力 JSON データの数値キーの値を合計し、その結果のみを返す。",
|
|
3607
|
+
decisionQuestions: "質問",
|
|
3608
|
+
decisionType: "種類",
|
|
3609
|
+
decisionInstructions: "指示",
|
|
3610
|
+
decisionPredicate: "判定",
|
|
3611
|
+
decisionChoice: "選択",
|
|
3612
|
+
decisionScore: "スコア",
|
|
3613
|
+
decisionChoices: "選択肢",
|
|
3614
|
+
decisionLevels: "評価レベル",
|
|
3615
|
+
decisionLabel: "ラベル",
|
|
3616
|
+
decisionDescription: "説明(任意)",
|
|
3617
|
+
decisionValue: "値",
|
|
3618
|
+
decisionString: "文字列",
|
|
3619
|
+
decisionBoolean: "真偽値",
|
|
3620
|
+
decisionRemove: "削除",
|
|
3621
|
+
decisionAddChoice: "選択肢を追加",
|
|
3622
|
+
decisionAddLevel: "レベルを追加",
|
|
3623
|
+
decisionAddQuestion: "質問を追加",
|
|
3624
|
+
decisionRemoveQuestion: "質問を削除",
|
|
3625
|
+
decisionMoveUp: "上へ移動",
|
|
3626
|
+
decisionMoveDown: "下へ移動",
|
|
3627
|
+
decisionLevelsHint: "レベルを低い順に並べてください。スコアには 0 から始まるレベルのインデックスを使用します。",
|
|
3529
3628
|
model: "モデル",
|
|
3530
3629
|
maxTokens: "最大トークン数",
|
|
3531
3630
|
anthropicVersion: "Anthropic バージョン",
|
|
@@ -3535,6 +3634,7 @@ Default: 1, i.e., the primary shard.`,
|
|
|
3535
3634
|
geminiBaseUrlTips: "This Gemini connection uses an OpenAI-compatible API. Please enter a compatible Base URL.",
|
|
3536
3635
|
aiOutputAlias: "出力結果のエイリアス",
|
|
3537
3636
|
aiOutputAliasDesc: "出力結果のエイリアス。アクションや後続処理で出力結果を参照するために使用します",
|
|
3637
|
+
decisionOutputHint: "出力は answers 配列を含む JSON 文字列で、確率、信頼度、拒否が含まれる場合があります。フィールドへのアクセス前にデコードしてください。失敗時の空の結果は、デコードする前に処理してください。",
|
|
3538
3638
|
aliasDesc: "エイリアスに英数字とアンダースコア以外の文字が含まれる場合、数字で始まる場合、または SQL キーワードの場合は、エイリアスを二重引用符で囲んでください",
|
|
3539
3639
|
// S - TODO: ja
|
|
3540
3640
|
connectTimeout: "Connect Timeout",
|