From ad04389bd58a0eec41c52053dd74db10141cc607 Mon Sep 17 00:00:00 2001 From: zhangjiaping Date: Tue, 16 Mar 2021 11:05:21 +0800 Subject: [PATCH] fix(frontend): Complete translations. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Description: 修复提示框按钮未汉化问题 Log: 修复提示框按钮未汉化问题 Bug: http://172.17.66.192/biz/bug-view-38128.html --- src/mainwindow.cpp | 2 +- src/settings-widget.cpp | 5 +++-- translations/ukui-search/bo.ts | 17 +++++++++++------ translations/ukui-search/tr.ts | 17 +++++++++++------ translations/ukui-search/zh_CN.ts | 17 +++++++++++------ 5 files changed, 37 insertions(+), 21 deletions(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 7164735..82ed0b8 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -329,7 +329,7 @@ void MainWindow::moveToPanel() "/org/ukui/SettingsDaemon/wayland", "org.ukui.SettingsDaemon.wayland", QDBusConnection::sessionBus()); - if (primaryScreenInterface.isValid()) { + if (QDBusReply(primaryScreenInterface.call("x")).isValid()) { QDBusReply x = primaryScreenInterface.call("x"); QDBusReply width = primaryScreenInterface.call("width"); QDBusReply height = primaryScreenInterface.call("height"); diff --git a/src/settings-widget.cpp b/src/settings-widget.cpp index 577f361..ca00704 100644 --- a/src/settings-widget.cpp +++ b/src/settings-widget.cpp @@ -286,7 +286,7 @@ void SettingsWidget::refreshIndexState() void SettingsWidget::onBtnDelClicked(const QString& path) { QMessageBox message(QMessageBox::Question, tr("Search"), tr("Whether to delete this directory?")); QPushButton * buttonYes = message.addButton(tr("Yes"), QMessageBox::YesRole); - QPushButton * buttonNo = message.addButton(tr("No"), QMessageBox::NoRole); + message.addButton(tr("No"), QMessageBox::NoRole); message.exec(); if (message.clickedButton() != buttonYes) { return; @@ -517,6 +517,7 @@ void SettingsWidget::showWarningDialog(const int & errorCode) break; } } - QMessageBox message(QMessageBox::Warning, tr("Search"), errorMessage, QMessageBox::Ok, this); + QMessageBox message(QMessageBox::Warning, tr("Search"), errorMessage); + message.addButton(tr("OK"), QMessageBox::AcceptRole); message.exec(); } diff --git a/translations/ukui-search/bo.ts b/translations/ukui-search/bo.ts index 7dd4a25..4d225c4 100644 --- a/translations/ukui-search/bo.ts +++ b/translations/ukui-search/bo.ts @@ -121,7 +121,7 @@ QObject - + ukui-search is already running! @@ -137,27 +137,27 @@ SearchDetailView - + Path - + Last time modified - + Application - + Introduction: %1 - + Document @@ -317,6 +317,11 @@ Set blocked folder failed! + + + OK + + ShowMoreLabel diff --git a/translations/ukui-search/tr.ts b/translations/ukui-search/tr.ts index 146e6d2..5273c3b 100644 --- a/translations/ukui-search/tr.ts +++ b/translations/ukui-search/tr.ts @@ -121,7 +121,7 @@ QObject - + ukui-search is already running! ukui-bul zaten çalışıyor! @@ -137,27 +137,27 @@ SearchDetailView - + Path Yol - + Last time modified Son değiştirilme zamanı - + Application Uygulama - + Introduction: %1 - + Document Belge @@ -321,6 +321,11 @@ Set blocked folder failed! + + + OK + + ShowMoreLabel diff --git a/translations/ukui-search/zh_CN.ts b/translations/ukui-search/zh_CN.ts index f1afd6a..5cf8bda 100644 --- a/translations/ukui-search/zh_CN.ts +++ b/translations/ukui-search/zh_CN.ts @@ -121,7 +121,7 @@ QObject - + ukui-search is already running! @@ -137,27 +137,27 @@ SearchDetailView - + Path 路径 - + Last time modified 上次修改时间 - + Application 应用 - + Introduction: %1 软件介绍: %1 - + Document 文件 @@ -272,6 +272,11 @@ Set blocked folder failed! + + + OK + 好的 + Creating ...