diff options
author | Ted Gould <ted@gould.cx> | 2010-03-24 16:39:57 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2010-03-24 16:39:57 -0500 |
commit | 57f27aacb9ad4d60491a2bb65910a599fce23e0b (patch) | |
tree | 431e46bbdd60f59d3ff370b82f94d11ff8c90b98 /src | |
parent | 69caf1c9ee63b8121e4cce8802c0c4adcf774602 (diff) | |
download | ayatana-indicator-session-57f27aacb9ad4d60491a2bb65910a599fce23e0b.tar.gz ayatana-indicator-session-57f27aacb9ad4d60491a2bb65910a599fce23e0b.tar.bz2 ayatana-indicator-session-57f27aacb9ad4d60491a2bb65910a599fce23e0b.zip |
Adding in a check to see if the translator would like to fallback to not using the username.
Diffstat (limited to 'src')
-rw-r--r-- | src/indicator-session.c | 11 |
1 files changed, 10 insertions, 1 deletions
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; } |