[empathy] Call gettext for translated protocol names



commit 8f8d69de56449b6259d6567652dea8e9ac7930a8
Author: Will Thompson <will thompson collabora co uk>
Date:   Tue Aug 25 14:34:30 2009 +0100

    Call gettext for translated protocol names

 libempathy/empathy-utils.c |   26 ++++++++++++++++----------
 1 files changed, 16 insertions(+), 10 deletions(-)
---
diff --git a/libempathy/empathy-utils.c b/libempathy/empathy-utils.c
index 028a24d..1b49e5a 100644
--- a/libempathy/empathy-utils.c
+++ b/libempathy/empathy-utils.c
@@ -372,23 +372,29 @@ empathy_protocol_name_to_display_name (const gchar *proto_name)
   static struct {
     const gchar *proto;
     const gchar *display;
+    gboolean translated;
   } names[] = {
-    { "jabber", "Jabber" },
-    { "msn", "MSN" },
-    { "local-xmpp", N_("People Nearby") },
-    { "irc", "IRC" },
-    { "icq", "ICQ" },
-    { "aim", "AIM" },
-    { "yahoo", "Yahoo!" },
-    { "groupwise", "GroupWise" },
-    { "sip", "SIP" },
+    { "jabber", "Jabber", FALSE },
+    { "msn", "MSN", FALSE, },
+    { "local-xmpp", N_("People Nearby"), TRUE },
+    { "irc", "IRC", FALSE },
+    { "icq", "ICQ", FALSE },
+    { "aim", "AIM", FALSE },
+    { "yahoo", "Yahoo!", FALSE },
+    { "groupwise", "GroupWise", FALSE },
+    { "sip", "SIP", FALSE },
     { NULL, NULL }
   };
 
   for (i = 0; names[i].proto != NULL; i++)
     {
       if (!tp_strdiff (proto_name, names[i].proto))
-        return names[i].display;
+        {
+          if (names[i].translated)
+            return _(names[i].display);
+          else
+            return names[i].display;
+        }
     }
 
   return NULL;



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