From 57f27aacb9ad4d60491a2bb65910a599fce23e0b Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 24 Mar 2010 16:39:57 -0500 Subject: Adding in a check to see if the translator would like to fallback to not using the username. --- src/indicator-session.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/indicator-session.c b/src/indicator-session.c index b54a5d9..9167a03 100644 --- a/src/indicator-session.c +++ b/src/indicator-session.c @@ -300,11 +300,20 @@ switch_property_change (DbusmenuMenuitem * item, const gchar * property, const G GtkMenuItem * gmi = dbusmenu_gtkclient_menuitem_get(DBUSMENU_GTKCLIENT(user_data), item); gchar * finalstring = NULL; gboolean set_ellipsize = FALSE; + gboolean no_name_in_lang = FALSE; + + /* TRANSLATORS: Translate the '1' below into anything other than + '1' if "Switch From %s..." doesn't make sense in your language. + Instead, the string "Switch User..." will be used. */ + const gchar * translate = C_("session_menu:switchfrom", "1"); + if (g_strcmp0(translate, "1") != 0) { + no_name_in_lang = TRUE; + } /* If there's a NULL string of some type, then we want to go back to our old 'Switch User' which isn't great but eh, this error condition should never happen. */ - if (value == NULL || g_value_get_string(value) == NULL || g_value_get_string(value)[0] == '\0') { + if (value == NULL || g_value_get_string(value) == NULL || g_value_get_string(value)[0] == '\0' || no_name_in_lang) { finalstring = _("Switch User..."); set_ellipsize = FALSE; } -- cgit v1.2.3