inspect: Set up locale in main()
authorPhilip Withnall <philip@tecnocode.co.uk>
Sun, 8 Jan 2012 19:51:25 +0000 (19:51 +0000)
committerPhilip Withnall <philip@tecnocode.co.uk>
Sun, 8 Jan 2012 21:53:14 +0000 (21:53 +0000)
tools/inspect/Makefile.am
tools/inspect/inspect.vala

index 62fa4a6..3ceb370 100644 (file)
@@ -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 = \
index cec3b19..f0198a8 100644 (file)
@@ -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 ();