[gnome-builder] i18n: allow org.gnome.Builder.desktop to be translated



commit 301c5d058f86fa6221c33f4393fffa69e3fd53aa
Author: Christian Hergert <christian hergert me>
Date:   Mon Apr 25 22:26:52 2016 -0700

    i18n: allow org.gnome.Builder.desktop to be translated

 configure.ac                                       |    8 +++++++
 data/Makefile.am                                   |   23 ++++++++++++++++++-
 ...der.desktop => org.gnome.Builder.desktop.in.in} |    6 ++--
 3 files changed, 32 insertions(+), 5 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index d34aa9c..d8d0637 100644
--- a/configure.ac
+++ b/configure.ac
@@ -51,6 +51,7 @@ AM_MAINTAINER_MODE([enable])
 dnl ***********************************************************************
 dnl Internationalization
 dnl ***********************************************************************
+AX_REQUIRE_DEFINED([IT_PROG_INTLTOOL])
 IT_PROG_INTLTOOL([0.50.1])
 GETTEXT_PACKAGE=AC_PACKAGE_TARNAME
 AC_SUBST(GETTEXT_PACKAGE)
@@ -84,6 +85,12 @@ VAPIGEN_CHECK
 GLIB_GSETTINGS
 APPSTREAM_XML
 
+AC_ARG_VAR([DESKTOP_FILE_VALIDATE], [the desktop-file-validate program])
+AC_PATH_PROG([DESKTOP_FILE_VALIDATE], [desktop-file-validate], [])
+if test -z "$DESKTOP_FILE_VALIDATE"; then
+       AC_MSG_ERROR([desktop-file-validate not found])
+fi
+
 
 dnl ***********************************************************************
 dnl Check for Required Headers
@@ -471,6 +478,7 @@ AC_CONFIG_FILES([
        data/libide-1.0.pc
        data/style-schemes/Makefile
        data/template-glib-1.0.pc
+       data/org.gnome.Builder.desktop.in
 
        doc/Makefile
        doc/examples/Makefile
diff --git a/data/Makefile.am b/data/Makefile.am
index 118d6cd..ac44cd0 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -5,7 +5,10 @@ appdata_DATA = org.gnome.Builder.appdata.xml
 
 # Desktop launcher and description file.
 desktopdir = $(datadir)/applications
+desktop_in_in_files = org.gnome.Builder.desktop.in.in
+desktop_in_files = org.gnome.Builder.desktop.inn
 desktop_DATA = org.gnome.Builder.desktop
+ INTLTOOL_DESKTOP_RULE@
 
 # D-Bus service file.
 servicedir = $(datadir)/dbus-1/services
@@ -25,10 +28,26 @@ org.gnome.Builder.service: org.gnome.Builder.service.in
 
 EXTRA_DIST = \
        $(appdata_DATA) \
-       $(desktop_DATA) \
+       $(desktop_in_in_files) \
        $(service_in_files) \
        $(NULL)
 
-CLEANFILES = $(service_DATA)
+CLEANFILES = \
+       $(service_DATA) \
+       $(desktop_DATA) \
+       $(NULL)
+
+DISTCLEANFILES = \
+       $(desktop_DATA) \
+       $(NULL)
+
+desktop-file-validate: $(desktop_DATA)
+       for f in $^; do \
+               $(DESKTOP_FILE_VALIDATE) $$f; \
+       done
+
+check-local: desktop-file-validate
+
+.PHONY: desktop-file-validate
 
 -include $(top_srcdir)/git.mk
diff --git a/data/org.gnome.Builder.desktop b/data/org.gnome.Builder.desktop.in.in
similarity index 91%
rename from data/org.gnome.Builder.desktop
rename to data/org.gnome.Builder.desktop.in.in
index ee8262e..f8f36a8 100644
--- a/data/org.gnome.Builder.desktop
+++ b/data/org.gnome.Builder.desktop.in.in
@@ -1,6 +1,6 @@
 [Desktop Entry]
-Name=Builder
-Comment=Build software for GNOME
+_Name=Builder
+_Comment=Build software for GNOME
 Exec=gnome-builder %U
 Icon=builder
 DBusActivatable=true
@@ -8,5 +8,5 @@ StartupNotify=true
 Terminal=false
 Type=Application
 Categories=GNOME;GTK;Development;
-Keywords=Build;Develop;
+_Keywords=Build;Develop;
 
MimeType=text/x-c;text/x-csrc;text/x-changelog;text/x-chdr;text/x-c++hdr;text/x-python;application/x-python;application/javascript;application/x-javascript;text/x-javascript;text/javascript;text/x-js;text/x-shellscript;application/x-shellscript;text/x-sh;text/x-vala;text/x-makefile;text/x-c++;text/x-cpp;text/x-c++src;text/css;application/x-gnome-app-info;application/x-desktop;text/x-go;text/html;text/x-markdown;application/json;application/x-m4;application/xml;text/xml;application/x-yaml;text/x-sql;application/x-ruby;text/x-ruby;text/x-pkg-config;text/x-lua;text/x-php;application/x-php;text/x-php-source;application/x-php-source;text/x-perl;application/x-perl;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]