diff options
author | Daiki Ueno <ueno@gnu.org> | 2014-04-16 12:10:43 +0900 |
---|---|---|
committer | Daiki Ueno <ueno@gnu.org> | 2014-04-16 18:10:41 +0900 |
commit | 43be67d5278994ef7819232cc8414e213e3db71f (patch) | |
tree | 08749c97aa846eb18b5b1e2e09618becdfdffec0 | |
parent | 883786272828d68a25ddd6d0514f06ae5d8ae467 (diff) | |
download | external_gettext-43be67d5278994ef7819232cc8414e213e3db71f.zip external_gettext-43be67d5278994ef7819232cc8414e213e3db71f.tar.gz external_gettext-43be67d5278994ef7819232cc8414e213e3db71f.tar.bz2 |
examples: Utilize msgfmt --desktop
-rw-r--r-- | gettext-tools/examples/Makefile.am | 2 | ||||
-rw-r--r-- | gettext-tools/examples/hello-c-gnome3/Makefile.am | 13 | ||||
-rw-r--r-- | gettext-tools/examples/hello-c-gnome3/configure.ac | 1 | ||||
-rw-r--r-- | gettext-tools/examples/hello-c-gnome3/hello.desktop.in.in (renamed from gettext-tools/examples/hello-c-gnome3/hello.desktop.in) | 1 | ||||
-rw-r--r-- | gettext-tools/examples/hello-c-gnome3/po/POTFILES.in | 2 | ||||
-rw-r--r-- | gettext-tools/examples/po/Makefile.am | 2 |
6 files changed, 16 insertions, 5 deletions
diff --git a/gettext-tools/examples/Makefile.am b/gettext-tools/examples/Makefile.am index c2eb639..4f9f340 100644 --- a/gettext-tools/examples/Makefile.am +++ b/gettext-tools/examples/Makefile.am @@ -55,7 +55,7 @@ EXAMPLESFILES = \ hello-c-gnome3/autogen.sh \ hello-c-gnome3/autoclean.sh \ hello-c-gnome3/hello.c \ - hello-c-gnome3/hello.desktop.in \ + hello-c-gnome3/hello.desktop.in.in \ hello-c-gnome3/hello.gresource.xml \ hello-c-gnome3/hello.ui \ hello-c-gnome3/Makefile.am \ diff --git a/gettext-tools/examples/hello-c-gnome3/Makefile.am b/gettext-tools/examples/hello-c-gnome3/Makefile.am index a4be933..0dc68b8 100644 --- a/gettext-tools/examples/hello-c-gnome3/Makefile.am +++ b/gettext-tools/examples/hello-c-gnome3/Makefile.am @@ -32,9 +32,20 @@ resources.c: hello.gresource.xml hello.ui $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $(srcdir)/hello.gresource.xml \ --target=$@ --sourcedir=$(srcdir) --generate-source +# Merge translations into a Desktop Entry file. desktopdir = $(datadir)/applications desktop_DATA = hello.desktop +hello.desktop.in: hello.desktop.in.in + $(AM_V_GEN) sed -e "s|@bindir[@]|$(bindir)|" \ + -e "s|@VERSION[@]|$(VERSION)|" \ + $< > $@ || rm $@ + +hello.desktop: hello.desktop.in + $(AM_V_GEN) $(MSGFMT) --desktop --template $< -o $@ -d $(top_srcdir)/po + +CLEANFILES = $(BUILT_SOURCES) hello.desktop.in $(desktop_DATA) + # Additional files to be distributed. EXTRA_DIST = autogen.sh autoclean.sh \ - hello.ui hello.desktop.in hello.gresource.xml + hello.ui hello.desktop.in.in hello.gresource.xml diff --git a/gettext-tools/examples/hello-c-gnome3/configure.ac b/gettext-tools/examples/hello-c-gnome3/configure.ac index d065362..e51d4d8 100644 --- a/gettext-tools/examples/hello-c-gnome3/configure.ac +++ b/gettext-tools/examples/hello-c-gnome3/configure.ac @@ -46,7 +46,6 @@ GTK_LIBS=`"$PKG_CONFIG" --libs "$GTK"` AC_SUBST(GTK_LIBS) AC_CONFIG_FILES([Makefile]) -AC_CONFIG_FILES([hello.desktop]) AC_CONFIG_FILES([m4/Makefile]) AC_CONFIG_FILES([po/Makefile.in]) AC_OUTPUT diff --git a/gettext-tools/examples/hello-c-gnome3/hello.desktop.in b/gettext-tools/examples/hello-c-gnome3/hello.desktop.in.in index d5d9b49..a31bf93 100644 --- a/gettext-tools/examples/hello-c-gnome3/hello.desktop.in +++ b/gettext-tools/examples/hello-c-gnome3/hello.desktop.in.in @@ -1,5 +1,6 @@ [Desktop Entry] Type=Application Name=Hello +Comment=Hello, world! StartupNotify=true Exec=@bindir@/hello diff --git a/gettext-tools/examples/hello-c-gnome3/po/POTFILES.in b/gettext-tools/examples/hello-c-gnome3/po/POTFILES.in index fef36f6..ce9a16e 100644 --- a/gettext-tools/examples/hello-c-gnome3/po/POTFILES.in +++ b/gettext-tools/examples/hello-c-gnome3/po/POTFILES.in @@ -3,5 +3,5 @@ # # List of files which contain translatable strings. hello.c -hello.desktop +hello.desktop.in.in hello.ui diff --git a/gettext-tools/examples/po/Makefile.am b/gettext-tools/examples/po/Makefile.am index ac6b4c0..50abd13 100644 --- a/gettext-tools/examples/po/Makefile.am +++ b/gettext-tools/examples/po/Makefile.am @@ -23,7 +23,7 @@ POTFILES = \ hello-c/hello.c \ hello-c-gnome/hello.c \ hello-c-gnome3/hello.c \ - hello-c-gnome3/hello.desktop.in \ + hello-c-gnome3/hello.desktop.in.in \ hello-c-gnome3/hello.gresource.xml \ hello-c-gnome3/hello.ui \ hello-c++/hello.cc \ |