GNOME Bugzilla – Bug 764318
background-item: replace octal code with literal UTF-8 character
Last modified: 2016-04-05 17:17:07 UTC
Another patch we carry downstream that seems useful to have here.
Created attachment 324954 [details] [review] background-item: replace octal code with literal UTF-8 character Apparently due to a recent upgrade to gettext, the octal code was not being processed properly in generating the .pot file.
Review of attachment 324954 [details] [review]: Looks good to me. I am curious about the gettext version, though, and the formatting of the commit message looks slightly odd.
Created attachment 324957 [details] [review] background: Replace octal code with literal UTF-8 character Reformatted the commit message.
Review of attachment 324957 [details] [review]: > Apparently due to a recent upgrade to gettext, the octal code was not > being processed properly in generating the .pot file. Why are we working around a broken gettext in gnome-control-center? There's plenty more modules where that sort of strings is used (gnome-desktop for one) and I don't see us adding work-arounds everywhere in GNOME.
(In reply to Bastien Nocera from comment #4) > Why are we working around a broken gettext in gnome-control-center? There's > plenty more modules where that sort of strings is used (gnome-desktop for > one) and I don't see us adding work-arounds everywhere in GNOME. Broken gettext aside (not sure which failure we were seeing exactly), using the utf-8 character seems better in general, no? That's why I decided to propose this patch here.
Pretty sure we use the octal because older gettexts didn't support using directly the UTF-8 string. This would mean that the gettext you use would be regressing.
(In reply to Cosimo Cecchi from comment #5) > (In reply to Bastien Nocera from comment #4) > > Why are we working around a broken gettext in gnome-control-center? There's > > plenty more modules where that sort of strings is used (gnome-desktop for > > one) and I don't see us adding work-arounds everywhere in GNOME. > > Broken gettext aside (not sure which failure we were seeing exactly), using > the utf-8 character seems better in general, no? I, personally, prefer the UTF-8 character because it is more readable. No strong opinions, though.
Matthias, remember why we use the octals instead of the UTF-8 characters directly in g-c-c and gnome-desktop?
(In reply to Bastien Nocera from comment #8) > Matthias, remember why we use the octals instead of the UTF-8 characters > directly in g-c-c and gnome-desktop? I don't think the octals were to work around gettext so much as maybe old compilers ? In any case, I think using unicode in string literals is fine nowadays. The only caveats are that you may sometimes need to hint translators at something being special here (which is fairly obvious when you see octals). But it is is an innocent-looking : or ... you should probably add a translator comment that says (eg): Note the use of the ratio character (U....) and the ellipsis (U....) here.
Review of attachment 324957 [details] [review]: In which case, restoring the original status.
Pushed to master now that we're branched. Attachment 324957 [details] pushed as 73dcc0f - background: Replace octal code with literal UTF-8 character