aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-03-25 09:22:11 -0500
committerTed Gould <ted@gould.cx>2010-03-25 09:22:11 -0500
commit14f57ce5b136d74c53974137264d363a6baa03b7 (patch)
tree586efbddec5352ea2d7d59016750e3531f0d1eb6
parenteff99e57a799eaddf8fccc91540b5645486b89f5 (diff)
parent57f27aacb9ad4d60491a2bb65910a599fce23e0b (diff)
downloadayatana-indicator-session-14f57ce5b136d74c53974137264d363a6baa03b7.tar.gz
ayatana-indicator-session-14f57ce5b136d74c53974137264d363a6baa03b7.tar.bz2
ayatana-indicator-session-14f57ce5b136d74c53974137264d363a6baa03b7.zip
Adding a switch for translations that don't have a useful 'Switch From'
-rw-r--r--src/indicator-session.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/indicator-session.c b/src/indicator-session.c
index 57ead25..dc23139 100644
--- a/src/indicator-session.c
+++ b/src/indicator-session.c
@@ -314,11 +314,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;
}