After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 130663 - Log out 'username'
Log out 'username'
Status: RESOLVED FIXED
Product: gnome-panel
Classification: Other
Component: panel
2.5.x
Other Linux
: Normal enhancement
: ---
Assigned To: Panel Maintainers
Panel Maintainers
Depends on:
Blocks:
 
 
Reported: 2004-01-06 07:37 UTC by Glynn Foster
Modified: 2015-03-24 13:00 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
panel logout username patch (1.16 KB, patch)
2004-01-06 07:37 UTC, Glynn Foster
needs-work Details | Review
Log out user1 (634 bytes, patch)
2004-07-29 07:58 UTC, Anoopkm
needs-work Details | Review

Description Glynn Foster 2004-01-06 07:37:31 UTC
In JDS we have a patch that adds a name to the logout string, attached. It
currently looks to see if there is a real name, and then fall backs to the
user name. Calum made the point that perhaps we should just use the
username by default, and put the real name as a tooltip [this patch doesn't
do that, but is trivial to add].
Comment 1 Glynn Foster 2004-01-06 07:37:59 UTC
Created attachment 23002 [details] [review]
panel logout username patch
Comment 2 Calum Benson 2004-01-06 17:10:28 UTC
The reason for that suggestion, incidentally, is that on some systems
the real name is often something like "Joe Bloggs - Software Engineer
- Doohickey Department", which would obviously make the menu stupidly
wide.  Also the user has probably had to type in their username to log
in anyway (unless they're using a SunRay or something), so even if
it's something obscure like "jb12374x" it should still be reasonably
familiar to them, and more consistent into the bargain.
Comment 3 Vincent Untz 2004-01-06 20:14:54 UTC
I committed a slightly modified version of the patch (with the tooltip
stuff).
Comment 4 Glynn Foster 2004-01-06 22:28:13 UTC
awesome, thanks vincent, you rock.
Comment 5 Vincent Untz 2004-02-28 12:04:27 UTC
Patch was reverted, so reopening. We need to discuss this with i18n
people for 2.8.
Comment 6 Danilo Segan 2004-02-28 14:09:01 UTC
This causes problem in translations to many languages.  Any kind of
string composition with words of unknown properties (such as username)
is bad, and when it's as much exposed in the UI like Log Out menu
item, it sucks big time.

The problem is that "username" may take different gender, plurality,
declination depending on particular word (i.e. "gman" might be treated
differently from "danilo"). In many languages, the rest of the
sentence ("Log Out") needs to change in accordance with these properties.

In some languages (eg. Serbian, one I'm best familiar with :), even
username would need to take different forms if it resembles a readable
word.

If entire name is used (like in the tooltip), the problem is even
worse, because name *must* go through declinations (with username, you
can use something like "Log Out '%s'", but you can't do that with name
of the user), gender changes, etc.  

Btw Vincent, you should probably add "string" keyword to this bug, so
one doesn't forget to look into it before the following string freeze.
Comment 7 Vincent Untz 2004-02-28 14:12:27 UTC
Added string keyword.
Comment 8 Christian Rose 2004-02-28 16:13:26 UTC
The i18n bug for this that caused this to be reverted was bug 131875.
Comment 9 Anoopkm 2004-07-29 07:58:10 UTC
Created attachment 30030 [details] [review]
Log out user1

I would like to contribute a patch for this problem.
In US English.. It is working properly. Check it for other zones..
Comment 10 Danilo Segan 2004-07-30 20:30:49 UTC
Uhm, how does this solve gender/declinations problem discussed above?

"_Log out %s" is the same stuff we had earlier.  Also, I believe sprintf is not
exactly popular in glib-using programs ;)
Comment 11 Vincent Untz 2005-12-17 11:13:50 UTC
So, let's try to move on this. I propose this pseudo algorithm:

/* Translators: translate "panel:showusername" to anything
 * but "1" if "Log out %s" doesn't make any sense in your
 * language.
 */
show_username = _("panel:showusername");
if (strcmp (show_username, "1")) {
  display (_("Log out %s"));
} else {
  display (_("Log out"));
}

What do you think? Any comments from translators? :-)
Comment 12 Danilo Segan 2005-12-23 15:01:40 UTC
I guess one more message for translators is not too much for this eye candy for some languages ;-)

If only msgfmt didn't consider a missing format specifier from the end an error (like *printf family of functions don't), we'd be much happier :)

But, even if this is best we can get, we'd want some more "pseudo" comments :P

/* Translators: translate "panel:showusername" to anything
 * but "1" if "Log out %s" doesn't make any sense in your
 * language.
 */
show_username = _("panel:showusername");
if (strcmp (show_username, "1")) {
  /* Translators: this string is used ONLY if you 
   * translated "panel:showusername" to "1"
   */
  display (_("Log out %s"));
} else {
  /* Translators: this string is used ONLY if you 
   * translated "panel:showusername" to anything other than "1"
   */
  display (_("Log out"));
}

It's better not to rely on by-source sort-order in PO files, which is not a requirement by the format. :)
Comment 13 Vincent Untz 2006-01-22 15:04:24 UTC
Fixed with the proposed solution.