合并需求21788&&更新翻译

This commit is contained in:
jzxc95 2023-04-21 14:39:22 +08:00
parent f86de2446c
commit 2dd16487c8
38 changed files with 295 additions and 93 deletions

View File

@ -12,12 +12,3 @@ TRANSLATIONS += \
translations/kylin-nm_tr.ts \
translations/kylin-nm_bo.ts \
translations/kylin-nm_bo_CN.ts
CONFIG(release, debug|release) {
!system($$PWD/translate_generation.sh): error("Failed to generate translation")
}
qm_files.path = $${PREFIX}/share/kylin-nm/kylin-nm/
qm_files.files = translations/*.qm
INSTALLS += qm_files \

View File

@ -4,6 +4,11 @@ CONFIG += plugin
TARGET = $$qtLibraryTarget(mobilehotspot)
DESTDIR = ../..
CONFIG(release, debug|release) {
!system($$PWD/translate_generation.sh): error("Failed to generate translation")
}
target.path = $$[QT_INSTALL_LIBS]/ukui-control-center
trans.files = translations/*
trans.path = /usr/share/kylin-nm/mobilehotspot/

View File

@ -114,10 +114,12 @@ MobileHotspotWidget::MobileHotspotWidget(QWidget *parent) : QWidget(parent)
m_Vlayout->addStretch();
connect(m_switchBtn, &KSwitchButton::stateChanged, this, &MobileHotspotWidget::setUiEnabled);
connect(m_interfaceComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &MobileHotspotWidget::onInterfaceChanged);
connect(m_interfaceComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged), this, [=]() {
m_interfaceName = m_interfaceComboBox->currentText();
updateBandCombox();
});
onInterfaceChanged();
#ifdef HOTSPOT_CONTROL
m_connectDevPage->refreshStalist();
@ -304,6 +306,47 @@ void MobileHotspotWidget::onPwdTextChanged()
this->update();
}
void MobileHotspotWidget::onInterfaceChanged()
{
m_interfaceName = m_interfaceComboBox->currentText();
if(m_interface->isValid()) {
QDBusMessage result = m_interface->call(QStringLiteral("getWirelessList"));
if(result.type() == QDBusMessage::ErrorMessage)
{
qWarning() << "getWirelessList error:" << result.errorMessage();
return;
}
bool flag = false;
auto dbusArg = result.arguments().at(0).value<QDBusArgument>();
QMap<QString, QVector<QStringList>> variantList;
dbusArg >> variantList;
if (variantList.size() != 0) {
QMap<QString, QVector<QStringList>>::iterator iter;
for (iter = variantList.begin(); iter != variantList.end(); iter++) {
if (m_interfaceName == iter.key()) {
QVector<QStringList> wlanListInfo = iter.value();
if (!wlanListInfo.isEmpty() && wlanListInfo.at(0).size() > 1) {
flag = true;
}
break;
}
}
}
if (flag) {
m_interfaceWarnLabel->setText(tr("use ") + m_interfaceName +
tr(" share network, will interrupt local wireless connection"));
m_interfaceFrame->setFixedHeight(PASSWORD_FRAME_FIX_HIGHT);
m_warnWidget->show();
} else {
m_interfaceFrame->setFixedHeight(PASSWORD_FRAME_MIN_HIGHT);
m_warnWidget->hide();
}
resetFrameSize();
}
updateBandCombox();
}
void MobileHotspotWidget::onActiveConnectionChanged(QString deviceName, QString ssid, QString uuid, int status)
{
if(m_uuid == uuid && status == 4) {
@ -312,11 +355,14 @@ void MobileHotspotWidget::onActiveConnectionChanged(QString deviceName, QString
setUiEnabled(false);
m_uuid.clear();
}
if (m_interfaceComboBox) {
onInterfaceChanged();
}
}
void MobileHotspotWidget::onWirelessBtnChanged(bool state)
{
if (!state) {
if (!state) {
m_switchBtn->setChecked(state);
m_uuid.clear();
m_switchBtn->setCheckable(false);
@ -537,25 +583,55 @@ void MobileHotspotWidget::setInterFaceFrame()
/* key tips */
m_interfaceFrame = new QFrame(this);
m_interfaceFrame->setFrameShape(QFrame::Shape::NoFrame);
m_interfaceFrame->setMinimumSize(FRAME_MIN_SIZE);
m_interfaceFrame->setMaximumSize(CONTECT_FRAME_MAX_SIZE);
QHBoxLayout *interfaceHLayout = new QHBoxLayout(m_interfaceFrame);
m_interfaceFrame->setMinimumSize(PASSWORD_FRAME_MIN_SIZE);
m_interfaceFrame->setMaximumSize(PASSWORD_FRAME_MAX_SIZE);
m_interfaceLabel = new QLabel(tr("Net card"), this);
m_interfaceLabel->setMinimumWidth(LABLE_MIN_WIDTH);
m_interfaceComboBox = new QComboBox(this);
m_interfaceComboBox->setInsertPolicy(QComboBox::NoInsert);
m_interfaceComboBox->setMinimumWidth(COMBOBOX_MIN_WIDTH);
m_interfaceComboBox->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Fixed);
interfaceHLayout->setContentsMargins(ITEM_MARGINS);
interfaceHLayout->setSpacing(0);
interfaceHLayout->addWidget(m_interfaceLabel);
interfaceHLayout->addWidget(m_interfaceComboBox);
m_interfaceFrame->setLayout(interfaceHLayout);
m_warnWidget = new QWidget(this);
m_warnWidget->setFixedHeight(20);
m_warnWidget->setContentsMargins(8,0,0,0);
QHBoxLayout *warnTextHLayout = new QHBoxLayout(m_warnWidget);
QLabel* warnIcon = new QLabel(this);
warnIcon->setContentsMargins(0,0,0,0);
warnIcon->setPixmap(QIcon::fromTheme("dialog-warning").pixmap(16,16));
m_interfaceWarnLabel= new QLabel(this);
m_interfaceWarnLabel->setFixedHeight(20);
m_interfaceWarnLabel->setContentsMargins(HINT_TEXT_MARGINS);
QPalette hintTextColor;
hintTextColor.setColor(QPalette::WindowText, Qt::red);
m_interfaceWarnLabel->setPalette(hintTextColor);
warnTextHLayout->setSpacing(8);
warnTextHLayout->setContentsMargins(0,0,0,0);
warnTextHLayout->addWidget(warnIcon);
warnTextHLayout->addWidget(m_interfaceWarnLabel);
warnTextHLayout->addStretch();
m_warnWidget->setLayout(warnTextHLayout);
QWidget *pwdInputWidget = new QWidget(m_interfaceFrame);
QVBoxLayout *pwdInputVLayout = new QVBoxLayout(pwdInputWidget);
pwdInputVLayout->setContentsMargins(CONTENTS_MARGINS);
pwdInputVLayout->setSpacing(0);
pwdInputVLayout->addWidget(m_interfaceComboBox);
pwdInputVLayout->addWidget(m_warnWidget);
QFormLayout *interfaceFLayout = new QFormLayout(m_interfaceFrame);
interfaceFLayout->setContentsMargins(PASSWORD_ITEM_MARGINS);
interfaceFLayout->setSpacing(0);
interfaceFLayout->addRow(m_interfaceLabel, pwdInputWidget);
m_interfaceFrame->setLayout(interfaceFLayout);
m_warnWidget->hide();
}
void MobileHotspotWidget::onActivateFailed(QString errorMessage)
{
if (errorMessage.indexOf("hotspot")) {

View File

@ -87,6 +87,9 @@ private:
QComboBox *m_freqBandComboBox;
QComboBox *m_interfaceComboBox;
QLabel *m_interfaceWarnLabel;
QWidget* m_warnWidget;
QDBusInterface *m_interface = nullptr;
QString m_interfaceName = "";
@ -158,6 +161,8 @@ private slots:
void onApLineEditTextEdit(QString text);
void onPwdTextChanged();
void onInterfaceChanged();
};
#endif // MOBILEHOTSPOTWIDGET_H

View File

@ -1 +0,0 @@
<クd<>箆!ソ`。スン

View File

@ -66,59 +66,69 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="149"/>
<location filename="../mobilehotspotwidget.cpp" line="151"/>
<source>wirless switch is close or no wireless device</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="169"/>
<location filename="../mobilehotspotwidget.cpp" line="171"/>
<source>hotpots name or device is invalid</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="490"/>
<location filename="../mobilehotspotwidget.cpp" line="536"/>
<source>Contains at least 8 characters</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="223"/>
<location filename="../mobilehotspotwidget.cpp" line="225"/>
<source>Hotspot</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="310"/>
<location filename="../mobilehotspotwidget.cpp" line="605"/>
<location filename="../mobilehotspotwidget.cpp" line="336"/>
<source>use </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="337"/>
<source> share network, will interrupt local wireless connection</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="353"/>
<location filename="../mobilehotspotwidget.cpp" line="681"/>
<source>hotspot already close</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="436"/>
<location filename="../mobilehotspotwidget.cpp" line="482"/>
<source>Open</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="457"/>
<location filename="../mobilehotspotwidget.cpp" line="503"/>
<source>Wi-Fi Name</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="478"/>
<location filename="../mobilehotspotwidget.cpp" line="524"/>
<source>Password</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="519"/>
<location filename="../mobilehotspotwidget.cpp" line="565"/>
<source>Frequency band</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="545"/>
<location filename="../mobilehotspotwidget.cpp" line="589"/>
<source>Net card</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="635"/>
<location filename="../mobilehotspotwidget.cpp" line="643"/>
<location filename="../mobilehotspotwidget.cpp" line="711"/>
<location filename="../mobilehotspotwidget.cpp" line="719"/>
<source>hotspot already open</source>
<translation type="unfinished"></translation>
</message>

View File

@ -66,7 +66,7 @@
<translation>ukui </translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="149"/>
<location filename="../mobilehotspotwidget.cpp" line="151"/>
<source>wirless switch is close or no wireless device</source>
<translation></translation>
</message>
@ -75,7 +75,7 @@
<translation type="vanished"></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="169"/>
<location filename="../mobilehotspotwidget.cpp" line="171"/>
<source>hotpots name or device is invalid</source>
<translation></translation>
</message>
@ -88,49 +88,59 @@
<translation type="vanished"> </translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="490"/>
<location filename="../mobilehotspotwidget.cpp" line="536"/>
<source>Contains at least 8 characters</source>
<translation></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="223"/>
<location filename="../mobilehotspotwidget.cpp" line="225"/>
<source>Hotspot</source>
<translation></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="310"/>
<location filename="../mobilehotspotwidget.cpp" line="605"/>
<location filename="../mobilehotspotwidget.cpp" line="336"/>
<source>use </source>
<translation></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="337"/>
<source> share network, will interrupt local wireless connection</source>
<translation></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="353"/>
<location filename="../mobilehotspotwidget.cpp" line="681"/>
<source>hotspot already close</source>
<translation></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="436"/>
<location filename="../mobilehotspotwidget.cpp" line="482"/>
<source>Open</source>
<translation></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="457"/>
<location filename="../mobilehotspotwidget.cpp" line="503"/>
<source>Wi-Fi Name</source>
<translation>Wi-Fiཡི</translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="478"/>
<location filename="../mobilehotspotwidget.cpp" line="524"/>
<source>Password</source>
<translation></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="519"/>
<location filename="../mobilehotspotwidget.cpp" line="565"/>
<source>Frequency band</source>
<translation></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="545"/>
<location filename="../mobilehotspotwidget.cpp" line="589"/>
<source>Net card</source>
<translation></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="635"/>
<location filename="../mobilehotspotwidget.cpp" line="643"/>
<location filename="../mobilehotspotwidget.cpp" line="711"/>
<location filename="../mobilehotspotwidget.cpp" line="719"/>
<source>hotspot already open</source>
<translation></translation>
</message>

View File

@ -66,59 +66,69 @@
<translation>ukui control center desktop message</translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="149"/>
<location filename="../mobilehotspotwidget.cpp" line="151"/>
<source>wirless switch is close or no wireless device</source>
<translation>wirless switch is close or no wireless device</translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="169"/>
<location filename="../mobilehotspotwidget.cpp" line="171"/>
<source>hotpots name or device is invalid</source>
<translation>hotpots name or device is invalid</translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="223"/>
<location filename="../mobilehotspotwidget.cpp" line="225"/>
<source>Hotspot</source>
<translation>Hotspot</translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="310"/>
<location filename="../mobilehotspotwidget.cpp" line="605"/>
<location filename="../mobilehotspotwidget.cpp" line="336"/>
<source>use </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="337"/>
<source> share network, will interrupt local wireless connection</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="353"/>
<location filename="../mobilehotspotwidget.cpp" line="681"/>
<source>hotspot already close</source>
<translation>hotspot already close</translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="436"/>
<location filename="../mobilehotspotwidget.cpp" line="482"/>
<source>Open</source>
<translation>Open</translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="457"/>
<location filename="../mobilehotspotwidget.cpp" line="503"/>
<source>Wi-Fi Name</source>
<translation>Wi-Fi Name</translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="478"/>
<location filename="../mobilehotspotwidget.cpp" line="524"/>
<source>Password</source>
<translation>Password</translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="490"/>
<location filename="../mobilehotspotwidget.cpp" line="536"/>
<source>Contains at least 8 characters</source>
<translation>Contains at least 8 characters</translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="519"/>
<location filename="../mobilehotspotwidget.cpp" line="565"/>
<source>Frequency band</source>
<translation>Frequency band</translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="545"/>
<location filename="../mobilehotspotwidget.cpp" line="589"/>
<source>Net card</source>
<translation>Net card</translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="635"/>
<location filename="../mobilehotspotwidget.cpp" line="643"/>
<location filename="../mobilehotspotwidget.cpp" line="711"/>
<location filename="../mobilehotspotwidget.cpp" line="719"/>
<source>hotspot already open</source>
<translation>hotspot already open</translation>
</message>

View File

@ -1 +0,0 @@
<クd<>箆!ソ`。スン

View File

@ -66,59 +66,69 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="149"/>
<location filename="../mobilehotspotwidget.cpp" line="151"/>
<source>wirless switch is close or no wireless device</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="169"/>
<location filename="../mobilehotspotwidget.cpp" line="171"/>
<source>hotpots name or device is invalid</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="490"/>
<location filename="../mobilehotspotwidget.cpp" line="536"/>
<source>Contains at least 8 characters</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="223"/>
<location filename="../mobilehotspotwidget.cpp" line="225"/>
<source>Hotspot</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="310"/>
<location filename="../mobilehotspotwidget.cpp" line="605"/>
<location filename="../mobilehotspotwidget.cpp" line="336"/>
<source>use </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="337"/>
<source> share network, will interrupt local wireless connection</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="353"/>
<location filename="../mobilehotspotwidget.cpp" line="681"/>
<source>hotspot already close</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="436"/>
<location filename="../mobilehotspotwidget.cpp" line="482"/>
<source>Open</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="457"/>
<location filename="../mobilehotspotwidget.cpp" line="503"/>
<source>Wi-Fi Name</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="478"/>
<location filename="../mobilehotspotwidget.cpp" line="524"/>
<source>Password</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="519"/>
<location filename="../mobilehotspotwidget.cpp" line="565"/>
<source>Frequency band</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="545"/>
<location filename="../mobilehotspotwidget.cpp" line="589"/>
<source>Net card</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="635"/>
<location filename="../mobilehotspotwidget.cpp" line="643"/>
<location filename="../mobilehotspotwidget.cpp" line="711"/>
<location filename="../mobilehotspotwidget.cpp" line="719"/>
<source>hotspot already open</source>
<translation type="unfinished"></translation>
</message>

View File

@ -66,7 +66,7 @@
<translation></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="149"/>
<location filename="../mobilehotspotwidget.cpp" line="151"/>
<source>wirless switch is close or no wireless device</source>
<translation>线线</translation>
</message>
@ -75,7 +75,7 @@
<translation type="vanished"></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="169"/>
<location filename="../mobilehotspotwidget.cpp" line="171"/>
<source>hotpots name or device is invalid</source>
<translation></translation>
</message>
@ -88,49 +88,59 @@
<translation type="vanished"></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="490"/>
<location filename="../mobilehotspotwidget.cpp" line="536"/>
<source>Contains at least 8 characters</source>
<translation>8</translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="223"/>
<location filename="../mobilehotspotwidget.cpp" line="225"/>
<source>Hotspot</source>
<translation></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="310"/>
<location filename="../mobilehotspotwidget.cpp" line="605"/>
<location filename="../mobilehotspotwidget.cpp" line="336"/>
<source>use </source>
<translation>使</translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="337"/>
<source> share network, will interrupt local wireless connection</source>
<translation>线</translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="353"/>
<location filename="../mobilehotspotwidget.cpp" line="681"/>
<source>hotspot already close</source>
<translation></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="436"/>
<location filename="../mobilehotspotwidget.cpp" line="482"/>
<source>Open</source>
<translation></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="457"/>
<location filename="../mobilehotspotwidget.cpp" line="503"/>
<source>Wi-Fi Name</source>
<translation>Wi-Fi名称</translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="478"/>
<location filename="../mobilehotspotwidget.cpp" line="524"/>
<source>Password</source>
<translation></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="519"/>
<location filename="../mobilehotspotwidget.cpp" line="565"/>
<source>Frequency band</source>
<translation></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="545"/>
<location filename="../mobilehotspotwidget.cpp" line="589"/>
<source>Net card</source>
<translation></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="635"/>
<location filename="../mobilehotspotwidget.cpp" line="643"/>
<location filename="../mobilehotspotwidget.cpp" line="711"/>
<location filename="../mobilehotspotwidget.cpp" line="719"/>
<source>hotspot already open</source>
<translation></translation>
</message>

View File

@ -7,6 +7,11 @@ include(../component/addbtn.pri)
TARGET = $$qtLibraryTarget(netconnect)
DESTDIR = ../..
CONFIG(release, debug|release) {
!system($$PWD/translate_generation.sh): error("Failed to generate translation")
}
target.path = $$[QT_INSTALL_LIBS]/ukui-control-center
trans.files = translations/*
trans.path = /usr/share/kylin-nm/netconnect/

View File

@ -0,0 +1,15 @@
#!/bin/bash
ts_list=(`ls translations/*.ts`)
source /etc/os-release
version=(`echo $ID`)
for ts in "${ts_list[@]}"
do
printf "\nprocess ${ts}\n"
if [ "$version" == "fedora" ] || [ "$version" == "opensuse-leap" ] || [ "$version" == "opensuse-tumbleweed" ];then
lrelease-qt5 "${ts}"
else
lrelease "${ts}"
fi
done

View File

@ -1 +0,0 @@
<クd<>箆!ソ`。スン

View File

@ -1 +0,0 @@
<クd<>箆!ソ`。スン

View File

@ -7,6 +7,11 @@ CONFIG += plugin
TARGET = $$qtLibraryTarget(proxy)
DESTDIR = ../..
CONFIG(release, debug|release) {
!system($$PWD/translate_generation.sh): error("Failed to generate translation")
}
target.path = $$[QT_INSTALL_LIBS]/ukui-control-center
trans.files = translations/*
trans.path = /usr/share/kylin-nm/proxy/

View File

@ -0,0 +1,15 @@
#!/bin/bash
ts_list=(`ls translations/*.ts`)
source /etc/os-release
version=(`echo $ID`)
for ts in "${ts_list[@]}"
do
printf "\nprocess ${ts}\n"
if [ "$version" == "fedora" ] || [ "$version" == "opensuse-leap" ] || [ "$version" == "opensuse-tumbleweed" ];then
lrelease-qt5 "${ts}"
else
lrelease "${ts}"
fi
done

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,15 @@
#!/bin/bash
ts_list=(`ls translations/*.ts`)
source /etc/os-release
version=(`echo $ID`)
for ts in "${ts_list[@]}"
do
printf "\nprocess ${ts}\n"
if [ "$version" == "fedora" ] || [ "$version" == "opensuse-leap" ] || [ "$version" == "opensuse-tumbleweed" ];then
lrelease-qt5 "${ts}"
else
lrelease "${ts}"
fi
done

View File

@ -1 +0,0 @@
<クd<>箆!ソ`。スン

View File

@ -1 +0,0 @@
<クd<>箆!ソ`。スン

View File

@ -7,6 +7,11 @@ include(../component/addbtn.pri)
TARGET = $$qtLibraryTarget(wlanconnect)
DESTDIR = ../..
CONFIG(release, debug|release) {
!system($$PWD/translate_generation.sh): error("Failed to generate translation")
}
target.path = $$[QT_INSTALL_LIBS]/ukui-control-center
trans.files = translations/*
trans.path = /usr/share/kylin-nm/wlanconnect/

View File

@ -21,16 +21,23 @@ INCLUDEPATH += /usr/include/KF5/NetworkManagerQt
LIBS += -L/usr/lib/ -lgsettings-qt -lX11 -lKF5NetworkManagerQt -lukui-log4qt -lkysec
CONFIG(release, debug|release) {
!system($$PWD/translate_generation.sh): error("Failed to generate translation")
}
target.path = /usr/bin
target.source += $$TARGET
desktop.path = /etc/xdg/autostart/
desktop.files = kylin-nm.desktop
gschema.files = org.ukui.kylin-nm.switch.gschema.xml
gschema.path = /usr/share/glib-2.0/schemas/
qm_files.path = $${PREFIX}/share/kylin-nm/kylin-nm/
qm_files.files = translations/*.qm
INSTALLS += target \
desktop \
gschema \
qm_files \
# The following define makes your compiler emit warnings if you use
# any feature of Qt which has been marked as deprecated (the exact warnings

15
src/translate_generation.sh Executable file
View File

@ -0,0 +1,15 @@
#!/bin/bash
ts_list=(`ls translations/*.ts`)
source /etc/os-release
version=(`echo $ID`)
for ts in "${ts_list[@]}"
do
printf "\nprocess ${ts}\n"
if [ "$version" == "fedora" ] || [ "$version" == "opensuse-leap" ] || [ "$version" == "opensuse-tumbleweed" ];then
lrelease-qt5 "${ts}"
else
lrelease "${ts}"
fi
done

View File

@ -1 +0,0 @@
<クd<>箆!ソ`。スン

Binary file not shown.