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 774286 - Take advantage of Unicode
Take advantage of Unicode
Status: RESOLVED FIXED
Product: totem
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: General Totem maintainer(s)
General Totem maintainer(s)
Depends on:
Blocks: 772263
 
 
Reported: 2016-11-11 17:24 UTC by Piotr Drąg
Modified: 2017-01-31 15:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
data: Use Unicode in translatable strings (2.62 KB, patch)
2016-11-11 17:24 UTC, Piotr Drąg
committed Details | Review
main: Use Unicode in translatable strings (4.54 KB, patch)
2016-11-11 17:24 UTC, Piotr Drąg
none Details | Review
backend: Use Unicode in translatable strings (1.14 KB, patch)
2016-11-11 17:25 UTC, Piotr Drąg
committed Details | Review
lirc: Use Unicode in translatable strings (1.23 KB, patch)
2016-11-11 17:25 UTC, Piotr Drąg
committed Details | Review
properties: Use Unicode in translatable strings (1.06 KB, patch)
2016-11-11 17:25 UTC, Piotr Drąg
committed Details | Review
pythonconsole: Use Unicode in translatable strings (2.64 KB, patch)
2016-11-11 17:26 UTC, Piotr Drąg
none Details | Review
screenshot: Use Unicode in translatable strings (1.16 KB, patch)
2016-11-11 17:26 UTC, Piotr Drąg
committed Details | Review
skipto: Use Unicode in translatable strings (891 bytes, patch)
2016-11-11 17:27 UTC, Piotr Drąg
committed Details | Review
main: Use Unicode in translatable strings (4.78 KB, patch)
2016-11-13 13:12 UTC, Piotr Drąg
committed Details | Review
pythonconsole: Use Unicode in translatable strings (2.88 KB, patch)
2016-11-13 13:13 UTC, Piotr Drąg
committed Details | Review

Description Piotr Drąg 2016-11-11 17:24:19 UTC
Created attachment 339642 [details] [review]
data: Use Unicode in translatable strings

Attached patches convert ASCII characters to Unicode, as recommended by <https://developer.gnome.org/hig/stable/typography.html>.
Comment 1 Piotr Drąg 2016-11-11 17:24:40 UTC
Created attachment 339643 [details] [review]
main: Use Unicode in translatable strings
Comment 2 Piotr Drąg 2016-11-11 17:25:04 UTC
Created attachment 339644 [details] [review]
backend: Use Unicode in translatable strings
Comment 3 Piotr Drąg 2016-11-11 17:25:23 UTC
Created attachment 339645 [details] [review]
lirc: Use Unicode in translatable strings
Comment 4 Piotr Drąg 2016-11-11 17:25:44 UTC
Created attachment 339646 [details] [review]
properties: Use Unicode in translatable strings
Comment 5 Piotr Drąg 2016-11-11 17:26:13 UTC
Created attachment 339647 [details] [review]
pythonconsole: Use Unicode in translatable strings
Comment 6 Piotr Drąg 2016-11-11 17:26:41 UTC
Created attachment 339648 [details] [review]
screenshot: Use Unicode in translatable strings
Comment 7 Piotr Drąg 2016-11-11 17:27:01 UTC
Created attachment 339649 [details] [review]
skipto: Use Unicode in translatable strings
Comment 8 Philip Withnall 2016-11-12 23:47:40 UTC
Review of attachment 339642 [details] [review]:

++
Comment 9 Philip Withnall 2016-11-12 23:49:00 UTC
Review of attachment 339643 [details] [review]:

::: src/totem-interface.c
@@ +177,3 @@
 		char *msg;
 
+		msg = g_strdup_printf (_("Couldn’t load the “%s” interface. %s"), name, _("The file does not exist."));

I'm not a fan of changing the single quotation marks into double quotation marks. Please don't do that.

(We discussed this when you provided the Unicode patches for libgdata.)
Comment 10 Philip Withnall 2016-11-12 23:49:21 UTC
Review of attachment 339644 [details] [review]:

++
Comment 11 Philip Withnall 2016-11-12 23:49:24 UTC
Review of attachment 339645 [details] [review]:

