[geary] Make appdata file translatable. Bug 713937.
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary] Make appdata file translatable. Bug 713937.
- Date: Mon, 5 Sep 2016 02:15:23 +0000 (UTC)
commit 96ea69df19b2143f5bb070dfdf3222ffe93cd0e3
Author: Michael James Gratton <mike vee net>
Date: Mon Sep 5 12:09:54 2016 +1000
Make appdata file translatable. Bug 713937.
* desktop/CMakeLists.txt: Translate the appdata file rather than just
installing it directly.
* desktop/geary.appdata.xml.in: Rename from 'geary.appdata.xml', make
name, summary and description translatable.
* cmake/FindIntltool.cmake: Add a CMake command for the appdata file.
* po/POTFILES.in: Include geary.appdata.xml.in.
cmake/FindIntltool.cmake | 7 +++++
desktop/CMakeLists.txt | 5 +--
.../{geary.appdata.xml => geary.appdata.xml.in} | 26 ++++++++++----------
po/POTFILES.in | 1 +
4 files changed, 23 insertions(+), 16 deletions(-)
---
diff --git a/cmake/FindIntltool.cmake b/cmake/FindIntltool.cmake
index 44c3c92..b35279d 100644
--- a/cmake/FindIntltool.cmake
+++ b/cmake/FindIntltool.cmake
@@ -12,6 +12,13 @@ else (INTLTOOL_MERGE_EXECUTABLE)
endif (INTLTOOL_MERGE_EXECUTABLE)
if (INTLTOOL_MERGE_FOUND)
+ macro (INTLTOOL_MERGE_APPDATA appstream_name po_dir)
+ add_custom_target (${appstream_name}.in ALL
+ ${INTLTOOL_MERGE_EXECUTABLE} --xml-style ${CMAKE_SOURCE_DIR}/${po_dir}
+ ${CMAKE_CURRENT_SOURCE_DIR}/${appstream_name}.in ${appstream_name}
+ )
+ install (FILES ${CMAKE_CURRENT_BINARY_DIR}/{$appstream_name} DESTINATION
${CMAKE_INSTALL_PREFIX}/share/appdata)
+ endmacro (INTLTOOL_MERGE_DESKTOP appstream_name po_dir)
macro (INTLTOOL_MERGE_DESKTOP desktop_id po_dir)
add_custom_target (geary.desktop ALL
${INTLTOOL_MERGE_EXECUTABLE} --desktop-style ${CMAKE_SOURCE_DIR}/${po_dir}
diff --git a/desktop/CMakeLists.txt b/desktop/CMakeLists.txt
index f61e912..9776df8 100644
--- a/desktop/CMakeLists.txt
+++ b/desktop/CMakeLists.txt
@@ -2,14 +2,13 @@
# Build and install geary.desktop
#
-install(FILES geary.appdata.xml DESTINATION share/appdata)
-
include (FindIntltool)
include (FindDesktopFileValidate)
if (INTLTOOL_MERGE_FOUND)
+ INTLTOOL_MERGE_APPDATA (geary.appdata.xml po)
INTLTOOL_MERGE_DESKTOP (geary.desktop po)
INTLTOOL_MERGE_AUTOSTART_DESKTOP (geary-autostart.desktop po)
-
+
if (DESKTOP_VALIDATE)
if (DESKTOP_FILE_VALIDATE_FOUND)
VALIDATE_DESKTOP_FILE (geary.desktop)
diff --git a/desktop/geary.appdata.xml b/desktop/geary.appdata.xml.in
similarity index 73%
rename from desktop/geary.appdata.xml
rename to desktop/geary.appdata.xml.in
index d833eeb..a9f7e10 100644
--- a/desktop/geary.appdata.xml
+++ b/desktop/geary.appdata.xml.in
@@ -5,26 +5,26 @@
<id>geary.desktop</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>LGPL-2.1+</project_license>
- <name>Geary</name>
- <summary>Send and receive email</summary>
+ <_name>Geary</_name>
+ <_summary>Send and receive email</_summary>
<description>
- <p>
+ <_p>
Geary is an email application built around conversations, for
the GNOME 3 desktop. It allows you to read, find and send email
with a straightforward, modern interface.
- </p>
- <p>
+ </_p>
+ <_p>
Conversations allow you to read a complete discussion without
having to find and click from message to message.
- </p>
- <p>Geary's features include:</p>
+ </_p>
+ <_p>Geary's features include:</_p>
<ul>
- <li>Quick email account setup</li>
- <li>Shows related messages together in conversations</li>
- <li>Fast, full text and keyword search</li>
- <li>Full-featured HTML and plain text message composer</li>
- <li>Desktop notification of new mail</li>
- <li>Compatible with GMail, Yahoo! Mail, Outlook.com and other IMAP servers</li>
+ <_li>Quick email account setup</_li>
+ <_li>Shows related messages together in conversations</_li>
+ <_li>Fast, full text and keyword search</_li>
+ <_li>Full-featured HTML and plain text message composer</_li>
+ <_li>Desktop notification of new mail</_li>
+ <_li>Compatible with GMail, Yahoo! Mail, Outlook.com and other IMAP servers</_li>
</ul>
</description>
<url type="homepage">https://wiki.gnome.org/Apps/Geary</url>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index d74839a..edca1ae 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,4 +1,5 @@
[encoding: UTF-8]
+desktop/geary.appdata.xml.in
desktop/geary.desktop.in
desktop/geary-autostart.desktop.in
[type: gettext/ini]desktop/geary-attach.contract.in
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]