]> source.dussan.org Git - tigervnc.git/commitdiff
Generate translations in .desktop file from po files
authorPierre Ossman <ossman@cendio.se>
Wed, 19 Jul 2017 08:56:21 +0000 (10:56 +0200)
committerPierre Ossman <ossman@cendio.se>
Wed, 19 Jul 2017 08:59:09 +0000 (10:59 +0200)
po/CMakeLists.txt
po/da.po
po/fr.po
po/tigervnc.pot
vncviewer/CMakeLists.txt
vncviewer/vncviewer.desktop.in [deleted file]
vncviewer/vncviewer.desktop.in.in [new file with mode: 0644]

index dda813c38d18c12c63695cc59a5772e410bfd009..ddc43de803144f2d36cb63664bd35bd8cf88cc9d 100644 (file)
@@ -13,6 +13,7 @@ if (GETTEXT_XGETTEXT_EXECUTABLE)
     RELATIVE ${PROJECT_SOURCE_DIR}
     ${PROJECT_SOURCE_DIR}/vncviewer/*.h
     ${PROJECT_SOURCE_DIR}/vncviewer/*.cxx
+    ${PROJECT_SOURCE_DIR}/vncviewer/*.desktop.in.in
   )
 
   add_custom_target(translations_update
index 2ab3881aac11a0256c42eba1347f585abf8342e4..1859f44359c9f48b9cc6d49b109c076afb934a7b 100644 (file)
--- a/po/da.po
+++ b/po/da.po
@@ -656,3 +656,7 @@ msgstr "Parameterne -listen og -via er ikke kompatible"
 #, c-format
 msgid "Listening on port %d"
 msgstr "Lytter på port %d"
+
+#: vncviewer/vncviewer.desktop.in.in:6
+msgid "Connect to VNC server and display remote desktop"
+msgstr "Opret forbindelse til VNC-server og vis fjern-skrivebord"
index 911406ee825ff02fa63109b6a6a620656aa9a87f..dfddbf078c91154d72d2d219604c05b249678380 100644 (file)
--- a/po/fr.po
+++ b/po/fr.po
@@ -662,3 +662,7 @@ msgstr "Les paramètres -listen et -via sont incompatibles"
 #, c-format
 msgid "Listening on port %d"
 msgstr "Écoute du port %d"
+
+#: vncviewer/vncviewer.desktop.in.in:6
+msgid "Connect to VNC server and display remote desktop"
+msgstr "Se connecter à un serveur VNC et afficher le bureau distant"
index 06436505a865ca8c7df62466c84df60030adf236..70656bc50fd36c1905311497408a044edf0897e6 100644 (file)
@@ -651,3 +651,7 @@ msgstr ""
 #, c-format
 msgid "Listening on port %d"
 msgstr ""
+
+#: vncviewer/vncviewer.desktop.in.in:6
+msgid "Connect to VNC server and display remote desktop"
+msgstr ""
index 1833e70450a8f7496bc5ded05c548d4009416713..282ed9dac515f8ea23e1f652f52046bd18765c5f 100644 (file)
@@ -59,7 +59,14 @@ endif()
 install(TARGETS vncviewer DESTINATION ${BIN_DIR})
 if(UNIX)
   install(FILES vncviewer.man DESTINATION ${MAN_DIR}/man1 RENAME vncviewer.1)
-  configure_file(vncviewer.desktop.in vncviewer.desktop)
+  configure_file(vncviewer.desktop.in.in vncviewer.desktop.in)
+  add_custom_command(OUTPUT vncviewer.desktop
+    COMMAND ${GETTEXT_MSGFMT_EXECUTABLE}
+              --desktop --template vncviewer.desktop.in
+              -d ${CMAKE_SOURCE_DIR}/po -o vncviewer.desktop
+    DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/vncviewer.desktop.in
+  )
+  add_custom_target(desktop ALL DEPENDS vncviewer.desktop)
   install(FILES ${CMAKE_CURRENT_BINARY_DIR}/vncviewer.desktop DESTINATION ${DATA_DIR}/applications)
   foreach(res 16 22 24 32 48)
     install(FILES ../media/icons/tigervnc_${res}.png DESTINATION ${DATA_DIR}/icons/hicolor/${res}x${res}/apps RENAME tigervnc.png)
diff --git a/vncviewer/vncviewer.desktop.in b/vncviewer/vncviewer.desktop.in
deleted file mode 100644 (file)
index 508e9b7..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-[Desktop Entry]
-Name=TigerVNC Viewer
-Name[da]=TigerVNC-fremviser
-Name[fr]=Visionneur TigerVNC
-Comment=Connect to VNC server and display remote desktop
-Comment[da]=Opret forbindelse til VNC-server og vis fjern-skrivebord
-Comment[fr]=Se connecter à un serveur VNC et afficher le bureau distant
-Exec=@BIN_DIR@/vncviewer
-Icon=tigervnc
-Terminal=false
-Type=Application
-StartupWMClass=TigerVNC Viewer: Connection Details
-Categories=Network;RemoteAccess;
diff --git a/vncviewer/vncviewer.desktop.in.in b/vncviewer/vncviewer.desktop.in.in
new file mode 100644 (file)
index 0000000..5abe2fc
--- /dev/null
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=TigerVNC Viewer
+Comment=Connect to VNC server and display remote desktop
+Exec=@BIN_DIR@/vncviewer
+Icon=tigervnc
+Terminal=false
+Type=Application
+StartupWMClass=TigerVNC Viewer: Connection Details
+Categories=Network;RemoteAccess;