-DLIBEXECDIR=\""$(libexecdir)"\" \
-DLOCALSTATEDIR=\""$(localstatedir)"\" \
-DDATADIR=\"$(datadir)\" \
+ -DNM_OPENVPN_LOCALEDIR=\"$(datadir)/locale\"
-I$(top_srcdir)
libexec_PROGRAMS = nm-openvpn-service nm-openvpn-service-openvpn-helper
g_type_init ();
+ /* locale will be set according to environment LC_* variables */
+ setlocale (LC_ALL, "");
+
+ bindtextdomain (GETTEXT_PACKAGE, NM_OPENVPN_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);