fix(frontend): Complete translations.

Description: 修复提示框按钮未汉化问题

Log: 修复提示框按钮未汉化问题
Bug: http://172.17.66.192/biz/bug-view-38128.html
This commit is contained in:
zhangjiaping 2021-03-16 11:05:21 +08:00
parent ba393697fd
commit ad04389bd5
5 changed files with 37 additions and 21 deletions

View File

@ -329,7 +329,7 @@ void MainWindow::moveToPanel()
"/org/ukui/SettingsDaemon/wayland",
"org.ukui.SettingsDaemon.wayland",
QDBusConnection::sessionBus());
if (primaryScreenInterface.isValid()) {
if (QDBusReply<int>(primaryScreenInterface.call("x")).isValid()) {
QDBusReply<int> x = primaryScreenInterface.call("x");
QDBusReply<int> width = primaryScreenInterface.call("width");
QDBusReply<int> height = primaryScreenInterface.call("height");

View File

@ -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();
}

View File

@ -121,7 +121,7 @@
<context>
<name>QObject</name>
<message>
<location filename="../../src/main.cpp" line="171"/>
<location filename="../../src/main.cpp" line="182"/>
<source>ukui-search is already running!</source>
<translation type="unfinished"></translation>
</message>
@ -137,27 +137,27 @@
<context>
<name>SearchDetailView</name>
<message>
<location filename="../../src/control/search-detail-view.cpp" line="490"/>
<location filename="../../src/control/search-detail-view.cpp" line="494"/>
<source>Path</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/control/search-detail-view.cpp" line="498"/>
<location filename="../../src/control/search-detail-view.cpp" line="502"/>
<source>Last time modified</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/control/search-detail-view.cpp" line="216"/>
<location filename="../../src/control/search-detail-view.cpp" line="220"/>
<source>Application</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/control/search-detail-view.cpp" line="197"/>
<location filename="../../src/control/search-detail-view.cpp" line="201"/>
<source>Introduction: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/control/search-detail-view.cpp" line="335"/>
<location filename="../../src/control/search-detail-view.cpp" line="339"/>
<source>Document</source>
<translation type="unfinished"></translation>
</message>
@ -317,6 +317,11 @@
<source>Set blocked folder failed!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="521"/>
<source>OK</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ShowMoreLabel</name>

View File

@ -121,7 +121,7 @@
<context>
<name>QObject</name>
<message>
<location filename="../../src/main.cpp" line="171"/>
<location filename="../../src/main.cpp" line="182"/>
<source>ukui-search is already running!</source>
<translation>ukui-bul zaten çalışıyor!</translation>
</message>
@ -137,27 +137,27 @@
<context>
<name>SearchDetailView</name>
<message>
<location filename="../../src/control/search-detail-view.cpp" line="490"/>
<location filename="../../src/control/search-detail-view.cpp" line="494"/>
<source>Path</source>
<translation>Yol</translation>
</message>
<message>
<location filename="../../src/control/search-detail-view.cpp" line="498"/>
<location filename="../../src/control/search-detail-view.cpp" line="502"/>
<source>Last time modified</source>
<translation>Son değiştirilme zamanı</translation>
</message>
<message>
<location filename="../../src/control/search-detail-view.cpp" line="216"/>
<location filename="../../src/control/search-detail-view.cpp" line="220"/>
<source>Application</source>
<translation>Uygulama</translation>
</message>
<message>
<location filename="../../src/control/search-detail-view.cpp" line="197"/>
<location filename="../../src/control/search-detail-view.cpp" line="201"/>
<source>Introduction: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/control/search-detail-view.cpp" line="335"/>
<location filename="../../src/control/search-detail-view.cpp" line="339"/>
<source>Document</source>
<translation>Belge</translation>
</message>
@ -321,6 +321,11 @@
<source>Set blocked folder failed!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="521"/>
<source>OK</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ShowMoreLabel</name>

View File

@ -121,7 +121,7 @@
<context>
<name>QObject</name>
<message>
<location filename="../../src/main.cpp" line="171"/>
<location filename="../../src/main.cpp" line="182"/>
<source>ukui-search is already running!</source>
<translation></translation>
</message>
@ -137,27 +137,27 @@
<context>
<name>SearchDetailView</name>
<message>
<location filename="../../src/control/search-detail-view.cpp" line="490"/>
<location filename="../../src/control/search-detail-view.cpp" line="494"/>
<source>Path</source>
<translation></translation>
</message>
<message>
<location filename="../../src/control/search-detail-view.cpp" line="498"/>
<location filename="../../src/control/search-detail-view.cpp" line="502"/>
<source>Last time modified</source>
<translation></translation>
</message>
<message>
<location filename="../../src/control/search-detail-view.cpp" line="216"/>
<location filename="../../src/control/search-detail-view.cpp" line="220"/>
<source>Application</source>
<translation></translation>
</message>
<message>
<location filename="../../src/control/search-detail-view.cpp" line="197"/>
<location filename="../../src/control/search-detail-view.cpp" line="201"/>
<source>Introduction: %1</source>
<translation>: %1</translation>
</message>
<message>
<location filename="../../src/control/search-detail-view.cpp" line="335"/>
<location filename="../../src/control/search-detail-view.cpp" line="339"/>
<source>Document</source>
<translation></translation>
</message>
@ -272,6 +272,11 @@
<source>Set blocked folder failed!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="521"/>
<source>OK</source>
<translation></translation>
</message>
<message>
<location filename="../../src/settings-widget.cpp" line="348"/>
<source>Creating ...</source>