Code review comment for lp://qastaging/~robert-ancell/intltool/xml_numeric_charrefs

Revision history for this message
Robert Ancell (robert-ancell) wrote :

Hi,

I've fixed up the copy-paste regexp error in the BZR branch.

The reasoning is purely so the translations are easier to read for translators. My motivation is gcalctool which I maintain has many unicode characters in the button text and they look indecipherable to translators.

Many projects would be affected as Glade likes to escape all unicode characters (they are entered as unicode characters in the interface and always appear non-escaped when editing), I couldn't say how many use characters that need escaping though I would guess it would be a non-trivial amount.

I guess if you're not in a Unicode locale it can never guarantee to work.

I tried making a test case but diff doesn't seem to be utf-8 aware!?
--- tests/cases/extract8.glade.h 2009-12-21 09:49:33.937921631 +1100
+++ tests/results/extract8.glade.h 2009-12-21 09:49:31.200422524 +1100
@@ -2,7 +2,7 @@
 char *s = N_("A label");
 char *s = N_("Cancel (and exit) the test.");
 char *s = N_("Click the button below");
-char *s = N_("Multiply symbol: �");
+char *s = N_("Multiply symbol: ×");
 char *s = N_("Testing");
 char *s = N_("Testing2");
 char *s = N_("This action\n"

So in short, I don't know enough about it to say how safe it would be but it is a pain for translators currently (and I would expect increasingly so as correct Unicode symbols are used more and more in applications).

I'm not sure if it would be better to change the XML escape sequences to C escape sequences (e.g. "\xD7") so then Launchpad translations could at least change them in it's GUI.

« Back to merge proposal