GNOME Bugzilla – Bug 129889
Gettextize displayed default profile name
Last modified: 2006-01-15 20:04:52 UTC
It would be nice to have "Default" i18n'ized in the GUI. regs, Chris
Created attachment 22663 [details] [review] Proposed patch. We could use a UTF-8 cmp function,too, but since the ID is ASCII-only, it shouldn't matter.
Created attachment 22664 [details] [review] Proposed patch #2. #1 contained totally unrelated tweaks/fixes.
This patch won't allow people to use the name `Default' for a profile name...
Christian? Is Mariano right about that? Even for en_XX locales?
No, it will just ensure that we use the gettextized version of "Default" as user-visible name of a profile, if "Default" is the actual profile ID. For locales which don't translate "Default", this doesn't make a difference. For others, it will indeed convert the name "Default" to the translation of "Default" in the UI. This doesn't do any harm IMHO. I'll check back whether we write this key somewhere back to gconf, which would be no good. Note that the patch is not very clean, though. The strcmp should take place when assigning the visible_name variable, not in the getter.
Created attachment 51181 [details] [review] Proposed patch This one is even untested. If the visible name is set to _("Default") ("Default" in en_*, "Vorgabe" in de, etc.), "Default" is written back to gconf. In the gconf change callback, we then set the user-visible name of the profile to _("Default") if the GConf key for the visible is is "Default", thus ensuring that on locale changes, the name is still translated correctly.
The patch is a bit crazy and messy. I think the best we can do now is make the visible name translatable in the schema, and leave those already configured the way they are. Fixed in HEAD. Thanks!