From 2dd16487c8cc961e781f51ffc2d30c9231a9fb13 Mon Sep 17 00:00:00 2001 From: jzxc95 <907297917@qq.com> Date: Fri, 21 Apr 2023 14:39:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=B9=B6=E9=9C=80=E6=B1=8221788&&?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kylin-nm.pro | 9 -- plugins/mobilehotspot/mobilehotspot.pro | 5 + plugins/mobilehotspot/mobilehotspotwidget.cpp | 100 +++++++++++++++--- plugins/mobilehotspot/mobilehotspotwidget.h | 5 + .../mobilehotspot/translate_generation.sh | 0 plugins/mobilehotspot/translations/bo.qm | 1 - plugins/mobilehotspot/translations/bo.ts | 36 ++++--- plugins/mobilehotspot/translations/bo_CN.qm | Bin 2616 -> 0 bytes plugins/mobilehotspot/translations/bo_CN.ts | 36 ++++--- plugins/mobilehotspot/translations/en_US.ts | 36 ++++--- plugins/mobilehotspot/translations/tr.qm | 1 - plugins/mobilehotspot/translations/tr.ts | 36 ++++--- plugins/mobilehotspot/translations/zh_CN.qm | Bin 1698 -> 0 bytes plugins/mobilehotspot/translations/zh_CN.ts | 36 ++++--- plugins/netconnect/netconnect.pro | 5 + plugins/netconnect/translate_generation.sh | 15 +++ plugins/netconnect/translations/bo.qm | 1 - plugins/netconnect/translations/bo_CN.qm | Bin 1159 -> 0 bytes plugins/netconnect/translations/tr.qm | 1 - plugins/netconnect/translations/zh_CN.qm | Bin 711 -> 0 bytes plugins/proxy/proxy.pro | 5 + plugins/proxy/translate_generation.sh | 15 +++ plugins/proxy/translations/bo_CN.qm | Bin 3755 -> 0 bytes plugins/proxy/translations/zh_CN.qm | Bin 2357 -> 0 bytes plugins/wlanconnect/translate_generation.sh | 15 +++ plugins/wlanconnect/translations/bo.qm | 1 - plugins/wlanconnect/translations/bo_CN.qm | Bin 1046 -> 0 bytes plugins/wlanconnect/translations/tr.qm | 1 - plugins/wlanconnect/translations/zh_CN.qm | Bin 664 -> 0 bytes plugins/wlanconnect/wlanconnect.pro | 5 + src/src.pro | 7 ++ src/translate_generation.sh | 15 +++ src/translations/kylin-nm_bo.qm | 1 - .../translations}/kylin-nm_bo.ts | 0 .../translations}/kylin-nm_bo_CN.ts | 0 src/translations/kylin-nm_tr.qm | Bin 21755 -> 0 bytes .../translations}/kylin-nm_tr.ts | 0 .../translations}/kylin-nm_zh_CN.ts | 0 38 files changed, 295 insertions(+), 93 deletions(-) rename translate_generation.sh => plugins/mobilehotspot/translate_generation.sh (100%) delete mode 100644 plugins/mobilehotspot/translations/bo.qm delete mode 100644 plugins/mobilehotspot/translations/bo_CN.qm delete mode 100644 plugins/mobilehotspot/translations/tr.qm delete mode 100644 plugins/mobilehotspot/translations/zh_CN.qm create mode 100755 plugins/netconnect/translate_generation.sh delete mode 100644 plugins/netconnect/translations/bo.qm delete mode 100644 plugins/netconnect/translations/bo_CN.qm delete mode 100644 plugins/netconnect/translations/tr.qm delete mode 100644 plugins/netconnect/translations/zh_CN.qm create mode 100755 plugins/proxy/translate_generation.sh delete mode 100644 plugins/proxy/translations/bo_CN.qm delete mode 100644 plugins/proxy/translations/zh_CN.qm create mode 100755 plugins/wlanconnect/translate_generation.sh delete mode 100644 plugins/wlanconnect/translations/bo.qm delete mode 100644 plugins/wlanconnect/translations/bo_CN.qm delete mode 100644 plugins/wlanconnect/translations/tr.qm delete mode 100644 plugins/wlanconnect/translations/zh_CN.qm create mode 100755 src/translate_generation.sh delete mode 100644 src/translations/kylin-nm_bo.qm rename {translations => src/translations}/kylin-nm_bo.ts (100%) rename {translations => src/translations}/kylin-nm_bo_CN.ts (100%) delete mode 100644 src/translations/kylin-nm_tr.qm rename {translations => src/translations}/kylin-nm_tr.ts (100%) rename {translations => src/translations}/kylin-nm_zh_CN.ts (100%) diff --git a/kylin-nm.pro b/kylin-nm.pro index 1f13a7c2..7b52af76 100644 --- a/kylin-nm.pro +++ b/kylin-nm.pro @@ -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 \ diff --git a/plugins/mobilehotspot/mobilehotspot.pro b/plugins/mobilehotspot/mobilehotspot.pro index 90c84dab..a8dabae3 100644 --- a/plugins/mobilehotspot/mobilehotspot.pro +++ b/plugins/mobilehotspot/mobilehotspot.pro @@ -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/ diff --git a/plugins/mobilehotspot/mobilehotspotwidget.cpp b/plugins/mobilehotspot/mobilehotspotwidget.cpp index a03a2af1..15884bac 100644 --- a/plugins/mobilehotspot/mobilehotspotwidget.cpp +++ b/plugins/mobilehotspot/mobilehotspotwidget.cpp @@ -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::of(&QComboBox::currentIndexChanged), this, &MobileHotspotWidget::onInterfaceChanged); connect(m_interfaceComboBox, QOverload::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(); + QMap> variantList; + dbusArg >> variantList; + if (variantList.size() != 0) { + QMap>::iterator iter; + for (iter = variantList.begin(); iter != variantList.end(); iter++) { + if (m_interfaceName == iter.key()) { + QVector 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")) { diff --git a/plugins/mobilehotspot/mobilehotspotwidget.h b/plugins/mobilehotspot/mobilehotspotwidget.h index 13b29d9d..1df3d86a 100644 --- a/plugins/mobilehotspot/mobilehotspotwidget.h +++ b/plugins/mobilehotspot/mobilehotspotwidget.h @@ -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 diff --git a/translate_generation.sh b/plugins/mobilehotspot/translate_generation.sh similarity index 100% rename from translate_generation.sh rename to plugins/mobilehotspot/translate_generation.sh diff --git a/plugins/mobilehotspot/translations/bo.qm b/plugins/mobilehotspot/translations/bo.qm deleted file mode 100644 index be651eed..00000000 --- a/plugins/mobilehotspot/translations/bo.qm +++ /dev/null @@ -1 +0,0 @@ - - + wirless switch is close or no wireless device - + hotpots name or device is invalid - + Contains at least 8 characters - + Hotspot - - + + use + + + + + share network, will interrupt local wireless connection + + + + + hotspot already close - + Open - + Wi-Fi Name - + Password - + Frequency band - + Net card - - + + hotspot already open diff --git a/plugins/mobilehotspot/translations/bo_CN.qm b/plugins/mobilehotspot/translations/bo_CN.qm deleted file mode 100644 index b9da303bb534ccfb76ae8d0bd16391ba92ce54aa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2616 zcma)8U1%It7`@GZvPmu^srZN7qLzxyOA%2~NY`~qp~j8bY)VDlyR&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.ts b/plugins/mobilehotspot/translations/bo_CN.ts index f2f82810..62f15d7a 100644 --- a/plugins/mobilehotspot/translations/bo_CN.ts +++ b/plugins/mobilehotspot/translations/bo_CN.ts @@ -66,7 +66,7 @@ ukui ཚོད་འཛིན་ལྟེ་གནས་ཀྱི་ཅོག་ངོས་ཆ་འཕྲིན། - + wirless switch is close or no wireless device སྐུད་མེད་གློག་སྒོ་རྒྱག་པའམ་ཡང་ན་སྐུད་མེད་སྒྲིག་ཆས་མེད་པ། @@ -75,7 +75,7 @@ སྒོ་རྒྱག་འགོ་བརྩམས། - + hotpots name or device is invalid ཚ་བ་ཆེ་བའི་མིང་ངམ་སྒྲིག་ཆས་ལ་ནུས་པ་མེད། @@ -88,49 +88,59 @@ ཀུན་གྱིས་དོ་སྣང་བྱེད་ཡུལ་གསར་སྐྲུན་བྱེད་འགོ་ - + Contains at least 8 characters མ་མཐར་ཡང་ཡིག་རྟགས་བརྒྱད་འདུས་ཡོད། - + Hotspot ཚ་བ་ཆེ་བ། - - + + use + བེད་སྤྱོད། + + + + share network, will interrupt local wireless connection + གླེང་མང་མཉམ་སྤྱོད་བྱས་ནས་འཕྲུལ་ཆས་ཀྱི་སྐུད་མེད་དྲ་བ་སྦྲེལ་མཐུད་བྱེད་ངེས་རེད། + + + + hotspot already close ཚ་བ་ཆེ་བའི་གནད་དོན་ཐག་ཉེ་རུ་སོང་ཡོད། - + Open སྒོ་ཕྱེ་བ། - + Wi-Fi Name Wi-Fiཡི་མིང་། - + Password གསང་གྲངས། - + Frequency band ཐེངས་གྲངས་ཀྱི་རོལ་ཆའི་རུ་ཁག - + Net card དྲ་རྒྱའི་བྱང་བུ། - - + + hotspot already open ཚ་བ་ཆེ་བའི་གནད་དོན་དེ་སྒོ་ཕྱེ་ཟིན། diff --git a/plugins/mobilehotspot/translations/en_US.ts b/plugins/mobilehotspot/translations/en_US.ts index bb4f55f3..63bf4aaa 100644 --- a/plugins/mobilehotspot/translations/en_US.ts +++ b/plugins/mobilehotspot/translations/en_US.ts @@ -66,59 +66,69 @@ ukui control center desktop message - + wirless switch is close or no wireless device wirless switch is close or no wireless device - + hotpots name or device is invalid hotpots name or device is invalid - + Hotspot Hotspot - - + + use + + + + + share network, will interrupt local wireless connection + + + + + hotspot already close hotspot already close - + Open Open - + Wi-Fi Name Wi-Fi Name - + Password Password - + Contains at least 8 characters Contains at least 8 characters - + Frequency band Frequency band - + Net card Net card - - + + hotspot already open hotspot already open diff --git a/plugins/mobilehotspot/translations/tr.qm b/plugins/mobilehotspot/translations/tr.qm deleted file mode 100644 index be651eed..00000000 --- a/plugins/mobilehotspot/translations/tr.qm +++ /dev/null @@ -1 +0,0 @@ - - + wirless switch is close or no wireless device - + hotpots name or device is invalid - + Contains at least 8 characters - + Hotspot - - + + use + + + + + share network, will interrupt local wireless connection + + + + + hotspot already close - + Open - + Wi-Fi Name - + Password - + Frequency band - + Net card - - + + hotspot already open diff --git a/plugins/mobilehotspot/translations/zh_CN.qm b/plugins/mobilehotspot/translations/zh_CN.qm deleted file mode 100644 index 1b67cfd1e75c7c8a763aa0d6aaa59291ce31c517..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1698 zcmai!T}TvB6vwaYs_VMDnO|i^T*)jn33>>FqOcGH+uB`i6HB{0dtC=-XV$sn+7@Vm zy=0(0h!NTsiBd1oLl}_~^Z`W=MMTgChSgJMSWqZ^oEdjVSKR4g*_m_i|Mx%V+;eC9 zh=1jiss7$)1#8BRUb*+K93gZQna^+tCH0_`#!-Y!eP~C?4}{Dc(65#nSRXQNW4ZAD z$JAc=683#gIa~1%;wbg!@Op%jFQi?Kbi(T<%k_zmpnsfxyK5KhZ%H4SDug((-k&~= zP)e=!Rn=F}J2SQnUW54f+<(%FjL<+ma6Z@?2OfaF&UULGxTe3hFZnNkbJuaOC3)_uAA%_3R0UnT*}i;9GOF&`C>wObNJ$|-wjxN4!brTaZM zsM_nsj_6M8r(vGcQjUcnqT5>{v+m*0Way4AwC|IAyg(}@g@q(V%Q`NiWxa$fsL7fP zWsaB|!VRc;v+kJ{C&p5UiV2J}PkleU+>=sWg36r5b>0(2I%6#qtPoygm?&7FgekZT zb4^4hoI+)$^0MO!@$&uvRp!d+aJ9cZf3AL>=BSWqODh$*2=)=tZ>)}0rRS2ipnC~T zZLSvQjSiQG9G~(`=u(T5Dwrd(v86e#edhhqh9&f}s0G$NI+ir=bAT|`CjH09fxL)E zrKke&)%M6YU2XO9r4>AOlAtzO34OEF(NdMZJasyI^Sh>WMghzUOc=u=P_QINCl&Jy z20u&$-na!;6@6sd#d;@oWNvi)FcD-*{1MCv5;M*)iizuI&SFe#AQRSUYe2P6)l}lH zQXW%?tYEmrS{^uxH5?|5G!(n1g#FO9JMo z2p7W;kr_iYRrUFLR<(W7QR|jK!2z;nMGD~{WemP=hUj8C-agiVTx{+LeR)oM-68MB yK)PDD`_jqZ;ZAjjdOvj2(l%ZefQ?xjuW(K3q|7xIhDVeztWs@x{*$-lf&ByVl控制面板桌面通知 - + wirless switch is close or no wireless device 无线开关已关闭或不存在有热点功能的无线网卡 @@ -75,7 +75,7 @@ 开始关闭热点 - + hotpots name or device is invalid 热点名称或设备错误 @@ -88,49 +88,59 @@ 开始创建热点 - + Contains at least 8 characters 至少包含8个字符 - + Hotspot 移动热点 - - + + use + 使用 + + + + share network, will interrupt local wireless connection + 进行热点共享,会中断本机无线网络连接 + + + + hotspot already close 热点已关闭 - + Open 开启 - + Wi-Fi Name Wi-Fi名称 - + Password 网络密码 - + Frequency band 网络频带 - + Net card 共享网卡端口 - - + + hotspot already open 热点已开启 diff --git a/plugins/netconnect/netconnect.pro b/plugins/netconnect/netconnect.pro index 500a3b7e..a7895632 100644 --- a/plugins/netconnect/netconnect.pro +++ b/plugins/netconnect/netconnect.pro @@ -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/ diff --git a/plugins/netconnect/translate_generation.sh b/plugins/netconnect/translate_generation.sh new file mode 100755 index 00000000..72f748b9 --- /dev/null +++ b/plugins/netconnect/translate_generation.sh @@ -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 diff --git a/plugins/netconnect/translations/bo.qm b/plugins/netconnect/translations/bo.qm deleted file mode 100644 index be651eed..00000000 --- a/plugins/netconnect/translations/bo.qm +++ /dev/null @@ -1 +0,0 @@ -@%&y{5{(0b4M_*cSB@=XGF={k11LjL6f#BIH&=*angr-^2tpDXWT;7@6wjn$LyY z5`iZqx5d!41UH9f&ow(ep=#@_Vkq^VCPyvNJ~+~JC)vpVl$}$ zXLj{@zb`yh3l+GDW47^Vpwr$g+UmYKuah35XR(2Qqi0~jGlDnJb29B68FU9O#~x+i z_qZiIDFRi+bv9sKJTBvK5V{7Hqg!3?tS%na7}`aDP@Uy$*Cy{#i=DFnR)5OAZ=VgJ1UJq9)T$){)sQ@&)q$oc}Avra#B((^eP63$C j44>&q6Qs(Y!c9=dVgfL{i?d7e3lwrwi;EM}F@hTa%mTI! diff --git a/plugins/proxy/proxy.pro b/plugins/proxy/proxy.pro index 2e5ab27e..e58c3724 100644 --- a/plugins/proxy/proxy.pro +++ b/plugins/proxy/proxy.pro @@ -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/ diff --git a/plugins/proxy/translate_generation.sh b/plugins/proxy/translate_generation.sh new file mode 100755 index 00000000..72f748b9 --- /dev/null +++ b/plugins/proxy/translate_generation.sh @@ -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 diff --git a/plugins/proxy/translations/bo_CN.qm b/plugins/proxy/translations/bo_CN.qm deleted file mode 100644 index 67dad16605f47748233a872799f5566ac49d932a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3755 zcma)9U1%It6uwFJC)vs7+TufnAXh0Ng&#qIr_8Zq9>ir`3?q|2sjJ0iKkt64E{gXvLjWE{!F^lS-GZy`b zMdyw)#twVe*b6Lr;wodE@36gZ{=-=8N_+OTQN}tpw(tD`*Y;mK24`WPc(mhY?IuGzsXqFj_A7Ghk>&g-L!uR=e`>2+jIlJ zACK+5jo;hO#R_-+#`}@DQ81Gu1jPMViL;SJ-41lX0K)9bz@{8Q&d9Lsr&+tW_<;hMwU@`g( zsb)bd$MLl%RdF-6b!cImp_Z+gHZp#gr}-ER$TS7h0=`WFPT}Ktvc&ZORD8%Xb;F)* zh1CsCD5$PsnLcJzqD#8h!@&%jfJ@RfN%f+Ho36!vI^bT{GS`AI@Mar)$RQ?I<}58G zKt$&G2Y7~W4GBb2Ro9~60tf^CdouG&GCmK5a(@X(``{9B=Ev7bNTO;>IR(&GEx~0r zd42|5PU9q@E$R_9cGAQ4pQ&RYlW)~$=9%o9uGQs-U7Pg_G zrpaA~;|fa`#*As%T2YiN$8{bNv$zp%Ni~IKYCpN6{w*6qCDnrUT#GZiSB*lyLVsw+!|L{EfJ_g=&`XcHN$Xl4k1 z0B`7$sGK}wS_VBR3!loK2%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_qouR@!y_AkbP#V+o3Yc?WqFfUNRuyCxf|St<{d)QE>n%APiKYe{LTfLBmH@M3U{S?V&i;x_1qDap%| z6bC0|d^!Jd>KdHbg(D7sV#^68AtG2;I#t9%!Uxx0Y3#=NEIqZ;<3Q>&oYMSC{t5DE zo|nKm;F#WMZ8QZ`nlNY!skBjHDrFhhMx#zp+mPw}i_b68!xSCiI}NtOhb53h@sD)z Xm${W90RtAbOt3CqVf5;2YDm&wUbx;H diff --git a/plugins/wlanconnect/translations/tr.qm b/plugins/wlanconnect/translations/tr.qm deleted file mode 100644 index be651eed..00000000 --- a/plugins/wlanconnect/translations/tr.qm +++ /dev/null @@ -1 +0,0 @@ -kgi~|EEWaQ zw^_XpTmjOata;Nu1JyCGHgo~iG30Wj*@O5dT++!P{u`b*l9zz$7GyFoFzGP^MR2{hdtZGX zT)m)UN?BrFa%ze~acW6PW?nj28+Uk4VxDt;US4W)30R{*x>m-4T<;)*)CYC@>jQ%m z;RY!Br7s#L(hw%ILfpDW( z!hIb5h*phkBvwrwoxzz5@i-2bv&1um=))DWO30c@imYnTQm%qwf4zcwA$V7 zt}IK04w=vyngW4lOhX~96AYy^Lw{h}q$PwVaf>18G=(q&v@;}NduV8#Caq_RG3|Hm z*}eOA_uc)GSD^!p{K@Ng&bjy8bH8)%-Fx1)Z+RBKa`Ew#KUz`$-8;VioqydWMCm^X zQGBZqMdOS++lBb-Ss}Lmr6_vjX(5~si=sCk5TgGc#(`l`e7F~KuQ68kGS-}9TzVVh z@?DH;8yK5hjGJ#@?6{tB`(DPKrHuU_h~oR66k>0kDE{ghwCiC}{L<}0^!`#bFS=WZ zJ?+AC@naztl!)LvZv%V83;xYQ>|Q2bJ^f$k!?zeevy$UUa%JE{`&nUtz5Nm~ru0#)jJ&SFdH<_#|WNA;zt>jN8kL&JICe_nG3l4WC22 zKg~GsKgAulejai5v*Ll((-@D(i}yWJf#*&YAAS{nt~_4+;^`+aUN4lC{QY-?=ol&~ zt#3oSt}t%@^O8F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