Set textdomain as soon as possible
This commit is contained in:
parent
e3e316ea8a
commit
42f78a6980
|
@ -35,7 +35,6 @@
|
|||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <locale.h>
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
#include <libpeas/peas-extension-set.h>
|
||||
|
@ -156,7 +155,7 @@ static const GOptionEntry options[] =
|
|||
/* collects file arguments */
|
||||
{
|
||||
G_OPTION_REMAINING, '\0', 0, G_OPTION_ARG_FILENAME_ARRAY, NULL, NULL,
|
||||
N_("[FILE...] [+LINE")
|
||||
N_("[FILE...] [+LINE]")
|
||||
},
|
||||
|
||||
{NULL}
|
||||
|
@ -226,18 +225,6 @@ xed_app_startup (GApplication *application)
|
|||
/* Setup debugging */
|
||||
xed_debug_init ();
|
||||
xed_debug_message (DEBUG_APP, "Startup");
|
||||
|
||||
xed_dirs_init ();
|
||||
|
||||
/* Setup locale/gettext */
|
||||
setlocale (LC_ALL, "");
|
||||
|
||||
dir = xed_dirs_get_xed_locale_dir ();
|
||||
bindtextdomain (GETTEXT_PACKAGE, dir);
|
||||
|
||||
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
|
||||
textdomain (GETTEXT_PACKAGE);
|
||||
|
||||
xed_debug_message (DEBUG_APP, "Set icon");
|
||||
|
||||
dir = xed_dirs_get_xed_data_dir ();
|
||||
|
|
15
xed/xed.c
15
xed/xed.c
|
@ -33,7 +33,10 @@
|
|||
#endif
|
||||
|
||||
#include <glib.h>
|
||||
#include <locale.h>
|
||||
#include <libintl.h>
|
||||
|
||||
#include "xed-dirs.h"
|
||||
#include "xed-app.h"
|
||||
|
||||
int
|
||||
|
@ -41,6 +44,18 @@ main (int argc, char *argv[])
|
|||
{
|
||||
XedApp *app;
|
||||
gint status;
|
||||
const gchar *dir;
|
||||
|
||||
xed_dirs_init ();
|
||||
|
||||
/* Setup locale/gettext */
|
||||
setlocale (LC_ALL, "");
|
||||
|
||||
dir = xed_dirs_get_xed_locale_dir ();
|
||||
bindtextdomain (GETTEXT_PACKAGE, dir);
|
||||
|
||||
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
|
||||
textdomain (GETTEXT_PACKAGE);
|
||||
|
||||
app = g_object_new (XED_TYPE_APP,
|
||||
"application-id", "org.x.editor",
|
||||
|
|
Loading…
Reference in New Issue