Localization: fix localization support.
Correct initalizing textdomain. Use LOCALE_DIR environment variable. Support localization in setting.c and text_setting.c files.
This commit is contained in:
parent
6aea530622
commit
360170fd74
|
@ -40,6 +40,14 @@ AM_PROG_AS
|
||||||
AM_GNU_GETTEXT_VERSION(0.18.1)
|
AM_GNU_GETTEXT_VERSION(0.18.1)
|
||||||
AM_GNU_GETTEXT([external])
|
AM_GNU_GETTEXT([external])
|
||||||
|
|
||||||
|
#===============================================================================
|
||||||
|
if test "x${prefix}" = "xNONE"; then
|
||||||
|
LOCALE_DIR="${ac_default_prefix}/share/locale"
|
||||||
|
else
|
||||||
|
LOCALE_DIR="${prefix}/share/locale"
|
||||||
|
fi
|
||||||
|
AC_SUBST(LOCALE_DIR)
|
||||||
|
#===============================================================================
|
||||||
|
|
||||||
##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
|
##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
|
||||||
##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
|
##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
MAINTAINERCLEANFILES = Makefile.in
|
MAINTAINERCLEANFILES = Makefile.in
|
||||||
|
|
||||||
|
LOCALE_DIR = @LOCALE_DIR@
|
||||||
|
|
||||||
bin_PROGRAMS = enventor
|
bin_PROGRAMS = enventor
|
||||||
|
|
||||||
AM_CPPFLAGS = -DPACKAGE_DATA_DIR=\"$(pkgdatadir)\" \
|
AM_CPPFLAGS = -DPACKAGE_DATA_DIR=\"$(pkgdatadir)\" \
|
||||||
|
@ -35,6 +37,7 @@ enventor_LDFLAGS = $(LTLIBINTL)
|
||||||
|
|
||||||
enventor_CFLAGS = \
|
enventor_CFLAGS = \
|
||||||
-I$(top_builddir)/src/lib \
|
-I$(top_builddir)/src/lib \
|
||||||
@ENVENTOR_CFLAGS@
|
@ENVENTOR_CFLAGS@ \
|
||||||
|
-DLOCALE_DIR=\"@LOCALE_DIR@\"
|
||||||
|
|
||||||
EXTRA_DIST =
|
EXTRA_DIST =
|
||||||
|
|
|
@ -875,6 +875,12 @@ keygrabber_init(app_data *ad)
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
init(app_data *ad, int argc, char **argv)
|
init(app_data *ad, int argc, char **argv)
|
||||||
{
|
{
|
||||||
|
#ifdef ENABLE_NLS
|
||||||
|
setlocale(LC_ALL, "");
|
||||||
|
bindtextdomain(PACKAGE, LOCALE_DIR);
|
||||||
|
textdomain(PACKAGE);
|
||||||
|
#endif /* set locale */
|
||||||
|
|
||||||
elm_setup();
|
elm_setup();
|
||||||
|
|
||||||
enventor_init(argc, argv);
|
enventor_init(argc, argv);
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "text_setting.h"
|
#include "text_setting.h"
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "text_setting.h"
|
#include "text_setting.h"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue