[epiphany] ephy-profile-migrator: Call setlocale and gettext functions in main function
- From: Ting-Wei Lan <lantw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] ephy-profile-migrator: Call setlocale and gettext functions in main function
- Date: Wed, 13 Jan 2016 18:46:08 +0000 (UTC)
commit 16cc92ef1bbe822a6be09371334b34540456ffea
Author: Ting-Wei Lan <lantw src gnome org>
Date: Mon Jan 11 12:15:35 2016 +0800
ephy-profile-migrator: Call setlocale and gettext functions in main function
It is required to correctly show translated messages on some locales.
https://bugzilla.gnome.org/show_bug.cgi?id=760417
lib/Makefile.am | 1 +
lib/ephy-profile-migrator.c | 5 +++++
2 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 18066bc..0ad214d 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -125,6 +125,7 @@ ephy_profile_migrator_CPPFLAGS = \
-I$(srcdir)/history \
-DSHARE_DIR=\"$(pkgdatadir)\" \
-DGETTEXT_PACKAGE=\"$(GETTEXT_PACKAGE)\" \
+ -DLOCALEDIR=\"$(localedir)\" \
$(AM_CPPFLAGS)
BUILT_SOURCES = \
diff --git a/lib/ephy-profile-migrator.c b/lib/ephy-profile-migrator.c
index 20818c0..605cb1d 100644
--- a/lib/ephy-profile-migrator.c
+++ b/lib/ephy-profile-migrator.c
@@ -1075,6 +1075,11 @@ main (int argc, char *argv[])
GError *error = NULL;
EphyFileHelpersFlags file_helpers_flags = EPHY_FILE_HELPERS_NONE;
+ setlocale (LC_ALL, "");
+ bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
+ bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+ textdomain (GETTEXT_PACKAGE);
+
option_group = g_option_group_new ("ephy-profile-migrator",
N_("Web profile migrator"),
N_("Web profile migrator options"),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]