ayatana-commits team mailing list archive
-
ayatana-commits team
-
Mailing list archive
-
Message #01286
[Merge] lp:~ted/indicator-session/switch-from-i18n into lp:indicator-session
Ted Gould has proposed merging lp:~ted/indicator-session/switch-from-i18n into lp:indicator-session.
Requested reviews:
Indicator Applet Developers (indicator-applet-developers)
Adding the ability for translators to fallback to not using the user
name if it doesn't make sense in their language. bug 545893
--
https://code.launchpad.net/~ted/indicator-session/switch-from-i18n/+merge/22076
Your team ayatana-commits is subscribed to branch lp:indicator-session.
=== modified file 'src/indicator-session.c'
--- src/indicator-session.c 2010-03-18 18:50:42 +0000
+++ src/indicator-session.c 2010-03-24 21:50:35 +0000
@@ -300,11 +300,20 @@
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;
}
Follow ups