From 8a1bbb620a5fa5c9197f1de7bf6b258b54e5136f Mon Sep 17 00:00:00 2001 From: Javier Date: Thu, 29 Jan 2015 01:44:39 +0100 Subject: setting up gettext --- Makefile.am | 2 +- configure.ac | 10 +++++++++- mate-applet/Makefile.am | 6 +++++- mate-applet/main.c | 1 + mate-applet/mdock-mate-panel-applet.c | 3 ++- 5 files changed, 18 insertions(+), 4 deletions(-) diff --git a/Makefile.am b/Makefile.am index c0080f0..b2f99aa 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,2 +1,2 @@ AUTOMAKE_OPTIONS = foreign -SUBDIRS = libmdock mate-applet test +SUBDIRS = libmdock mate-applet po test diff --git a/configure.ac b/configure.ac index 5a205be..7452d84 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.69]) -AC_INIT(libtopmenu-gtk, 1.0, javier@javispedro.com) +AC_INIT(mdock, 1.0, javier@javispedro.com) AC_CONFIG_SRCDIR([libmdock/mdock-widget.h]) AC_CONFIG_HEADERS([config.h]) AM_INIT_AUTOMAKE([-Wall -Wno-extra-portability foreign]) @@ -24,6 +24,8 @@ AC_PROG_CC AM_PROG_CC_C_O AC_PROG_CC_STDC AC_PROG_LIBTOOL +AM_GNU_GETTEXT([external]) +AM_GNU_GETTEXT_VERSION([0.19.3]) GLIB_GSETTINGS @@ -60,11 +62,17 @@ AS_IF([test "x$with_zeitgeist" != xno], AM_CONDITIONAL([WANT_MATE_APPLET], [test x$enable_mate_applet = xyes]) +# NLS +GETTEXT_PACKAGE=mdock +AC_SUBST(GETTEXT_PACKAGE) +AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Gettext Package]) + # Output files AC_CONFIG_FILES([ Makefile libmdock/Makefile mate-applet/Makefile + po/Makefile.in test/Makefile ]) diff --git a/mate-applet/Makefile.am b/mate-applet/Makefile.am index 53c29a0..f46da38 100644 --- a/mate-applet/Makefile.am +++ b/mate-applet/Makefile.am @@ -1,9 +1,13 @@ +datadir = @datadir@ +datarootdir = @datarootdir@ +localedir = @localedir@ + if WANT_MATE_APPLET libexec_PROGRAMS = mdock-mate-panel-applet mdock_mate_panel_applet_SOURCES = main.c mdock-mate-panel-applet.c mdock-mate-panel-applet.h -mdock_mate_panel_applet_CPPFLAGS = $(GTK_CFLAGS) $(MATEPANELAPPLET_CFLAGS) -DG_LOG_DOMAIN=\"mdock-mate-panel-applet\" +mdock_mate_panel_applet_CPPFLAGS = $(GTK_CFLAGS) $(MATEPANELAPPLET_CFLAGS) -DG_LOG_DOMAIN=\"mdock-mate-panel-applet\" -DMATELOCALEDIR=\"$(localedir)\" mdock_mate_panel_applet_LDADD = $(GTK_LIBS) $(MATEPANELAPPLET_LIBS) ../libmdock/libmdock.la appletdir = $(datadir)/mate-panel/applets diff --git a/mate-applet/main.c b/mate-applet/main.c index 15db52a..ca364d4 100644 --- a/mate-applet/main.c +++ b/mate-applet/main.c @@ -19,6 +19,7 @@ #include +#include "../config.h" #include "mdock-mate-panel-applet.h" static gboolean mdock_mate_panel_applet_factory(MatePanelApplet *applet, diff --git a/mate-applet/mdock-mate-panel-applet.c b/mate-applet/mdock-mate-panel-applet.c index bf846ce..7b304b2 100644 --- a/mate-applet/mdock-mate-panel-applet.c +++ b/mate-applet/mdock-mate-panel-applet.c @@ -17,10 +17,11 @@ * along with MDock. If not, see . */ +#include "../config.h" + #include #include -#include "../config.h" #include "mdock-mate-panel-applet.h" G_DEFINE_TYPE(MDockMatePanelApplet, mdock_mate_panel_applet, PANEL_TYPE_APPLET) -- cgit v1.2.3