diff options
author | Gaël Bonithon <gael@xfce.org> | 2022-03-17 11:37:38 +0100 |
---|---|---|
committer | Gaël Bonithon <gael@xfce.org> | 2022-03-17 11:41:50 +0100 |
commit | 37c8ea571897c47497ea3e1584676a823374bfe9 (patch) | |
tree | d818de2d27fe66dae5250f633bb0c2af743c4cc9 | |
parent | ebaafc825af1c7fd11d3ebf37482ffe1ffc3bb69 (diff) | |
download | tumbler-master.tar.gz |
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | tumbler/tumbler-file-info.c | 6 | ||||
-rw-r--r-- | tumblerd/main.c | 5 |
3 files changed, 12 insertions, 1 deletions
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 <glib.h> #include <glib-object.h> +#include <libxfce4util/libxfce4util.h> + #include <tumbler/tumbler.h> #include <tumblerd/tumbler-cache-service.h> @@ -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"); |