diff --git a/plugins/vpn/translations/bo_CN.ts b/plugins/vpn/translations/bo_CN.ts index e7eea9de..8ccdc940 100644 --- a/plugins/vpn/translations/bo_CN.ts +++ b/plugins/vpn/translations/bo_CN.ts @@ -4,12 +4,12 @@ AddNetBtn - + Add Others - + Add WiredNetork @@ -26,6 +26,7 @@ Vpn + VPN @@ -35,19 +36,27 @@ - + + Show on Taskbar ལས་འགན་གྱི་ངོས་སུ་དཔེ་རིས་གསལ་པོར་མངོན་པ། + /Vpn/Show on Taskbar - - + + Add VPN + ཁ་སྣོན་རྒྱག་པ།VPN + /Vpn/Add VPN + + + + connected འབྲེལ་མཐུད་བྱུང་ཡོད། - - + + not connected འབྲེལ་མཐུད་མ་བྱས་པ། @@ -55,19 +64,19 @@ VpnItem - + Delete སུབ་དགོས། - - + + Disconnect བར་མཚམས་ཆད་པ་རེད། - - + + Connect འབྲེལ་མཐུད་བཅས་བྱ་དགོས། diff --git a/plugins/vpn/translations/en_US.ts b/plugins/vpn/translations/en_US.ts new file mode 100644 index 00000000..3a66cf9f --- /dev/null +++ b/plugins/vpn/translations/en_US.ts @@ -0,0 +1,84 @@ + + + + + AddNetBtn + + + Add Others + + + + + Add WiredNetork + + + + + ItemFrame + + + Add VPN + + + + + Vpn + + + + VPN + + + + + import + + + + + + Show on Taskbar + + /Vpn/Show on Taskbar + + + + Add VPN + + /Vpn/Add VPN + + + + + connected + + + + + + not connected + + + + + VpnItem + + + Delete + + + + + + Disconnect + + + + + + Connect + + + + diff --git a/plugins/vpn/translations/zh_CN.ts b/plugins/vpn/translations/zh_CN.ts index 4b6a9722..37d0f8ef 100644 --- a/plugins/vpn/translations/zh_CN.ts +++ b/plugins/vpn/translations/zh_CN.ts @@ -4,12 +4,12 @@ AddNetBtn - + Add Others - + Add WiredNetork @@ -26,6 +26,7 @@ Vpn + VPN @@ -35,19 +36,27 @@ - + + Show on Taskbar 在任务栏显示图标 + /Vpn/Show on Taskbar - - + + Add VPN + 添加 VPN 连接 + /Vpn/Add VPN + + + + connected 已连接 - - + + not connected 未连接 @@ -55,19 +64,19 @@ VpnItem - + Delete 删除 - - + + Disconnect 断开 - - + + Connect 连接 diff --git a/plugins/vpn/vpn.cpp b/plugins/vpn/vpn.cpp index 83885255..7802e13d 100644 --- a/plugins/vpn/vpn.cpp +++ b/plugins/vpn/vpn.cpp @@ -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); diff --git a/plugins/vpn/vpn.h b/plugins/vpn/vpn.h index efbb2f30..25217d86 100644 --- a/plugins/vpn/vpn.h +++ b/plugins/vpn/vpn.h @@ -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); diff --git a/plugins/vpn/vpn.pro b/plugins/vpn/vpn.pro index 4c4c9732..ee271081 100644 --- a/plugins/vpn/vpn.pro +++ b/plugins/vpn/vpn.pro @@ -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")