Skip to content

Commit

Permalink
fix: warning label is not translated
Browse files Browse the repository at this point in the history
Add chinese translation for warn label.

Log: warning label is not translated
  • Loading branch information
asterwyx committed Apr 17, 2024
1 parent 5f402d7 commit 5f736c5
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 7 deletions.
3 changes: 2 additions & 1 deletion dss-network-plugin/network_module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ void NetworkModule::installTranslator(QString locale)
QApplication::installTranslator(&translator);
dde::network::NetworkController::instance()->retranslate();
m_networkHelper->updateTooltips();
m_panelContainer->onPluginStateChanged(m_networkHelper->getPluginState());
}

const QString NetworkModule::connectionMatchName() const
Expand Down Expand Up @@ -482,7 +483,7 @@ NetworkPanelContainer::NetworkPanelContainer(dde::networkplugin::NetworkDialog *
{
m_warnLabel->setFixedWidth(300);
m_warnLabel->setAlignment(Qt::AlignCenter);
m_warnLabel->setContentsMargins(10, 2, 10, 2);
m_warnLabel->setContentsMargins(10, 0, 10, 0);
m_warnLabel->setWordWrap(true);
}

Expand Down
10 changes: 5 additions & 5 deletions dss-network-plugin/network_module.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@ NETWORKPLUGIN_END_NAMESPACE
namespace dss {
namespace module {
class PopupAppletManager;
/**
* @brief The NetworkModule class
* 用于处理插件差异
* NetworkModule处理信号槽有问题,固增加该类
*/
class NetworkPanelContainer : public QWidget
{
Q_OBJECT
Expand All @@ -47,6 +42,11 @@ public Q_SLOTS:
QWidget *m_savedParent;
QWidget *m_contentWidget;
};
/**
* @brief The NetworkModule class
* 用于处理插件差异
* NetworkModule处理信号槽有问题,固增加该类
*/
class NetworkModule : public QObject
{
Q_OBJECT
Expand Down
7 changes: 7 additions & 0 deletions dss-network-plugin/translations/dss-network-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,4 +278,11 @@
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>dss::module::NetworkPanelContainer</name>
<message>
<source>Network cable unplugged</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>
7 changes: 7 additions & 0 deletions dss-network-plugin/translations/dss-network-plugin_en_US.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,4 +276,11 @@
<translation>Wired Connection</translation>
</message>
</context>
<context>
<name>dss::module::NetworkPanelContainer</name>
<message>
<source>Network cable unplugged</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>
9 changes: 8 additions & 1 deletion dss-network-plugin/translations/dss-network-plugin_zh_CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,4 +276,11 @@
<translation>有线连接</translation>
</message>
</context>
</TS>
<context>
<name>dss::module::NetworkPanelContainer</name>
<message>
<source>Network cable unplugged</source>
<translation>未插入网线</translation>
</message>
</context>
</TS>

0 comments on commit 5f736c5

Please sign in to comment.