Commit 01bb644c authored by Sergey Prokhorov's avatar Sergey Prokhorov

core: fix internationalization of nm-l2tp-service (ported from pptp plugin)

parent bb484855
......@@ -13,6 +13,7 @@ AM_CPPFLAGS = \
-DLIBEXECDIR=\""$(libexecdir)"\" \
-DLOCALSTATEDIR=\""$(localstatedir)"\" \
-DDATADIR=\"$(datadir)\" \
-DNM_PPTP_LOCALEDIR=\"$(datadir)/locale\" \
-DPLUGINDIR=\"$(PPPD_PLUGIN_DIR)\"
libexec_PROGRAMS = nm-l2tp-service
......
......@@ -1636,9 +1636,16 @@ main (int argc, char *argv[])
g_type_init ();
/* locale will be set according to environment LC_* variables */
setlocale (LC_ALL, "");
bindtextdomain (GETTEXT_PACKAGE, NM_L2TP_LOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
/* Parse options */
opt_ctx = g_option_context_new ("");
g_option_context_set_translation_domain (opt_ctx, "UTF-8");
opt_ctx = g_option_context_new (NULL);
g_option_context_set_translation_domain (opt_ctx, GETTEXT_PACKAGE);
g_option_context_set_ignore_unknown_options (opt_ctx, FALSE);
g_option_context_set_help_enabled (opt_ctx, TRUE);
g_option_context_add_main_entries (opt_ctx, options, NULL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment