Skip to content

Commit f3bf032

Browse files
0721Bettyysfscream
authored andcommitted
feat(i18n): add actions i18n
1 parent f702283 commit f3bf032

File tree

4 files changed

+97
-25
lines changed

4 files changed

+97
-25
lines changed

packages/i18n/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @emqx/shared-ui-i18n
22

3+
## 0.0.8
4+
5+
### Patch Changes
6+
7+
- add label i18n for some action types
8+
39
## 0.0.7
410

511
### Patch Changes

packages/i18n/lib/enActionsLabel.ts

Lines changed: 45 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,24 @@ export const enActionsLabel: Record<string, Record<string, string>> = {
22
common: {
33
health_check_interval: 'Health Check Interval',
44
query_mode: 'Query Mode',
5-
},
6-
kafka_producer: {
5+
max_retries: 'Max Retries',
6+
worker_pool_size: 'Buffer Pool Size',
7+
start_after_created: 'Start After Created',
8+
start_timeout: 'Start Timeout',
9+
request_ttl: 'Request TTL',
10+
inflight_window: 'Inflight Window',
11+
max_buffer_bytes: 'Max Buffer Queue Size',
12+
sql: 'SQL',
13+
batch_size: 'Batch Size',
714
topic: 'Kafka Topic',
815
key: 'Message Key',
916
value: 'Message Value',
10-
timestamp: 'Message Timestamp',
1117
compression: 'Compression',
1218
partition_strategy: 'Partition Strategy',
1319
kafka_headers: 'Kafka Headers',
1420
kafka_ext_headers: 'More Kafka Headers',
15-
kafka_ext_header_key: 'Kafka Header Key',
16-
kafka_ext_header_value: 'Kafka Header Value',
21+
kafka_ext_header_key: 'Key',
22+
kafka_ext_header_value: 'Value',
1723
kafka_header_value_encode_mode: 'Kafka Header Value Encode Mode',
1824
max_batch_bytes: 'Max Batch Bytes',
1925
required_acks: 'Required Acks',
@@ -25,17 +31,44 @@ export const enActionsLabel: Record<string, Record<string, string>> = {
2531
memory_overload_protection: 'Memory Overload Protection',
2632
sync_query_timeout: 'Synchronous Query Timeout',
2733
},
34+
kafka_producer: {
35+
timestamp: 'Message Timestamp',
36+
kafka_ext_header_key: 'Kafka Header Key',
37+
kafka_ext_header_value: 'Kafka Header Value',
38+
},
2839
http: {
2940
body: 'Body',
3041
headers: 'Headers',
3142
method: 'Method',
3243
path: 'URL Path',
33-
max_retries: 'Max Retries',
34-
worker_pool_size: 'Buffer Pool Size',
35-
start_after_created: 'Start After Created',
36-
start_timeout: 'Start Timeout',
37-
request_ttl: 'Request TTL',
38-
inflight_window: 'Inflight Window',
39-
max_buffer_bytes: 'Max Buffer Queue Size',
44+
},
45+
azure_event_hub_producer: {
46+
topic: 'Event Hub Name',
47+
key: 'Message Key',
48+
value: 'Message Value',
49+
partition_strategy: 'Partition Strategy',
50+
required_acks: 'Required Acks',
51+
kafka_headers: 'Azure Event Hubs Headers',
52+
kafka_ext_headers: 'Extra Azure Event Hubs headers',
53+
kafka_header_value_encode_mode: 'Azure Event Hubs headers value encode mode',
54+
partition_count_refresh_interval: 'Partition Count Refresh Interval',
55+
max_inflight: 'Max Inflight',
56+
mode: 'Buffer Mode',
57+
per_partition_limit: 'Per-partition Buffer Limit',
58+
segment_bytes: 'Segment File Bytes',
59+
memory_overload_protection: 'Memory Overload Protection',
60+
max_batch_bytes: 'Max Batch Bytes',
61+
query_mode: 'Query mode',
62+
},
63+
gcp_pubsub_producer: {
64+
attributes_template: 'Attributes Template',
65+
pubsub_topic: 'GCP PubSub Topic',
66+
ordering_key_template: 'Ordering Key template',
67+
payload_template: 'Payload Template',
68+
},
69+
syskeeper_forwarder: {
70+
target_topic: 'Topic',
71+
target_qos: 'QoS',
72+
template: '"Message Template',
4073
},
4174
}

packages/i18n/lib/zhActionsLabel.ts

Lines changed: 45 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,24 @@ export const zhActionsLabel: Record<string, Record<string, string>> = {
22
common: {
33
health_check_interval: '健康检查间隔',
44
query_mode: '请求模式',
5-
},
6-
kafka_producer: {
5+
max_retries: '最大重试次数',
6+
worker_pool_size: '缓存池大小',
7+
start_after_created: '创建后立即启动',
8+
start_timeout: '启动超时时间',
9+
request_ttl: '请求超期',
10+
inflight_window: '请求飞行队列窗口',
11+
max_buffer_bytes: '缓存队列最大长度',
12+
sql: 'SQL',
13+
batch_size: '最大批量请求大小',
714
topic: 'Kafka 主题名称',
815
key: '消息的键',
916
value: '消息的值',
10-
timestamp: '消息的时间戳',
1117
compression: '压缩',
1218
partition_strategy: '分区选择策略',
1319
kafka_headers: 'Kafka Headers',
1420
kafka_ext_headers: '更多的 Kafka Headers',
15-
kafka_ext_header_key: 'Kafka Headers 键',
16-
kafka_ext_header_value: 'Kafka Headers 值',
21+
kafka_ext_header_key: '键',
22+
kafka_ext_header_value: '值',
1723
kafka_header_value_encode_mode: 'Kafka Headers 值编码类型',
1824
max_batch_bytes: '最大批量字节数',
1925
required_acks: 'Kafka 确认数量',
@@ -25,17 +31,44 @@ export const zhActionsLabel: Record<string, Record<string, string>> = {
2531
memory_overload_protection: '内存过载保护',
2632
sync_query_timeout: '同步查询超时时间',
2733
},
34+
kafka_producer: {
35+
timestamp: '消息的时间戳',
36+
kafka_ext_header_key: 'Kafka Headers 键',
37+
kafka_ext_header_value: 'Kafka Headers 值',
38+
},
2839
http: {
2940
body: '请求体',
3041
headers: '请求头',
3142
method: '请求方法',
3243
path: 'URL 路径',
33-
max_retries: '最大重试次数',
34-
worker_pool_size: '缓存池大小',
35-
start_after_created: '创建后立即启动',
36-
start_timeout: '启动超时时间',
37-
request_ttl: '请求超期',
38-
inflight_window: '请求飞行队列窗口',
39-
max_buffer_bytes: '缓存队列最大长度',
44+
},
45+
azure_event_hub_producer: {
46+
topic: '事件中心名称',
47+
key: '消息键',
48+
value: '消息值',
49+
partition_strategy: '分区策略',
50+
required_acks: '所需确认',
51+
kafka_headers: 'Azure Event Hubs 头部',
52+
kafka_ext_headers: '额外的 Azure Event Hubs 头部信息',
53+
kafka_header_value_encode_mode: 'Azure Event Hubs 头部值编码模式',
54+
partition_count_refresh_interval: '分区数刷新间隔',
55+
max_inflight: '最大传输数',
56+
mode: '缓冲区模式',
57+
per_partition_limit: '每个分区缓冲限制',
58+
segment_bytes: '段文件字节数',
59+
memory_overload_protection: '内存过载保护',
60+
max_batch_bytes: '最大批次字节数',
61+
query_mode: '查询模式',
62+
},
63+
gcp_pubsub_producer: {
64+
attributes_template: '属性模版',
65+
pubsub_topic: 'GCP PubSub 主题',
66+
ordering_key_template: '排序键模板',
67+
payload_template: 'HTTP 请求消息体模板',
68+
},
69+
syskeeper_forwarder: {
70+
target_topic: '主题',
71+
target_qos: 'QoS',
72+
template: '消息模板',
4073
},
4174
}

packages/i18n/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@emqx/shared-ui-i18n",
3-
"version": "0.0.7",
3+
"version": "0.0.8",
44
"homepage": "https://emqx.io",
55
"license": "Apache-2.0",
66
"repository": {

0 commit comments

Comments
 (0)