[niepce] * Initialize gettext properly.
- From: Hubert Figuière <hub src gnome org>
- To: svn-commits-list gnome org
- Subject: [niepce] * Initialize gettext properly.
- Date: Tue, 21 Apr 2009 20:09:34 -0400 (EDT)
commit 8c1e73ab325490635b68b9ae371e4f8297b7c263
Author: Hubert Figuiere <hub figuiere net>
Date: Tue Apr 21 20:07:10 2009 -0400
* Initialize gettext properly.
---
ChangeLog | 2 ++
configure.ac | 1 -
po/LINGUAS | 4 ++++
src/niepce/Makefile.am | 4 +++-
src/niepce/main.cpp | 8 ++++++++
5 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 1d94a6f..f906e74 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
2009-04-21 Hubert Figuiere <hub figuiere net>
+ * Initialize gettext properly.
+
* src/fwk/toolkit/mimetype.cpp: Fix a build breakage.
2009-04-15 Hubert Figuiere <hub figuiere net>
diff --git a/configure.ac b/configure.ac
index 0ded97f..b4b9634 100644
--- a/configure.ac
+++ b/configure.ac
@@ -144,7 +144,6 @@ GETTEXT_PACKAGE=niepce
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"],
[The domain to use with gettext])
-ALL_LINGUAS="fr ru sv"
AM_GLIB_GNU_GETTEXT
NIEPCE_LOCALEDIR=[${datadir}/locale]
diff --git a/po/LINGUAS b/po/LINGUAS
new file mode 100644
index 0000000..f77115d
--- /dev/null
+++ b/po/LINGUAS
@@ -0,0 +1,4 @@
+# Please keep this list sorted alphabetically
+fr
+ru
+sv
diff --git a/src/niepce/Makefile.am b/src/niepce/Makefile.am
index b9584f6..039fc10 100644
--- a/src/niepce/Makefile.am
+++ b/src/niepce/Makefile.am
@@ -7,7 +7,9 @@ INCLUDES = -DDATADIR=\"$(datadir)\" \
bin_PROGRAMS = niepce
-niepce_CPPFLAGS = @LIBGTKMM_CFLAGS@ @GCONF_CFLAGS@
+niepce_CPPFLAGS = @LIBGTKMM_CFLAGS@ @GCONF_CFLAGS@ \
+ -DNIEPCE_LOCALEDIR=\"@NIEPCE_LOCALEDIR \"
+
niepce_LDFLAGS = -Wl,--as-needed @BOOST_FILESYSTEM_LDFLAGS@ \
@BOOST_THREAD_LDFLAGS@
niepce_LDADD = \
diff --git a/src/niepce/main.cpp b/src/niepce/main.cpp
index 003bab5..58e4d04 100644
--- a/src/niepce/main.cpp
+++ b/src/niepce/main.cpp
@@ -20,9 +20,13 @@
*/
+#include "config.h"
+
#include <boost/bind.hpp>
#include <boost/filesystem/path.hpp>
+#include <glibmm/i18n.h>
+
#include "fwk/utils/exempi.h"
#include "xmp.h"
#include "ui/niepceapplication.hpp"
@@ -33,6 +37,10 @@ using utils::ExempiManager;
int main(int argc, char ** argv)
{
+ bindtextdomain(GETTEXT_PACKAGE, NIEPCE_LOCALEDIR);
+ bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
+ textdomain(GETTEXT_PACKAGE);
+
// we need to init boost::filesystem to use native path checks.
// note: this is not the case in the tests.
bfs::path::default_name_check(&bfs::native);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]