[folks] inspect: Set up locale in main()



commit ba2d3fb69a0c5145ef3fca75377a8f63137025cc
Author: Philip Withnall <philip tecnocode co uk>
Date:   Sun Jan 8 19:51:25 2012 +0000

    inspect: Set up locale in main()

 tools/inspect/Makefile.am  |    3 +++
 tools/inspect/inspect.vala |    3 +++
 2 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/tools/inspect/Makefile.am b/tools/inspect/Makefile.am
index 62fa4a6..3ceb370 100644
--- a/tools/inspect/Makefile.am
+++ b/tools/inspect/Makefile.am
@@ -6,6 +6,7 @@ VALAFLAGS = \
 	--pkg=gio-2.0 \
 	--pkg=gee-1.0 \
 	--pkg=folks \
+	--pkg=build-conf \
 	$(NULL)
 
 bin_PROGRAMS = folks-inspect
@@ -34,6 +35,8 @@ folks_inspect_LDADD = \
 	$(NULL)
 folks_inspect_CPPFLAGS = \
 	$(AM_CPPFLAGS) \
+	-include $(CONFIG_HEADER) \
+	-DLOCALE_DIR=\"$(pkgdatadir)/locale\" \
 	-I$(top_srcdir)/folks \
 	$(NULL)
 folks_inspect_CFLAGS = \
diff --git a/tools/inspect/inspect.vala b/tools/inspect/inspect.vala
index cec3b19..f0198a8 100644
--- a/tools/inspect/inspect.vala
+++ b/tools/inspect/inspect.vala
@@ -39,6 +39,9 @@ public class Folks.Inspect.Client : Object
 
   public static int main (string[] args)
     {
+      Intl.bindtextdomain (BuildConf.GETTEXT_PACKAGE, BuildConf.LOCALE_DIR);
+      Intl.textdomain (BuildConf.GETTEXT_PACKAGE);
+
       main_client = new Client ();
       main_client.run_interactive ();
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]