Merge branch '2309-0711' into 'yhkylin/v101'
添加VPN搜索词条 See merge request kylinos-src/kylin-nm!211
This commit is contained in:
commit
2cf9ab4ecd
|
@ -4,12 +4,12 @@
|
|||
<context>
|
||||
<name>AddNetBtn</name>
|
||||
<message>
|
||||
<location filename="../../component/AddBtn/addnetbtn.cpp" line="47"/>
|
||||
<location filename="../../component/AddBtn/addnetbtn.cpp" line="44"/>
|
||||
<source>Add Others</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../component/AddBtn/addnetbtn.cpp" line="51"/>
|
||||
<location filename="../../component/AddBtn/addnetbtn.cpp" line="48"/>
|
||||
<source>Add WiredNetork</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
|
@ -26,6 +26,7 @@
|
|||
<name>Vpn</name>
|
||||
<message>
|
||||
<location filename="../vpn.ui" line="53"/>
|
||||
<location filename="../vpn.cpp" line="68"/>
|
||||
<source>VPN</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
|
@ -35,19 +36,27 @@
|
|||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../vpn.cpp" line="151"/>
|
||||
<location filename="../vpn.cpp" line="157"/>
|
||||
<location filename="../vpn.cpp" line="284"/>
|
||||
<source>Show on Taskbar</source>
|
||||
<translation>ལས་འགན་གྱི་ངོས་སུ་དཔེ་རིས་གསལ་པོར་མངོན་པ།</translation>
|
||||
<extra-contents_path>/Vpn/Show on Taskbar</extra-contents_path>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../vpn.cpp" line="347"/>
|
||||
<location filename="../vpn.cpp" line="454"/>
|
||||
<location filename="../vpn.cpp" line="286"/>
|
||||
<source>Add VPN</source>
|
||||
<translation type="unfinished">ཁ་སྣོན་རྒྱག་པ།VPN</translation>
|
||||
<extra-contents_path>/Vpn/Add VPN</extra-contents_path>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../vpn.cpp" line="372"/>
|
||||
<location filename="../vpn.cpp" line="479"/>
|
||||
<source>connected</source>
|
||||
<translation>འབྲེལ་མཐུད་བྱུང་ཡོད།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../vpn.cpp" line="349"/>
|
||||
<location filename="../vpn.cpp" line="464"/>
|
||||
<location filename="../vpn.cpp" line="374"/>
|
||||
<location filename="../vpn.cpp" line="489"/>
|
||||
<source>not connected</source>
|
||||
<translation>འབྲེལ་མཐུད་མ་བྱས་པ།</translation>
|
||||
</message>
|
||||
|
@ -55,19 +64,19 @@
|
|||
<context>
|
||||
<name>VpnItem</name>
|
||||
<message>
|
||||
<location filename="../vpnitem.cpp" line="58"/>
|
||||
<location filename="../vpnitem.cpp" line="56"/>
|
||||
<source>Delete</source>
|
||||
<translation>སུབ་དགོས།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../vpnitem.cpp" line="111"/>
|
||||
<location filename="../vpnitem.cpp" line="124"/>
|
||||
<location filename="../vpnitem.cpp" line="108"/>
|
||||
<location filename="../vpnitem.cpp" line="121"/>
|
||||
<source>Disconnect</source>
|
||||
<translation>བར་མཚམས་ཆད་པ་རེད།</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../vpnitem.cpp" line="113"/>
|
||||
<location filename="../vpnitem.cpp" line="122"/>
|
||||
<location filename="../vpnitem.cpp" line="110"/>
|
||||
<location filename="../vpnitem.cpp" line="119"/>
|
||||
<source>Connect</source>
|
||||
<translation>འབྲེལ་མཐུད་བཅས་བྱ་དགོས།</translation>
|
||||
</message>
|
||||
|
|
|
@ -0,0 +1,84 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1">
|
||||
<context>
|
||||
<name>AddNetBtn</name>
|
||||
<message>
|
||||
<location filename="../../component/AddBtn/addnetbtn.cpp" line="44"/>
|
||||
<source>Add Others</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../component/AddBtn/addnetbtn.cpp" line="48"/>
|
||||
<source>Add WiredNetork</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ItemFrame</name>
|
||||
<message>
|
||||
<location filename="../itemframe.cpp" line="38"/>
|
||||
<source>Add VPN</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Vpn</name>
|
||||
<message>
|
||||
<location filename="../vpn.ui" line="53"/>
|
||||
<location filename="../vpn.cpp" line="68"/>
|
||||
<source>VPN</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../vpn.ui" line="68"/>
|
||||
<source>import</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../vpn.cpp" line="157"/>
|
||||
<location filename="../vpn.cpp" line="284"/>
|
||||
<source>Show on Taskbar</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<extra-contents_path>/Vpn/Show on Taskbar</extra-contents_path>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../vpn.cpp" line="286"/>
|
||||
<source>Add VPN</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<extra-contents_path>/Vpn/Add VPN</extra-contents_path>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../vpn.cpp" line="372"/>
|
||||
<location filename="../vpn.cpp" line="479"/>
|
||||
<source>connected</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../vpn.cpp" line="374"/>
|
||||
<location filename="../vpn.cpp" line="489"/>
|
||||
<source>not connected</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>VpnItem</name>
|
||||
<message>
|
||||
<location filename="../vpnitem.cpp" line="56"/>
|
||||
<source>Delete</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../vpnitem.cpp" line="108"/>
|
||||
<location filename="../vpnitem.cpp" line="121"/>
|
||||
<source>Disconnect</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../vpnitem.cpp" line="110"/>
|
||||
<location filename="../vpnitem.cpp" line="119"/>
|
||||
<source>Connect</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
|
@ -4,12 +4,12 @@
|
|||
<context>
|
||||
<name>AddNetBtn</name>
|
||||
<message>
|
||||
<location filename="../../component/AddBtn/addnetbtn.cpp" line="47"/>
|
||||
<location filename="../../component/AddBtn/addnetbtn.cpp" line="44"/>
|
||||
<source>Add Others</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../component/AddBtn/addnetbtn.cpp" line="51"/>
|
||||
<location filename="../../component/AddBtn/addnetbtn.cpp" line="48"/>
|
||||
<source>Add WiredNetork</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
|
@ -26,6 +26,7 @@
|
|||
<name>Vpn</name>
|
||||
<message>
|
||||
<location filename="../vpn.ui" line="53"/>
|
||||
<location filename="../vpn.cpp" line="68"/>
|
||||
<source>VPN</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
|
@ -35,19 +36,27 @@
|
|||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../vpn.cpp" line="151"/>
|
||||
<location filename="../vpn.cpp" line="157"/>
|
||||
<location filename="../vpn.cpp" line="284"/>
|
||||
<source>Show on Taskbar</source>
|
||||
<translation>在任务栏显示图标</translation>
|
||||
<extra-contents_path>/Vpn/Show on Taskbar</extra-contents_path>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../vpn.cpp" line="347"/>
|
||||
<location filename="../vpn.cpp" line="454"/>
|
||||
<location filename="../vpn.cpp" line="286"/>
|
||||
<source>Add VPN</source>
|
||||
<translation>添加 VPN 连接</translation>
|
||||
<extra-contents_path>/Vpn/Add VPN</extra-contents_path>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../vpn.cpp" line="372"/>
|
||||
<location filename="../vpn.cpp" line="479"/>
|
||||
<source>connected</source>
|
||||
<translation>已连接</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../vpn.cpp" line="349"/>
|
||||
<location filename="../vpn.cpp" line="464"/>
|
||||
<location filename="../vpn.cpp" line="374"/>
|
||||
<location filename="../vpn.cpp" line="489"/>
|
||||
<source>not connected</source>
|
||||
<translation>未连接</translation>
|
||||
</message>
|
||||
|
@ -55,19 +64,19 @@
|
|||
<context>
|
||||
<name>VpnItem</name>
|
||||
<message>
|
||||
<location filename="../vpnitem.cpp" line="58"/>
|
||||
<location filename="../vpnitem.cpp" line="56"/>
|
||||
<source>Delete</source>
|
||||
<translation>删除</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../vpnitem.cpp" line="111"/>
|
||||
<location filename="../vpnitem.cpp" line="124"/>
|
||||
<location filename="../vpnitem.cpp" line="108"/>
|
||||
<location filename="../vpnitem.cpp" line="121"/>
|
||||
<source>Disconnect</source>
|
||||
<translation>断开</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../vpnitem.cpp" line="113"/>
|
||||
<location filename="../vpnitem.cpp" line="122"/>
|
||||
<location filename="../vpnitem.cpp" line="110"/>
|
||||
<location filename="../vpnitem.cpp" line="119"/>
|
||||
<source>Connect</source>
|
||||
<translation>连接</translation>
|
||||
</message>
|
||||
|
|
|
@ -107,6 +107,7 @@ QWidget *Vpn::pluginUi(){
|
|||
initComponent();
|
||||
initConnect();
|
||||
initNet();
|
||||
initSearchText();
|
||||
}
|
||||
return m_pluginWidget;
|
||||
}
|
||||
|
@ -131,6 +132,11 @@ bool Vpn::isEnable() const
|
|||
return true;
|
||||
}
|
||||
|
||||
QString Vpn::translationPath() const
|
||||
{
|
||||
return "/usr/share/kylin-nm/vpn/%1.ts";
|
||||
}
|
||||
|
||||
void Vpn::initComponent(){
|
||||
//在任务栏上显示图标
|
||||
//显示已连接时间
|
||||
|
@ -272,6 +278,14 @@ void Vpn::setShowSwitchStatus()
|
|||
}
|
||||
}
|
||||
|
||||
void Vpn::initSearchText()
|
||||
{
|
||||
//~ contents_path /Vpn/Show on Taskbar
|
||||
tr("Show on Taskbar");
|
||||
//~ contents_path /Vpn/Add VPN
|
||||
tr("Add VPN");
|
||||
}
|
||||
|
||||
void Vpn::runExternalApp(){
|
||||
// QString cmd = "nm-connection-editor";
|
||||
// QProcess process(this);
|
||||
|
|
|
@ -59,6 +59,7 @@ public:
|
|||
bool isShowOnHomePage() const Q_DECL_OVERRIDE;
|
||||
QIcon icon() const Q_DECL_OVERRIDE;
|
||||
bool isEnable() const Q_DECL_OVERRIDE;
|
||||
QString translationPath() const Q_DECL_OVERRIDE;
|
||||
|
||||
public:
|
||||
void initComponent();
|
||||
|
@ -111,6 +112,8 @@ private:
|
|||
|
||||
|
||||
void setShowSwitchStatus();
|
||||
// 搜索词条
|
||||
void initSearchText();
|
||||
|
||||
private slots:
|
||||
void onVpnAdd(QStringList);
|
||||
|
|
|
@ -48,7 +48,8 @@ INSTALLS += target \
|
|||
|
||||
TRANSLATIONS += \
|
||||
translations/zh_CN.ts \
|
||||
translations/bo_CN.ts
|
||||
translations/bo_CN.ts \
|
||||
translations/en_US.ts
|
||||
|
||||
CONFIG(release, debug|release) {
|
||||
!system($$PWD/translate_generation.sh): error("Failed to generate translation")
|
||||
|
|
Loading…
Reference in New Issue