aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac16
-rw-r--r--src/indicator-notifications.c4
2 files changed, 19 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index b989545..75a55fe 100644
--- a/configure.ac
+++ b/configure.ac
@@ -16,10 +16,24 @@ AC_PROG_LIBTOOL
# Setup gettext with intltool
+AC_DEFUN([AC_DEFINE_PATH], [
+ test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+ test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+ ac_define_path=`eval echo [$]$2`
+ ac_define_path=`eval echo [$]ac_define_path`
+ $1="$ac_define_path"
+ AC_SUBST($1)
+ ifelse($3, ,
+ AC_DEFINE_UNQUOTED($1, "$ac_define_path"),
+ AC_DEFINE_UNQUOTED($1, "$ac_define_path", $3))
+])
+
IT_PROG_INTLTOOL
GETTEXT_PACKAGE=ayatana-indicator-notifications
-AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"], [Gettext package])
AC_SUBST(GETTEXT_PACKAGE)
+AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"], [Gettext package])
+AC_DEFINE_PATH([LOCALEDIR], "${datadir}/locale", [locale directory])
+AM_GLIB_GNU_GETTEXT
# Helpers for GSettings
diff --git a/src/indicator-notifications.c b/src/indicator-notifications.c
index b9a123d..0655445 100644
--- a/src/indicator-notifications.c
+++ b/src/indicator-notifications.c
@@ -141,6 +141,10 @@ indicator_notifications_class_init(IndicatorNotificationsClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ setlocale(LC_ALL, "");
+ bindtextdomain( GETTEXT_PACKAGE, LOCALEDIR );
+ textdomain( GETTEXT_PACKAGE );
+
g_type_class_add_private(klass, sizeof(IndicatorNotificationsPrivate));
object_class->dispose = indicator_notifications_dispose;