++
Comment 12 Philip Withnall 2016-11-12 23:49:33 UTC
Review of attachment 339646 [details] [review]:

++
Comment 13 Philip Withnall 2016-11-12 23:51:34 UTC
Review of attachment 339647 [details] [review]:

::: src/plugins/pythonconsole/pythonconsole.py
@@ +89,3 @@
             console.set_size_request (600, 400) # pylint: disable-msg=E1101
             console.eval ('print("%s" %% totem_object)' % _("You can access "\
+                "the Totem.Object through “totem_object” :\\n%s"), False)

Please don't change the single quotes into double quotes.

Also, I suspect Python will now need the string to be marked as Unicode, and the output to be encoded as UTF-8 before it's passed to `console.eval()`. Have you tested this?
Comment 14 Philip Withnall 2016-11-12 23:51:47 UTC
Review of attachment 339648 [details] [review]:

++
Comment 15 Philip Withnall 2016-11-12 23:51:56 UTC
Review of attachment 339649 [details] [review]:

++
Comment 16 Piotr Drąg 2016-11-13 12:21:29 UTC
(In reply to Philip Withnall from comment #9)
> Review of attachment 339643 [details] [review] [review]:
> I'm not a fan of changing the single quotation marks into double quotation
> marks. Please don't do that.

I think it's a matter of both internal consistency (totem uses double quotation marks everywhere else) and consistency with other GNOME apps that also use double quotation marks, as GNOME HIG recommends.

(In reply to Philip Withnall from comment #13)
> Review of attachment 339647 [details] [review] [review]:
> Also, I suspect Python will now need the string to be marked as Unicode, and
> the output to be encoded as UTF-8 before it's passed to `console.eval()`.
> Have you tested this?

I have not, but if it's broken with Unicode, then it was already broken in most localizations.
Comment 17 Philip Withnall 2016-11-13 12:56:15 UTC
(In reply to Piotr Drąg from comment #16)
> (In reply to Philip Withnall from comment #9)
> > Review of attachment 339643 [details] [review] [review] [review]:
> > I'm not a fan of changing the single quotation marks into double quotation
> > marks. Please don't do that.
> 
> I think it's a matter of both internal consistency (totem uses double
> quotation marks everywhere else) and consistency with other GNOME apps that
> also use double quotation marks, as GNOME HIG recommends.

If you want to make the use of single vs double quotation marks consistent within Totem, that ideally belongs as a separate commit. Or at least requires some justification in the commit message.

> (In reply to Philip Withnall from comment #13)
> > Review of attachment 339647 [details] [review] [review] [review]:
> > Also, I suspect Python will now need the string to be marked as Unicode, and
> > the output to be encoded as UTF-8 before it's passed to `console.eval()`.
> > Have you tested this?
> 
> I have not, but if it's broken with Unicode, then it was already broken in
> most localizations.

I just did a quick test, and it looks like the gettext.gettext method handles the encoding correctly already, so you’re right, and no further changes are needed here.
Comment 18 Piotr Drąg 2016-11-13 13:12:27 UTC
Created attachment 339748 [details] [review]
main: Use Unicode in translatable strings

I added an explanation to the commit message.
Comment 19 Piotr Drąg 2016-11-13 13:13:00 UTC
Created attachment 339749 [details] [review]
pythonconsole: Use Unicode in translatable strings

Ditto.
Comment 20 Philip Withnall 2016-11-13 13:37:19 UTC
Review of attachment 339748 [details] [review]:

I still disagree that the HIG recommends double quotation marks over single ones, but this is not worth bikeshedding over.
Comment 21 Philip Withnall 2016-11-13 13:37:33 UTC
Review of attachment 339749 [details] [review]:

The explanation has ended up above the bug link in the commit message. Please move the bug link to a line by itself at the bottom of the message before you push.

I still disagree that the HIG recommends double quotation marks over single ones, but this is not worth bikeshedding over.
Comment 22 Piotr Drąg 2016-11-13 13:47:08 UTC
Thank you. I will correct the commit message and push after the branching for 3.22.
Comment 23 Piotr Drąg 2017-01-31 15:10:57 UTC
Pushed, thank you.