summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavier <dev.git@javispedro.com>2015-01-29 01:44:39 +0100
committerJavier <dev.git@javispedro.com>2015-01-29 01:44:39 +0100
commit8a1bbb620a5fa5c9197f1de7bf6b258b54e5136f (patch)
treef8e8b3c08d276d86c410e11156fb50ef96a440a8
parent157bb39f94e1106093dba6b6e3ae4f05cef2caac (diff)
downloadmdock-8a1bbb620a5fa5c9197f1de7bf6b258b54e5136f.tar.gz
mdock-8a1bbb620a5fa5c9197f1de7bf6b258b54e5136f.zip
setting up gettext
-rw-r--r--Makefile.am2
-rw-r--r--configure.ac10
-rw-r--r--mate-applet/Makefile.am6
-rw-r--r--mate-applet/main.c1
-rw-r--r--mate-applet/mdock-mate-panel-applet.c3
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 <string.h>
+#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 <http://www.gnu.org/licenses/>.
*/
+#include "../config.h"
+
#include <glib/gi18n.h>
#include <mate-panel-applet-gsettings.h>
-#include "../config.h"
#include "mdock-mate-panel-applet.h"
G_DEFINE_TYPE(MDockMatePanelApplet, mdock_mate_panel_applet, PANEL_TYPE_APPLET)