Skip to content
This repository has been archived by the owner on Sep 26, 2024. It is now read-only.

Commit

Permalink
Copy i18n support from #706
Browse files Browse the repository at this point in the history
  • Loading branch information
shelegdmitriy committed Aug 16, 2021
1 parent 204c006 commit 277c950
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 64 deletions.
12 changes: 1 addition & 11 deletions frontend/src/components/nodes/ValidatorMetadataRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,17 +137,7 @@ class ValidatorMetadataRow extends PureComponent<Props> {
<Col className="validator-nodes-content-cell">
<p className="text-center">
{translate(
"component.nodes.ValidatorMetadataRow.pool_info_tip",
{
info_tip_text: (
<a
href="https://github.com/zavodil/near-pool-details#description"
target="_blank"
>
<Translate id="button.data" />
</a>
),
}
"component.nodes.ValidatorMetadataRow.pool_info_tip"
)}
</p>
</Col>
Expand Down
15 changes: 2 additions & 13 deletions frontend/src/components/nodes/ValidatorTelemetryRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,14 +148,7 @@ class ValidatorTelemetryRow extends PureComponent<Props> {
"component.nodes.ValidatorTelemetryRow.agent_name.title"
)}
text={translate(
"component.nodes.ValidatorTelemetryRow.agent_name.text",
{
agent_name_tip: (
<a href="https://github.com/near/nearcore">
<Translate id="buttons.rc_official_implementation" />
</a>
),
}
"component.nodes.ValidatorTelemetryRow.node_agent_name.text"
)}
/>
</Col>
Expand All @@ -181,11 +174,7 @@ class ValidatorTelemetryRow extends PureComponent<Props> {
<Row noGutters>
<Col className="validator-nodes-details-title">
{translate(
"component.nodes.ValidatorTelemetryRow.agent_version.title"
)}
&nbsp;/&nbsp;
{translate(
"component.nodes.ValidatorTelemetryRow.agent_build.title"
"component.nodes.ValidatorTelemetryRow.node_agent_version_or_build.title"
)}
</Col>
</Row>
Expand Down
17 changes: 6 additions & 11 deletions frontend/src/translations/en.global.json
Original file line number Diff line number Diff line change
Expand Up @@ -149,15 +149,12 @@
"text": "Telemetry is a regular notification coming from the nodes which includes generic information like the latest known block height, and the version of NEAR Protocol agent (nearcore).",
"title": "Latest Telemetry Update"
},
"agent_name": {
"text": "NEAR Protocol could have multiple implementations, so agent is the name of that implementation, where 'near-rs' is ${agent_name_tip}.",
"node_agent_name": {
"text": "NEAR Protocol could have multiple implementations, so agent is the name of that implementation, where 'near-rs' is <a href=\"https://github.com/near/nearcore\">the official implementation</a>.",
"title": "Node Agent Name"
},
"agent_version": {
"title": "Node Agent Version"
},
"agent_build": {
"title": "Build"
"node_agent_version_or_build": {
"title": "Node Agent Version / Build"
}
},
"ValidatorMetadataRow": {
Expand All @@ -168,7 +165,7 @@
"discord": "Discord",
"description": "Description"
},
"pool_info_tip": "If you are node owner feel free to fill all ${info_tip_text} to promote your own node!"
"pool_info_tip": "If you are node owner feel free to fill all <a href=\"https://github.com/zavodil/near-pool-details#description\" target=\"_blank\">data</a> to promote your own node!"
},
"NodesEpoch": {
"current_epoch_start": "Current Epoch Start",
Expand Down Expand Up @@ -531,8 +528,6 @@
"docs": "docs",
"load_more": "Load More",
"show_more": "Show more",
"show_less": "Show less",
"data": "data",
"rc_official_implementation": "the official implementation"
"show_less": "Show less"
}
}
17 changes: 6 additions & 11 deletions frontend/src/translations/vi.global.json
Original file line number Diff line number Diff line change
Expand Up @@ -149,15 +149,12 @@
"text": "Telemetry is a regular notification coming from the nodes which includes generic information like the latest known block height, and the version of NEAR Protocol agent (nearcore).",
"title": "Latest Telemetry Update"
},
"agent_name": {
"text": "NEAR Protocol could have multiple implementations, so agent is the name of that implementation, where 'near-rs' is ${agent_name_tip}.",
"node_agent_name": {
"text": "NEAR Protocol could have multiple implementations, so agent is the name of that implementation, where 'near-rs' is <a href=\"https://github.com/near/nearcore\">the official implementation</a>.",
"title": "Node Agent Name"
},
"agent_version": {
"title": "Node Agent Version"
},
"agent_build": {
"title": "Build"
"node_agent_version_or_build": {
"title": "Node Agent Version / Build"
}
},
"ValidatorMetadataRow": {
Expand All @@ -168,7 +165,7 @@
"discord": "Discord",
"description": "Description"
},
"pool_info_tip": "If you are node owner feel free to fill all ${info_tip_text} to promote your own node!"
"pool_info_tip": "If you are node owner feel free to fill all <a href=\"https://github.com/zavodil/near-pool-details#description\" target=\"_blank\">data</a> to promote your own node!"
},
"NodesEpoch": {
"current_epoch_start": "Epoch Hiện Tại Khởi Động",
Expand Down Expand Up @@ -531,8 +528,6 @@
"docs": "tài liệu",
"load_more": "Tải Thêm",
"show_more": "Hiển thị thêm",
"show_less": "Hiển thị ít hơn",
"data": "data",
"rc_official_implementation": "the official implementation"
"show_less": "Hiển thị ít hơn"
}
}
31 changes: 13 additions & 18 deletions frontend/src/translations/zh-hans.global.json
Original file line number Diff line number Diff line change
Expand Up @@ -138,26 +138,23 @@
},
"ValidatorTelemetryRow": {
"uptime": {
"text": "Uptime is estimated by the ratio of the number of produced blocks to the number of expected blocks.",
"title": "Uptime"
"text": "在线率是通过已产生出块数与预期出块数的比值估算的",
"title": "在线率"
},
"latest_produced_block": {
"text": "The block height the validation node reported in the most recent telemetry heartbeat.",
"title": "Latest block"
"text": "验证节点在最近的检测心跳中上报的块高度。",
"title": "最新区块"
},
"latest_telemetry_update": {
"text": "Telemetry is a regular notification coming from the nodes which includes generic information like the latest known block height, and the version of NEAR Protocol agent (nearcore).",
"title": "Latest Telemetry Update"
"text": "检测是来自节点的常规通知,其中包括诸如最新已知块高度和 NEAR 协议代理 (nearcore) 版本等通用信息。",
"title": "最新检测更新"
},
"agent_name": {
"text": "NEAR Protocol could have multiple implementations, so agent is the name of that implementation, where 'near-rs' is ${agent_name_tip}.",
"title": "Node Agent Name"
"node_agent_name": {
"text": "NEAR协议可以有多种实现,'节点代理名称'是该实现的名称, 其中'near-rs'是<a href=\"https://github.com/near/nearcore\">官方实现</a>。",
"title": "节点代理名称"
},
"agent_version": {
"title": "Node Agent Version"
},
"agent_build": {
"title": "Build"
"node_agent_version_or_build": {
"title": "节点代理版本 / 构建ID"
}
},
"ValidatorMetadataRow": {
Expand All @@ -168,7 +165,7 @@
"discord": "Discord",
"description": "Description"
},
"pool_info_tip": "If you are node owner feel free to fill all ${info_tip_text} to promote your own node!"
"pool_info_tip": "If you are node owner feel free to fill all <a href=\"https://github.com/zavodil/near-pool-details#description\" target=\"_blank\">data</a> to promote your own node!"
},
"NodesEpoch": {
"current_epoch_start": "当前周期开始在",
Expand Down Expand Up @@ -531,8 +528,6 @@
"docs": "查看文档",
"load_more": "载入更多",
"show_more": "显示更多",
"show_less": "折叠显示",
"data": "data",
"rc_official_implementation": "the official implementation"
"show_less": "折叠显示"
}
}

0 comments on commit 277c950

Please sign in to comment.