From df2f9f2b54645d3c86da39a58303fba032136662 Mon Sep 17 00:00:00 2001 From: Kolan Sh Date: Fri, 23 Oct 2015 01:01:49 +0300 Subject: [PATCH] GETTEXT_PACKAGE from CFlags. --- cmake/backbone | 2 +- src/GtkBuilderTest.vala | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/cmake/backbone b/cmake/backbone index df96ceb..972b5e5 160000 --- a/cmake/backbone +++ b/cmake/backbone @@ -1 +1 @@ -Subproject commit df96ceb0b067844d341f0405db7c10def84d772c +Subproject commit 972b5e5d882bb590fb5eee248c92cdc13ff19c5f diff --git a/src/GtkBuilderTest.vala b/src/GtkBuilderTest.vala index af1306b..6994dde 100644 --- a/src/GtkBuilderTest.vala +++ b/src/GtkBuilderTest.vala @@ -1,5 +1,7 @@ using Gtk; +extern const string GETTEXT_PACKAGE; + /* When button click signal received */ public void on_button1_clicked (Button source) { /* change button label to clicked! */ @@ -23,6 +25,11 @@ int main (string[] args) { string settings_dir = Path.build_path (Path.DIR_SEPARATOR_S, exec_file.get_parent().get_parent().get_path(), "share/gtkbuilder-test/ui"); + // l18n location: + string localedir = Path.build_path (Path.DIR_SEPARATOR_S, exec_file.get_parent().get_parent().get_path(), "share/locale"); + Intl.bindtextdomain (GETTEXT_PACKAGE, localedir); + Intl.bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); + /* Getting the glade file */ builder.add_from_file (settings_dir + "/gtkbuilder-test.glade");