GNOME Bugzilla – Bug 618983
g_get_real_name l10n issue ...
Last modified: 2018-05-24 12:18:28 UTC
I just got a bug filed because the Evo. account dialog uses:
to pre-fill the user's real name [ as you do ;-].
Unfortunately, if it can't work out the real name, it returns an un-translated string:
g_user_name = g_strdup ("somebody");
g_real_name = g_strdup ("Unknown");
Feature or bug ? I'd prefer to see either a NULL return for unknown, or (more safely) an additional _() there :-) Same problem for user_name I guess - though that is far less likely to fail.
The encoding of the returned string is undefined. If anything, you want a new g_get_real_name_for_display () which is locaized and UTF-8. I think that was proposed somewhere already but not followed up on.
g_get_real_name_for_display would make some sense
Found it, bug 542058 is what I had been thinking of, with proposed g_get_user_name_for_display. So I think we should be going for both. I'll write up g_get_real_name_for_display.
Created attachment 163798 [details] [review]
The _for_display variant always returns UTF-8. If the real name can't be determined a localized "Unknown" is returned.
-- GitLab Migration Automatic Message --
This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.
You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/glib/issues/300.