From 8cf30873fd0d03b096f627df7a0581aef2efad75 Mon Sep 17 00:00:00 2001 From: Hleb Valoshka <375gnu@gmail.com> Date: Fri, 19 Jul 2019 23:13:20 +0300 Subject: [PATCH] [gtk] Enable locales early Based on a Debian's patch --- src/celestia/gtk/main.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/celestia/gtk/main.cpp b/src/celestia/gtk/main.cpp index 37f7b727..b806a24e 100644 --- a/src/celestia/gtk/main.cpp +++ b/src/celestia/gtk/main.cpp @@ -279,6 +279,16 @@ static void initRealize(GtkWidget* widget, AppData* app) /* MAIN */ int main(int argc, char* argv[]) { + /* Force number displays into C locale. */ + setlocale(LC_NUMERIC, "C"); + setlocale(LC_ALL, ""); + + #ifndef WIN32 + bindtextdomain(PACKAGE, LOCALEDIR); + bind_textdomain_codeset(PACKAGE, "UTF-8"); + textdomain(PACKAGE); + #endif /* WIN32 */ + /* Initialize the structure that holds the application's vitals. */ AppData* app = g_new0(AppData, 1); @@ -339,16 +349,6 @@ int main(int argc, char* argv[]) SetDebugVerbosity(0); - /* Force number displays into C locale. */ - setlocale(LC_NUMERIC, "C"); - setlocale(LC_ALL, ""); - - #ifndef WIN32 - bindtextdomain(PACKAGE, LOCALEDIR); - bind_textdomain_codeset(PACKAGE, "UTF-8"); - textdomain(PACKAGE); - #endif /* WIN32 */ - app->core = new CelestiaCore(); if (app->core == NULL) {