Skip to content

Commit

Permalink
chore: add translation for hotspot plugin
Browse files Browse the repository at this point in the history
Log: 为热点插件添加翻译
  • Loading branch information
heyuming authored and ComixHe committed Jul 5, 2023
1 parent a9cf8b3 commit 7c72024
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 6 deletions.
1 change: 1 addition & 0 deletions debian/dock-hotspot-plugin.install
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
usr/lib/dde-dock/plugins/quick-trays/libdock-hotspot-plugin.so
usr/share/dock-hotspot-plugin/translations
7 changes: 3 additions & 4 deletions dock-hotspot-plugin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ find_package(KF5NetworkManagerQt REQUIRED)

pkg_check_modules(DDE-Dock REQUIRED dde-dock)

#file(GLOB TS_FILES "translations/*.ts")
#qt5_add_translation(QM_FILES ${TS_FILES})
#add_custom_target(HotSpotlanguage ALL DEPENDS ${QM_FILES})
file(GLOB TS_FILES "translations/*.ts")
qt5_add_translation(QM_FILES ${TS_FILES})
add_custom_target(HotSpotlanguage ALL DEPENDS ${QM_FILES})

add_definitions("${QT_DEFINITIONS} -DQT_PLUGIN")
add_library(${PLUGIN_NAME} SHARED ${SRCS})
Expand All @@ -42,7 +42,6 @@ target_include_directories(${PLUGIN_NAME} PUBLIC
${NETWORKINTERFACE}
${DtkWidget_INCLUDE_DIRS}
${Qt5DBus_INCLUDE_DIRS}
${QGSettings_INCLUDE_DIRS}
${DDE-Network-Core_INCLUDE_DIRS}
${DDE_DOCK_INCLUDE_DIR}
${Qt5Network_INCLUDE_DIRS}
Expand Down
30 changes: 30 additions & 0 deletions dock-hotspot-plugin/translations/dock-hotspot-plugin_en_US.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="en_US">
<context>
<name>HotspotPlugin</name>
<message>
<source>hotspot</source>
<translation>hotspot</translation>
</message>
<message>
<source>Hotspot is unsupported</source>
<translation>Hotspot is unsupported</translation>
</message>
<message>
<source>Personal Hotspot On</source>
<translation>Personal Hotspot On</translation>
</message>
<message>
<source>Personal Hotspot Off</source>
<translation>Personal Hotspot Off</translation>
</message>
</context>
<context>
<name>QuickPanel</name>
<message>
<source>HotSpot</source>
<translation>HotSpot</translation>
</message>
</context>
</TS>
30 changes: 30 additions & 0 deletions dock-hotspot-plugin/translations/dock-hotspot-plugin_zh_CN.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="zh_CN">
<context>
<name>HotspotPlugin</name>
<message>
<source>hotspot</source>
<translation>热点</translation>
</message>
<message>
<source>Hotspot is unsupported</source>
<translation>不支持热点</translation>
</message>
<message>
<source>Personal Hotspot On</source>
<translation>个人热点开</translation>
</message>
<message>
<source>Personal Hotspot Off</source>
<translation>个人热点关</translation>
</message>
</context>
<context>
<name>QuickPanel</name>
<message>
<source>HotSpot</source>
<translation>热点</translation>
</message>
</context>
</TS>
6 changes: 4 additions & 2 deletions dock-network-plugin/translations/dock-network-plugin_en_US.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?xml version="1.0" ?><!DOCTYPE TS><TS version="2.1" language="en_US">
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="en_US">
<context>
<name>DeviceControllItem</name>
<message>
Expand Down Expand Up @@ -278,4 +280,4 @@
<translation>Network settings</translation>
</message>
</context>
</TS>
</TS>

0 comments on commit 7c72024

Please sign in to comment.