gandalf, stas, and I talked about this a bit, and we intend to settle with my mental parser plus a compare-locales warning:

Broken escapes just pass through, \u -> u, but we'll extend compare-locales to issue a warning on the l10n dashboard in those cases.

The work is tracked in https://bugzilla.mozilla.org/show_bug.cgi?id=1040019.

Axel

On 7/11/14 4:26 PM, Axel Hecht wrote:
Hi,

in .properties

   foo = some \unicode
   bar = some \a

creates the most icky output.

I'd like to get a defined behavior, but it turns out to be hard.

Java:
- dies with a parsing error on foo, bar is "some a"

XPCOM:
- returns "some ", as \u is converted to \0 on foo, bar is "some a"

Gaia:
- returns "some \unicode", "some \a"
(doesn't drop unknown escapes apparently)

Compare-locales:
- dies with a python error on parsing in my code on foo, bar is "some a"

My mental parser:
- returns "some unicode", "some a"


I dislike both java and compare-locales, and I think that both gaia and
xpcom don't work great.

What's your take?

Axel

cross-posting to .platform for xpcom, .tools.l10n for gaia's l10n.js

_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to