From 8c0aa6eb93d827ca1462f93a91dd5a78a3ae90e4 Mon Sep 17 00:00:00 2001
From: SunStorm <58936888+SunStorm2018@users.noreply.github.com>
Date: Tue, 11 Feb 2025 18:23:21 +0800
Subject: [PATCH] fix: add some chinese translation in example (#1)
add some chinese translation in example
---
example/example_en_US.ts | 76 ++++++++++++++++++
example/example_zh_CN.ts | 124 ++++++++++++++++++++++++------
example/qml/page/T_Captcha.qml | 2 +-
example/qml/page/T_QRCode.qml | 10 +--
example/qml/page/T_Timeline.qml | 10 +--
example/qml/page/T_Typography.qml | 10 +--
6 files changed, 192 insertions(+), 40 deletions(-)
diff --git a/example/example_en_US.ts b/example/example_en_US.ts
index a8e7872e..cb235c04 100644
--- a/example/example_en_US.ts
+++ b/example/example_en_US.ts
@@ -1062,6 +1062,11 @@ Updated content:
Please enter a verification code
+
+
+ verify
+
+
The verification code is correct
@@ -1817,6 +1822,31 @@ My only desire is to be permitted to drive out the traitors and restore the Han.
QRCode
+
+
+ text:
+
+
+
+
+ color:
+
+
+
+
+ bgColor:
+
+
+
+
+ margins:
+
+
+
+
+ size:
+
+
T_RadarChart
@@ -2387,6 +2417,27 @@ Some contents...
clear
+
+
+ mode:
+
+
+
+
+ Left
+
+
+
+
+ Right
+
+
+
+
+
+ Alternate
+
+
T_ToggleSwitch
@@ -2541,6 +2592,31 @@ Some contents...
Typography
+
+
+ Title
+
+
+
+
+ Subtitle
+
+
+
+
+ Body Strong
+
+
+
+
+ Body
+
+
+
+
+ Caption
+
+
T_Watermark
diff --git a/example/example_zh_CN.ts b/example/example_zh_CN.ts
index 7b87aeb2..78cd2d39 100644
--- a/example/example_zh_CN.ts
+++ b/example/example_zh_CN.ts
@@ -124,7 +124,7 @@
Hotkey
-
+ 热键
@@ -981,7 +981,7 @@ Updated content:
IconOnly
-
+ 仅图标
@@ -991,7 +991,7 @@ Updated content:
TextOnly
-
+ 仅文字
@@ -1001,7 +1001,7 @@ Updated content:
TextBesideIcon
-
+ 文字加图标
@@ -1011,7 +1011,7 @@ Updated content:
TextUnderIcon
-
+ 文字位于图标下方
@@ -1026,37 +1026,37 @@ Updated content:
Menu_1
-
+ 菜单_1
Menu_2
-
+ 菜单_2
Menu_3
-
+ 菜单_3
Menu_4
-
+ 菜单_4
Radio Button_1
-
+ 单选按钮_1
Radio Button_2
-
+ 单选按钮_1
Radio Button_3
-
+ 单选按钮_3
@@ -1089,6 +1089,11 @@ Updated content:
Please enter a verification code
请输入验证码
+
+
+ verify
+ 验证
+
The verification code is correct
@@ -1123,7 +1128,7 @@ Updated content:
A 2-state CheckBox
-
+ 两状态复选框
@@ -1144,12 +1149,12 @@ Updated content:
A 3-state CheckBox
-
+ 三状态复选框
Three State
-
+ 三状态
@@ -1533,7 +1538,7 @@ My only desire is to be permitted to drive out the traitors and restore the Han.
The latest FluentUI Pro controls and styles for your applications.
-
+ 最新的 FluentUI 控件和样式
@@ -1600,7 +1605,7 @@ My only desire is to be permitted to drive out the traitors and restore the Han.
Info
-
+ 信息
@@ -1611,7 +1616,7 @@ My only desire is to be permitted to drive out the traitors and restore the Han.
Warning
-
+ 警告
@@ -1648,14 +1653,14 @@ My only desire is to be permitted to drive out the traitors and restore the Han.
close '%1'
-
+ 关闭 '%1'
show '%1
-
+ 显示 '%1
@@ -1667,7 +1672,7 @@ My only desire is to be permitted to drive out the traitors and restore the Han.
clear all info
- 清除所有信息栏
+ 清除全部信息栏
Loading...
@@ -1957,6 +1962,31 @@ My only desire is to be permitted to drive out the traitors and restore the Han.
QRCode
二维码
+
+
+ text:
+ 文本:
+
+
+
+ color:
+ 前景色:
+
+
+
+ bgColor:
+ 背景色:
+
+
+
+ margins:
+ 边距:
+
+
+
+ size:
+ 尺寸:
+
T_RadarChart
@@ -1996,21 +2026,21 @@ My only desire is to be permitted to drive out the traitors and restore the Han.
Radio Button_1
-
+ 单选按钮_1
Radio Button_2
-
+ 单选按钮_1
Radio Button_3
-
+ 单选按钮_3
@@ -2569,6 +2599,27 @@ Some contents...
clear
清空
+
+
+ mode:
+ 模式:
+
+
+
+ Left
+ 左
+
+
+
+ Right
+ 右
+
+
+
+
+ Alternate
+ 交替
+
T_ToggleSwitch
@@ -2743,6 +2794,31 @@ Some contents...
Typography
字体
+
+
+ Title
+ 标题
+
+
+
+ Subtitle
+
+
+
+
+ Body Strong
+
+
+
+
+ Body
+
+
+
+
+ Caption
+
+
T_Watermark
diff --git a/example/qml/page/T_Captcha.qml b/example/qml/page/T_Captcha.qml
index 6054b21e..073a1139 100644
--- a/example/qml/page/T_Captcha.qml
+++ b/example/qml/page/T_Captcha.qml
@@ -45,7 +45,7 @@ FluScrollablePage{
Layout.preferredWidth: 240
}
FluButton{
- text:"verify"
+ text: qsTr("verify")
onClicked: {
var success = captcha.verify(text_box.text)
if(success){
diff --git a/example/qml/page/T_QRCode.qml b/example/qml/page/T_QRCode.qml
index 0e257c50..a4b1e9a4 100644
--- a/example/qml/page/T_QRCode.qml
+++ b/example/qml/page/T_QRCode.qml
@@ -24,7 +24,7 @@ FluScrollablePage{
spacing: 10
Layout.topMargin: 20
FluText{
- text:"text:"
+ text: qsTr("text:")
Layout.alignment: Qt.AlignVCenter
}
FluTextBox{
@@ -38,7 +38,7 @@ FluScrollablePage{
spacing: 10
Layout.topMargin: 10
FluText{
- text:"color:"
+ text: qsTr("color:")
Layout.alignment: Qt.AlignVCenter
}
FluColorPicker{
@@ -51,7 +51,7 @@ FluScrollablePage{
spacing: 10
Layout.topMargin: 10
FluText{
- text:"bgColor:"
+ text: qsTr("bgColor:")
Layout.alignment: Qt.AlignVCenter
}
FluColorPicker{
@@ -63,7 +63,7 @@ FluScrollablePage{
RowLayout{
spacing: 10
FluText{
- text:"margins:"
+ text: qsTr("margins:")
Layout.alignment: Qt.AlignVCenter
}
FluSlider{
@@ -77,7 +77,7 @@ FluScrollablePage{
RowLayout{
spacing: 10
FluText{
- text:"size:"
+ text: qsTr("size:")
Layout.alignment: Qt.AlignVCenter
}
FluSlider{
diff --git a/example/qml/page/T_Timeline.qml b/example/qml/page/T_Timeline.qml
index d69f0feb..90ae2801 100644
--- a/example/qml/page/T_Timeline.qml
+++ b/example/qml/page/T_Timeline.qml
@@ -127,28 +127,28 @@ FluScrollablePage{
RowLayout{
Layout.topMargin: 10
FluText{
- text:"mode:"
+ text: qsTr("mode:")
}
FluDropDownButton{
id: btn_mode
Layout.preferredWidth: 100
- text: "Alternate"
+ text: qsTr("Alternate")
FluMenuItem{
- text: "Left"
+ text: qsTr("Left")
onClicked: {
btn_mode.text = text
time_line.mode = FluTimelineType.Left
}
}
FluMenuItem{
- text: "Right"
+ text: qsTr("Right")
onClicked: {
btn_mode.text = text
time_line.mode = FluTimelineType.Right
}
}
FluMenuItem{
- text: "Alternate"
+ text: qsTr("Alternate")
onClicked: {
btn_mode.text = text
time_line.mode = FluTimelineType.Alternate
diff --git a/example/qml/page/T_Typography.qml b/example/qml/page/T_Typography.qml
index 0260c7d9..2102a98f 100644
--- a/example/qml/page/T_Typography.qml
+++ b/example/qml/page/T_Typography.qml
@@ -36,31 +36,31 @@ FluContentPage {
}
FluText{
id:text_Title
- text:"Title"
+ text: qsTr("Title")
padding: 0
font: FluTextStyle.Title
}
FluText{
id:text_Subtitle
- text:"Subtitle"
+ text: qsTr("Subtitle")
padding: 0
font: FluTextStyle.Subtitle
}
FluText{
id:text_BodyStrong
- text:"Body Strong"
+ text: qsTr("Body Strong")
padding: 0
font: FluTextStyle.BodyStrong
}
FluText{
id:text_Body
- text:"Body"
+ text: qsTr("Body")
padding: 0
font: FluTextStyle.Body
}
FluText{
id:text_Caption
- text:"Caption"
+ text: qsTr("Caption")
padding: 0
font: FluTextStyle.Caption
}