From 37c8ea571897c47497ea3e1584676a823374bfe9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20Bonithon?= Date: Thu, 17 Mar 2022 11:37:38 +0100 Subject: i18n: Add missing initialization --- configure.ac | 2 +- tumbler/tumbler-file-info.c | 6 ++++++ tumblerd/main.c | 5 +++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 5917ba8..3abc313 100644 --- a/configure.ac +++ b/configure.ac @@ -117,7 +117,7 @@ dnl ************************************ dnl *** Check for standard functions *** dnl ************************************ AC_FUNC_MMAP() -AC_CHECK_FUNCS([sched_getparam sched_setscheduler getpwnam]) +AC_CHECK_FUNCS([sched_getparam sched_setscheduler getpwnam bind_textdomain_codeset]) dnl ****************************** dnl *** Check for i18n support *** diff --git a/tumbler/tumbler-file-info.c b/tumbler/tumbler-file-info.c index 9a32983..304ef3b 100644 --- a/tumbler/tumbler-file-info.c +++ b/tumbler/tumbler-file-info.c @@ -87,6 +87,12 @@ tumbler_file_info_class_init (TumblerFileInfoClass *klass) { GObjectClass *gobject_class; + /* make sure to use the translations from Tumbler */ + bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR); +#ifdef HAVE_BIND_TEXTDOMAIN_CODESET + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); +#endif + gobject_class = G_OBJECT_CLASS (klass); gobject_class->finalize = tumbler_file_info_finalize; gobject_class->get_property = tumbler_file_info_get_property; diff --git a/tumblerd/main.c b/tumblerd/main.c index 5cc2d66..e4d0666 100644 --- a/tumblerd/main.c +++ b/tumblerd/main.c @@ -38,6 +38,8 @@ #include #include +#include + #include #include @@ -120,6 +122,9 @@ main (int argc, G_GNUC_END_IGNORE_DEPRECATIONS #endif + /* initialize translations */ + xfce_textdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR, "UTF-8"); + /* set the application name. Translators: Don't translate "Tumbler". */ g_set_application_name ("Tumbler Thumbnailing Service"); -- cgit v1.2.1