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 764318 - background-item: replace octal code with literal UTF-8 character
background-item: replace octal code with literal UTF-8 character
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Background
unspecified
Other All
: Normal normal
: ---
Assigned To: Debarshi Ray
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-03-29 16:16 UTC by Cosimo Cecchi
Modified: 2016-04-05 17:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
background-item: replace octal code with literal UTF-8 character (1.06 KB, patch)
2016-03-29 16:16 UTC, Cosimo Cecchi
accepted-commit_after_freeze Details | Review
background: Replace octal code with literal UTF-8 character (1.07 KB, patch)
2016-03-29 16:44 UTC, Debarshi Ray
committed Details | Review

Description Cosimo Cecchi 2016-03-29 16:16:16 UTC
Another patch we carry downstream that seems useful to have here.
Comment 1 Cosimo Cecchi 2016-03-29 16:16:19 UTC
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.
Comment 2 Debarshi Ray 2016-03-29 16:43:48 UTC
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.
Comment 3 Debarshi Ray 2016-03-29 16:44:56 UTC
Created attachment 324957 [details] [review]
background: Replace octal code with literal UTF-8 character

Reformatted the commit message.
Comment 4 Bastien Nocera 2016-04-04 16:17:17 UTC
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.
Comment 5 Cosimo Cecchi 2016-04-04 16:22:57 UTC
(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.
Comment 6 Bastien Nocera 2016-04-04 16:28:32 UTC
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.
Comment 7 Debarshi Ray 2016-04-04 16:29:31 UTC
(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.
Comment 8 Bastien Nocera 2016-04-04 16:33:25 UTC
Matthias, remember why we use the octals instead of the UTF-8 characters directly in g-c-c and gnome-desktop?
Comment 9 Matthias Clasen 2016-04-04 17:25:04 UTC
(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.
Comment 10 Bastien Nocera 2016-04-04 17:31:29 UTC
Review of attachment 324957 [details] [review]:

In which case, restoring the original status.
Comment 11 Cosimo Cecchi 2016-04-05 17:17:03 UTC
Pushed to master now that we're branched.

Attachment 324957 [details] pushed as 73dcc0f - background: Replace octal code with literal UTF-8 character