[sysprof] sysprof: setup gettext in main



commit 1c1301c0ba99b8ed884b5c49c557d9bb3eb810fd
Author: Christian Hergert <chergert redhat com>
Date:   Sat Jul 13 15:04:11 2019 -0700

    sysprof: setup gettext in main

 src/sysprof/sysprof.c | 8 ++++++++
 1 file changed, 8 insertions(+)
---
diff --git a/src/sysprof/sysprof.c b/src/sysprof/sysprof.c
index 63b76e7..2ec184d 100644
--- a/src/sysprof/sysprof.c
+++ b/src/sysprof/sysprof.c
@@ -16,6 +16,8 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include "config.h"
+
 #include <glib/gi18n.h>
 #include <gtk/gtk.h>
 #include <sysprof.h>
@@ -31,6 +33,12 @@ main (gint argc,
 
   sysprof_clock_init ();
 
+  /* Set up gettext translations */
+  setlocale (LC_ALL, "");
+  bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
+  bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+  textdomain (GETTEXT_PACKAGE);
+
   app = sysprof_application_new ();
   ret = g_application_run (G_APPLICATION (app), argc, argv);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]