summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2020-04-29 23:37:22 +0200
committerSlávek Banko <slavek.banko@axis.cz>2020-04-29 23:37:40 +0200
commitd4196fd507c944b3763085be65cd793a2a21775d (patch)
tree566509958d71aebd62f047b1d0e4e84decfa96d6
parent88bb800e94a9ec400f8de5d132afa56425b9e7b9 (diff)
downloadknights-d4196fd507c944b3763085be65cd793a2a21775d.tar.gz
knights-d4196fd507c944b3763085be65cd793a2a21775d.zip
Desktop file translations:
+ Creation of POT template for desktop files added to CMakeL10n rules. + Added creation of translated desktop files during build. Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (cherry picked from commit f35662989b7ee4c17166a4d17059d1c18eb1ad61)
-rw-r--r--knights/CMakeL10n.txt10
-rw-r--r--knights/CMakeLists.txt12
-rw-r--r--knights/knights.desktop4
-rw-r--r--knights/pgn.desktop3
-rw-r--r--translations/desktop_files/knights.desktop/de.po32
-rw-r--r--translations/desktop_files/knights.desktop/knights.desktop.pot32
-rw-r--r--translations/desktop_files/pgn-mimetype/pgn-mimetype.pot27
7 files changed, 106 insertions, 14 deletions
diff --git a/knights/CMakeL10n.txt b/knights/CMakeL10n.txt
index 02ac54d..2b80c61 100644
--- a/knights/CMakeL10n.txt
+++ b/knights/CMakeL10n.txt
@@ -1,3 +1,13 @@
##### create translation templates ##############
tde_l10n_create_template( "messages/knights" )
+
+tde_l10n_create_template(
+ CATALOG "desktop_files/knights.desktop/"
+ SOURCES knights.desktop
+)
+
+tde_l10n_create_template(
+ CATALOG "desktop_files/pgn-mimetype/"
+ SOURCES pgn.desktop
+)
diff --git a/knights/CMakeLists.txt b/knights/CMakeLists.txt
index e3239d9..9e7b739 100644
--- a/knights/CMakeLists.txt
+++ b/knights/CMakeLists.txt
@@ -44,12 +44,10 @@ tde_add_executable( ${PROJECT_NAME} AUTOMOC
##### other data
-install(
- FILES pgn.desktop
- DESTINATION ${MIME_INSTALL_DIR}/application
-)
+tde_create_translated_desktop( ${PROJECT_NAME}.desktop )
-install(
- FILES ${PROJECT_NAME}.desktop
- DESTINATION ${APPS_INSTALL_DIR}/Games/Board
+tde_create_translated_desktop(
+ SOURCE pgn.desktop
+ DESTINATION ${MIME_INSTALL_DIR}/application
+ PO_DIR ${CMAKE_SOURCE_DIR}/translations/desktop_files/pgn-mimetype
)
diff --git a/knights/knights.desktop b/knights/knights.desktop
index 02f6c83..c06b79e 100644
--- a/knights/knights.desktop
+++ b/knights/knights.desktop
@@ -4,14 +4,10 @@ Exec=knights
Icon=knights
MiniIcon=knights
Name=Knights
-Name[de]=Knights
GenericName=Chess Game
Comment=A graphical chess interface
-Comment[de]=A graphical chess interface
X-TDE-InitialPreference=1
MimeType=application/x-chess-pgn,Application
X-TDE-ServiceTypes=
X-DocPath=knights/index.html
Terminal=false
-
-
diff --git a/knights/pgn.desktop b/knights/pgn.desktop
index 34750e3..30bb4bb 100644
--- a/knights/pgn.desktop
+++ b/knights/pgn.desktop
@@ -6,6 +6,3 @@ Comment=Portable Game Notation
X-TDE-AutoEmbed=false
Patterns=*.pgn *.PGN
Name=Chess Match
-
-
-
diff --git a/translations/desktop_files/knights.desktop/de.po b/translations/desktop_files/knights.desktop/de.po
new file mode 100644
index 0000000..077efc6
--- /dev/null
+++ b/translations/desktop_files/knights.desktop/de.po
@@ -0,0 +1,32 @@
+# SOME DESCRIPTIVE TITLE.
+# This file is put in the public domain.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2020-04-29 23:29+0200\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: de\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Name
+#: knights.desktop:6
+msgid "Knights"
+msgstr "Knights"
+
+#. GenericName
+#: knights.desktop:7
+msgid "Chess Game"
+msgstr ""
+
+#. Comment
+#: knights.desktop:8
+msgid "A graphical chess interface"
+msgstr "A graphical chess interface"
diff --git a/translations/desktop_files/knights.desktop/knights.desktop.pot b/translations/desktop_files/knights.desktop/knights.desktop.pot
new file mode 100644
index 0000000..cab7d3d
--- /dev/null
+++ b/translations/desktop_files/knights.desktop/knights.desktop.pot
@@ -0,0 +1,32 @@
+# SOME DESCRIPTIVE TITLE.
+# This file is put in the public domain.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2020-04-29 23:29+0200\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Name
+#: knights.desktop:6
+msgid "Knights"
+msgstr ""
+
+#. GenericName
+#: knights.desktop:7
+msgid "Chess Game"
+msgstr ""
+
+#. Comment
+#: knights.desktop:8
+msgid "A graphical chess interface"
+msgstr ""
diff --git a/translations/desktop_files/pgn-mimetype/pgn-mimetype.pot b/translations/desktop_files/pgn-mimetype/pgn-mimetype.pot
new file mode 100644
index 0000000..2ec2f51
--- /dev/null
+++ b/translations/desktop_files/pgn-mimetype/pgn-mimetype.pot
@@ -0,0 +1,27 @@
+# SOME DESCRIPTIVE TITLE.
+# This file is put in the public domain.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2020-04-29 23:32+0200\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Comment
+#: pgn.desktop:5
+msgid "Portable Game Notation"
+msgstr ""
+
+#. Name
+#: pgn.desktop:8
+msgid "Chess Match"
+msgstr ""