From d5f304a3846af5afaafa32ef4c765c8c9a8571b6 Mon Sep 17 00:00:00 2001 From: Calcitem Date: Fri, 1 Jan 2021 02:53:56 +0800 Subject: [PATCH] qt: Change display language from Chinese to English --- gamewindow.ui | 173 +++++++++++++++++++-------------------- src/ui/qt/game.cpp | 8 +- src/ui/qt/gamewindow.cpp | 42 +++++----- 3 files changed, 111 insertions(+), 112 deletions(-) diff --git a/gamewindow.ui b/gamewindow.ui index d30f71ce..b18b41d6 100644 --- a/gamewindow.ui +++ b/gamewindow.ui @@ -11,7 +11,7 @@ - 直棋 + The Mill Game @@ -68,14 +68,14 @@ - 玩家: + Player: - 电脑: + AI: @@ -112,7 +112,7 @@ - 黑体 + Arial 12 @@ -120,7 +120,7 @@ color: rgb(0, 0, 127); - 新局 + New Game @@ -141,7 +141,7 @@ - 黑体 + Arial 12 @@ -149,7 +149,7 @@ color: rgb(0, 0, 127); - 认输 + Resign @@ -167,7 +167,7 @@ - 黑体 + Arial 12 @@ -175,7 +175,7 @@ color: rgb(0, 0, 127); - 悔棋 + Retract Move @@ -193,7 +193,7 @@ - 黑体 + Arial 12 false PreferDefault @@ -203,7 +203,7 @@ color: rgb(0, 0, 127); - 提示 + Hint @@ -232,7 +232,7 @@ - 文件(&F) + File @@ -243,7 +243,7 @@ - 棋局(&C) + Position @@ -255,7 +255,7 @@ - 着法(&M) + Step @@ -268,7 +268,7 @@ - 引擎(&E) + Engines @@ -282,7 +282,7 @@ - 选项(&O) + Options @@ -299,7 +299,7 @@ - 帮助(&H) + Help @@ -307,7 +307,7 @@ - 规则(&R) + Rules @@ -315,7 +315,7 @@ - 算法(&A) + AI @@ -333,7 +333,7 @@ - 工具栏 + Tool Bar TopToolBarArea @@ -381,7 +381,7 @@ Qt::AllDockWidgetAreas - 对战记录 + Move History 2 @@ -452,12 +452,12 @@ - 微软雅黑 + Arial 9 - 玩家1 (先手) + Player1 (Black) @@ -533,12 +533,12 @@ - 微软雅黑 + Arial 9 - 玩家2 (后手) + Player2 (White) @@ -576,12 +576,12 @@ - 黑体 + Arial 9 - 盘数: + Played: @@ -611,12 +611,12 @@ - 黑体 + Arial 9 - 比分: + Score: @@ -684,12 +684,12 @@ - 黑体 + Arial 9 - 胜率: + Win Rate: @@ -803,7 +803,7 @@ :/icon/resources/icon/DocumentHS.png:/icon/resources/icon/DocumentHS.png - 新建(&N) + New Game @@ -818,7 +818,7 @@ :/icon/resources/icon/OpenHS.png:/icon/resources/icon/OpenHS.png - 打开(&O)... + Load Game... Ctrl+O @@ -830,7 +830,7 @@ :/icon/resources/icon/SaveHS.png:/icon/resources/icon/SaveHS.png - 保存(&S) + Save Game... Ctrl+S @@ -842,12 +842,12 @@ :/icon/resources/icon/SaveHS.png:/icon/resources/icon/SaveHS.png - 另存为(&A)... + Save Game As... - 退出(&X) + Exit @@ -859,7 +859,7 @@ :/icon/resources/icon/EditTableHS.png:/icon/resources/icon/EditTableHS.png - 编辑棋局(&E) + Set-up a Position @@ -868,7 +868,7 @@ :/icon/resources/icon/FlipVerticalHS.png:/icon/resources/icon/FlipVerticalHS.png - 上下翻转(&F) + Flip @@ -877,7 +877,7 @@ :/icon/resources/icon/FlipHorizontalHS.png:/icon/resources/icon/FlipHorizontalHS.png - 左右翻转(&M) + Mirror @@ -886,10 +886,10 @@ :/icon/resources/icon/RightHS.png:/icon/resources/icon/RightHS.png - 顺时针旋转90°(&R) + Turn Right - 顺时针旋转90°(R) + Turn Left @@ -898,10 +898,10 @@ :/icon/resources/icon/LeftHS.png:/icon/resources/icon/LeftHS.png - 逆时针旋转90°(&L) + Turn Left - 逆时针旋转90°(L) + Turn Left @@ -916,7 +916,7 @@ :/icon/resources/icon/Invert.png:/icon/resources/icon/Invert.png - 黑白反转(&B) + Invert @@ -925,10 +925,10 @@ :/icon/resources/icon/First.png:/icon/resources/icon/First.png - 初始局面(&S) + Back to Start - 初始局面(S) + Back to Start Ctrl+Up @@ -940,7 +940,7 @@ :/icon/resources/icon/Previous.png:/icon/resources/icon/Previous.png - 前一招(&B) + Backward Ctrl+Left @@ -952,10 +952,10 @@ :/icon/resources/icon/Next.png:/icon/resources/icon/Next.png - 后一招(&F) + Forward - 后一招(F) + Forward Ctrl+Right @@ -967,7 +967,7 @@ :/icon/resources/icon/Last.png:/icon/resources/icon/Last.png - 最后局面(&E) + Forward to End Ctrl+Down @@ -982,10 +982,10 @@ :/icon/resources/icon/Play.png:/icon/resources/icon/Play.png - 自动演示(&A) + Replay - 自动演示(A) + Replay @@ -994,7 +994,7 @@ :/icon/resources/icon/BreakpointHS.png:/icon/resources/icon/BreakpointHS.png - 认输(&G) + Resign @@ -1002,10 +1002,10 @@ false - 限制步数和时间(&T)... + Step/Time Control... - 限制步数和时间(T) + Step/Time Control @@ -1020,10 +1020,10 @@ :/icon/resources/icon/FullScreenHS.png:/icon/resources/icon/FullScreenHS.png - 本机对战(&L) + Play Locally - 本机对战(L) + Play Locally @@ -1038,10 +1038,10 @@ :/icon/resources/icon/Web.png:/icon/resources/icon/Web.png - 网络对战(&I) + Play via Network - 网络对战(I) + Play via Network @@ -1050,10 +1050,10 @@ :/icon/resources/icon/OptionsHS.png:/icon/resources/icon/OptionsHS.png - 引擎设置(&E)... + ... - 引擎设置(E) + Engine Settings @@ -1068,10 +1068,10 @@ :/icon/resources/icon/Black.png:/icon/resources/icon/Black.png - 电脑执先手(&T) + AI Moves First - 电脑执先手(T) + AI Moves First @@ -1083,10 +1083,10 @@ :/icon/resources/icon/White.png:/icon/resources/icon/White.png - 电脑执后手(&R) + AI Moves Second - 电脑执白(R) + AI Moves Second @@ -1098,7 +1098,7 @@ :/icon/resources/icon/PrimaryKeyHS.png:/icon/resources/icon/PrimaryKeyHS.png - 设置(&O)... + Options... @@ -1109,7 +1109,7 @@ true - 工具栏(&T) + Tool Bar @@ -1120,7 +1120,7 @@ true - 信息栏(&D) + Move History @@ -1131,7 +1131,7 @@ true - 背景音乐(&M) + Music false @@ -1145,7 +1145,7 @@ true - 落子音效(&S) + Sound @@ -1156,10 +1156,10 @@ true - 落子动画(&A) + Animation - 落子动画(A) + Animation @@ -1171,7 +1171,7 @@ :/icon/resources/icon/Help.png:/icon/resources/icon/Help.png - 查看帮助(&V) + Help F1 @@ -1186,10 +1186,10 @@ :/icon/resources/icon/HomeHS.png:/icon/resources/icon/HomeHS.png - 作者主页(&W) + Homepage - 作者主页(W) + Homepage @@ -1197,10 +1197,10 @@ true - 关于(&A)... + About... - 关于(A) + About @@ -1208,7 +1208,7 @@ true - 自动重新开局(&A) + Auto Restart Game @@ -1219,7 +1219,7 @@ true - 电脑着法随机(&R) + Shuffle @@ -1230,7 +1230,7 @@ false - 必败时认输(&G) + Auto Resign @@ -1241,13 +1241,12 @@ false - 残局自学习 -(&E) + Endgame Learning - 引擎对战(&F) + Play via Shared Memory @@ -1261,7 +1260,7 @@ true - 先后手轮替(&C) + Auto Change Who Play First @@ -1269,7 +1268,7 @@ true - 迭代加深(&I) + IDS @@ -1280,7 +1279,7 @@ true - 深度延伸(&D) + Depth Extension @@ -1288,7 +1287,7 @@ true - 开局库(&O) + Opening Book diff --git a/src/ui/qt/game.cpp b/src/ui/qt/game.cpp index d6fff653..ff1dcf4a 100644 --- a/src/ui/qt/game.cpp +++ b/src/ui/qt/game.cpp @@ -806,12 +806,12 @@ bool Game::actionPiece(QPointF pos) QMessageBox msgBox; msgBox.setIcon(QMessageBox::Question); msgBox.setMinimumSize(600, 400); - msgBox.setText(tr("当前正在浏览历史局面。")); - msgBox.setInformativeText(tr("您确定要悔棋?")); + msgBox.setText(tr("You are looking back at an old position.")); + msgBox.setInformativeText(tr("Do you want to retract your moves?")); msgBox.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel); msgBox.setDefaultButton(QMessageBox::Cancel); - (msgBox.button(QMessageBox::Ok))->setText(tr("确定")); - (msgBox.button(QMessageBox::Cancel))->setText(tr("取消")); + (msgBox.button(QMessageBox::Ok))->setText(tr("Yes")); + (msgBox.button(QMessageBox::Cancel))->setText(tr("No")); if (QMessageBox::Ok == msgBox.exec()) { #endif /* !MOBILE_APP_UI */ diff --git a/src/ui/qt/gamewindow.cpp b/src/ui/qt/gamewindow.cpp index ee1ab8fe..b36cd94c 100644 --- a/src/ui/qt/gamewindow.cpp +++ b/src/ui/qt/gamewindow.cpp @@ -493,7 +493,7 @@ void MillGameWindow::on_actionLimited_T_triggered() auto *dialog = new QDialog(this); dialog->setWindowFlags(Qt::Dialog | Qt::WindowCloseButtonHint); dialog->setObjectName(QStringLiteral("Dialog")); - dialog->setWindowTitle(tr("步数和时间限制")); + dialog->setWindowTitle(tr("Levels")); dialog->resize(256, 108); dialog->setModal(true); @@ -514,22 +514,22 @@ void MillGameWindow::on_actionLimited_T_triggered() buttonBox->setObjectName(QStringLiteral("buttonBox")); #endif // 设置各个控件数据 - label_step->setText(tr("超出限制步数判和:")); - label_time->setText(tr("任意一方超时判负:")); - comboBox_step->addItem(tr("无限制"), 0); - comboBox_step->addItem(tr("50步"), 50); - comboBox_step->addItem(tr("100步"), 100); - comboBox_step->addItem(tr("200步"), 200); - comboBox_time->addItem(tr("无限制"), 0); - comboBox_time->addItem(tr("5分钟"), 5); - comboBox_time->addItem(tr("10分钟"), 10); - comboBox_time->addItem(tr("20分钟"), 20); + label_step->setText(tr("If the number of moves exceeds the limit, it will get a draw:")); + label_time->setText(tr("Either side loses if it times out:")); + comboBox_step->addItem(tr("Infinite"), 0); + comboBox_step->addItem(tr("50 Moves"), 50); + comboBox_step->addItem(tr("100 Moves"), 100); + comboBox_step->addItem(tr("200 Moves"), 200); + comboBox_time->addItem(tr("Infinite"), 0); + comboBox_time->addItem(tr("5 Minutes"), 5); + comboBox_time->addItem(tr("10 Minutes"), 10); + comboBox_time->addItem(tr("20 Minutes"), 20); comboBox_step->setCurrentIndex(comboBox_step->findData(gStep)); comboBox_time->setCurrentIndex(comboBox_time->findData(gTime)); buttonBox->setStandardButtons(QDialogButtonBox::Cancel | QDialogButtonBox::Ok); buttonBox->setCenterButtons(true); - buttonBox->button(QDialogButtonBox::Ok)->setText(tr("确定")); - buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("取消")); + buttonBox->button(QDialogButtonBox::Ok)->setText(tr("OK")); + buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); // 布局 formLayout->setSpacing(6); @@ -952,7 +952,7 @@ void MillGameWindow::on_actionEngine_E_triggered() auto *dialog = new QDialog(this); dialog->setWindowFlags(Qt::Dialog | Qt::WindowCloseButtonHint); dialog->setObjectName(QStringLiteral("Dialog")); - dialog->setWindowTitle(tr("AI设置")); + dialog->setWindowTitle(tr("Configure AI")); dialog->resize(256, 188); dialog->setModal(true); @@ -972,20 +972,20 @@ void MillGameWindow::on_actionEngine_E_triggered() auto *buttonBox = new QDialogButtonBox(dialog); // 设置各个控件数据 - groupBox1->setTitle(tr("玩家1 AI设置")); - label_time1->setText(tr("限时")); + groupBox1->setTitle(tr("Player1 AI Settings")); + label_time1->setText(tr("Time limit")); spinBox_time1->setMinimum(1); spinBox_time1->setMaximum(3600); - groupBox2->setTitle(tr("玩家2 AI设置")); - label_time2->setText(tr("限时")); + groupBox2->setTitle(tr("Player2 AI Settings")); + label_time2->setText(tr("Time limit")); spinBox_time2->setMinimum(1); spinBox_time2->setMaximum(3600); buttonBox->setStandardButtons(QDialogButtonBox::Cancel | QDialogButtonBox::Ok); buttonBox->setCenterButtons(true); - buttonBox->button(QDialogButtonBox::Ok)->setText(tr("确定")); - buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("取消")); + buttonBox->button(QDialogButtonBox::Ok)->setText(tr("OK")); + buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); // 布局控件 vLayout->addWidget(groupBox1); @@ -1043,7 +1043,7 @@ void MillGameWindow::on_actionAbout_A_triggered() dialog->setWindowFlags(Qt::Dialog | Qt::WindowCloseButtonHint); dialog->setObjectName(QStringLiteral("aboutDialog")); - dialog->setWindowTitle(tr("直棋")); + dialog->setWindowTitle(tr("The Mill Game")); dialog->setModal(true); // 生成各个控件