Using gettext for more than source code translations

flo.xfce at flo.xfce at
Sat Oct 29 17:14:12 CEST 2016

Since version 0.19 gettext has support for more file formats than only
source code. This makes the use of intltool in most cases obsolte.
(Maybe even in all our cases, I haven't checked).
Here is a patch for mousepad (which is my experimental platform for such
patches) which uses gettext to generate the localized desktop file. I
don't see the point of needing two tools where one is enough. Intltool
was developed for the Gnome project to overcome gettext's shortcomings,
but those were resolved and now even the creator of intltool, the Gnome
project, is moving towards a gettext-only build chain.
Please let me know if you are interested in more of these patches for
other Xfce components, if you are willing to merge them. Please note: I
haven't touched the dev-tools yet, intltool is still necessary for autogen.

Kind regards

diff --git a/ b/
index 964dd9a..f23b1d4 100644
--- a/
+++ b/
@@ -14,8 +14,8 @@ desktop_in_files =
 	sed -e "s,\@libexecdir\@,$(libexecdir),g" < $< > $@
 desktop_DATA = $(
+	$(AM_V_GEN)$(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@
 .PHONY: ChangeLog

 ChangeLog: Makefile
@@ -26,15 +26,9 @@ ChangeLog: Makefile
 dist-hook: ChangeLog

 EXTRA_DIST =									\
-							\
-							\
-							\

-	intltool-extract							\
-	intltool-merge								\
-	intltool-update								\
 	$(desktop_in_files)							\

diff --git a/ b/
index 3f75bad..b701053 100644
--- a/
+++ b/
@@ -47,7 +47,6 @@ AC_PROG_CC()
 AC_CHECK_PROGS([PERL], [perl5 perl])

 dnl **************************
@@ -78,6 +77,7 @@ dnl ******************************
 dnl *** Check for i18n support ***
 dnl ******************************

 dnl ***********************************
 dnl *** Check for required packages ***
diff --git a/ b/
index 96ca08d..0c4af3b 100644
--- a/
+++ b/
@@ -1,8 +1,8 @@

 [Desktop Entry]
-_Comment=Simple Text Editor
-_GenericName=Text Editor
+Comment=Simple Text Editor
+GenericName=Text Editor
 Exec=mousepad %F
diff --git a/po/LINGUAS b/po/LINGUAS
new file mode 100644
index 0000000..b26df1b
--- /dev/null
+++ b/po/LINGUAS
@@ -0,0 +1,2 @@
+# Set of available languages.
+ar ast bg ca cs da de el en_AU en_GB es eu fi fr gl he hr hu id is it
ja kk ko lt ms nb nl nn oc pl pt pt_BR ro ru sk sr sv te th tr ug uk
zh_CN zh_TW

More information about the Xfce4-dev mailing list