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 689601 - Use Unicode
Use Unicode
Status: RESOLVED FIXED
Product: gnome-documents
Classification: Core
Component: general
3.7.x
Other All
: Normal normal
: ---
Assigned To: GNOME documents maintainer(s)
GNOME documents maintainer(s)
Depends on:
Blocks: 621639
 
 
Reported: 2012-12-04 10:36 UTC by Debarshi Ray
Modified: 2012-12-11 12:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Use proper ellipses instead of their ASCII equivalents (5.23 KB, patch)
2012-12-04 10:40 UTC, Debarshi Ray
needs-work Details | Review
Use proper ellipses instead of their ASCII equivalents (1.94 KB, patch)
2012-12-08 07:46 UTC, Debarshi Ray
none Details | Review
Use proper ellipses instead of their ASCII equivalents (1.93 KB, patch)
2012-12-11 08:17 UTC, Debarshi Ray
committed Details | Review

Description Debarshi Ray 2012-12-04 10:36:54 UTC
Use unicode in strings instead of their ASCII equivalents.

See http://tecnocode.co.uk/2009/10/01/unicode-in-gnome/ for details
Comment 1 Debarshi Ray 2012-12-04 10:40:52 UTC
Created attachment 230639 [details] [review]
Use proper ellipses instead of their ASCII equivalents
Comment 2 Jasper St. Pierre (not reading bugmail) 2012-12-04 14:53:45 UTC
Review of attachment 230639 [details] [review]:

Did you test this? SpiderMonkey has issues with raw UTF-8 in strings. You need to use the proper Unicode escapes ("\uXXXX"). I'd also prefer if you didn't do the replacements inside of just comments.
Comment 3 Debarshi Ray 2012-12-06 14:57:05 UTC
Good catch. No, I had not tested it. It was a fly by patch before I did the same for gnome-photos. However I am not sure how to do this? eg., we have _("Loading…"). Replacing it with _("Loading") + String.fromCharCode(0x2026) sounds wrong, with respect to splitting translatable strings.
Comment 4 Matthias Clasen 2012-12-07 21:17:26 UTC
Try "Loading\u2026"
Comment 5 Debarshi Ray 2012-12-08 07:45:07 UTC
Thanks, that worked.
Comment 6 Debarshi Ray 2012-12-08 07:46:20 UTC
Created attachment 231023 [details] [review]
Use proper ellipses instead of their ASCII equivalents
Comment 7 Giovanni Campagna 2012-12-10 21:05:26 UTC
(In reply to comment #2)
> Review of attachment 230639 [details] [review]:
> 
> Did you test this? SpiderMonkey has issues with raw UTF-8 in strings. You need
> to use the proper Unicode escapes ("\uXXXX"). I'd also prefer if you didn't do
> the replacements inside of just comments.

Or did you test this?
I just tested it, and it works fine.

Test code:
#!/usr/bin/gjs

const Gtk = imports.gi.Gtk;

Gtk.init(null);

dialog = new Gtk.MessageDialog({ text: "àò€¢ðđŋ¶€ß»ŧŋ←ŧ½" });
dialog.run();
Comment 8 Debarshi Ray 2012-12-10 23:05:58 UTC
(In reply to comment #7)
> (In reply to comment #2)
> > Review of attachment 230639 [details] [review] [details]:
> > 
> > Did you test this? SpiderMonkey has issues with raw UTF-8 in strings. You need
> > to use the proper Unicode escapes ("\uXXXX"). I'd also prefer if you didn't do
> > the replacements inside of just comments.
> 
> Or did you test this?
> I just tested it, and it works fine.

I did test my first patch and it showed some garbage instead of the ellipses in the button. However this works fine:
gjs> print ("…")
…
gjs>
Comment 9 Debarshi Ray 2012-12-10 23:59:19 UTC
As gcampax pointed out, this is fixed in gjs git master (ie. c614834).
Comment 10 Cosimo Cecchi 2012-12-11 02:59:30 UTC
I am fine with depending on gjs master for gnome-documents master. Can you update the patch to use the unicode characters instead of the escaped character code?
Comment 11 Debarshi Ray 2012-12-11 08:17:43 UTC
Created attachment 231244 [details] [review]
Use proper ellipses instead of their ASCII equivalents

I have left the comments as ASCII-only as Jasper suggested. If you want it the other way, then you can just use my first patch which has since been obsoleted.
Comment 12 Cosimo Cecchi 2012-12-11 12:37:20 UTC
Review of attachment 231244 [details] [review]:

Thanks!