[glib-networking/wip/openssl] openssl: setup gettext in g_io_module_load
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib-networking/wip/openssl] openssl: setup gettext in g_io_module_load
- Date: Thu, 12 May 2016 08:27:09 +0000 (UTC)
commit dabc4b474373bca30c12767da8b536301152fc84
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Thu May 12 10:26:40 2016 +0200
openssl: setup gettext in g_io_module_load
tls/openssl/openssl-module.c | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/tls/openssl/openssl-module.c b/tls/openssl/openssl-module.c
index f3e8b18..f58aed3 100644
--- a/tls/openssl/openssl-module.c
+++ b/tls/openssl/openssl-module.c
@@ -24,6 +24,7 @@
#include "config.h"
+#include <glib/gi18n-lib.h>
#include <gio/gio.h>
#include "gtlsbackend-openssl.h"
@@ -32,7 +33,24 @@
void
g_io_module_load (GIOModule *module)
{
+ gchar *locale_dir;
+#ifdef G_OS_WIN32
+ gchar *base_dir;
+#endif
+
g_tls_backend_openssl_register (module);
+
+#ifdef G_OS_WIN32
+ base_dir = g_win32_get_package_installation_directory_of_module (NULL);
+ locale_dir = g_build_filename (base_dir, "share", "locale", NULL);
+ g_free (base_dir);
+#else
+ locale_dir = g_strdup (LOCALE_DIR);
+#endif
+
+ bindtextdomain (GETTEXT_PACKAGE, locale_dir);
+ bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+ g_free (locale_dir);
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]