[gnome-control-center] region: translate IBus engine name if possible



commit 9a7ff8afbdef2035976e0dd9442803e21510d158
Author: Daiki Ueno <ueno unixuser org>
Date:   Tue Aug 13 14:52:06 2013 +0200

    region: translate IBus engine name if possible
    
    https://bugzilla.gnome.org/show_bug.cgi?id=705907

 panels/region/cc-ibus-utils.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/panels/region/cc-ibus-utils.c b/panels/region/cc-ibus-utils.c
index 54f9fb7..dc070b8 100644
--- a/panels/region/cc-ibus-utils.c
+++ b/panels/region/cc-ibus-utils.c
@@ -28,11 +28,15 @@ engine_get_display_name (IBusEngineDesc *engine_desc)
         const gchar *name;
         const gchar *language_code;
         const gchar *language;
+        const gchar *textdomain;
         gchar *display_name;
 
         name = ibus_engine_desc_get_longname (engine_desc);
         language_code = ibus_engine_desc_get_language (engine_desc);
         language = ibus_get_language_name (language_code);
+        textdomain = ibus_engine_desc_get_textdomain (engine_desc);
+        if (*textdomain != '\0' && *name != '\0')
+                name = g_dgettext (textdomain, name);
         display_name = g_strdup_printf ("%s (%s)", language, name);
 
         return display_name;


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