zbraniecki/l20n — pull request #5 by stasm (2012-01-16 18:54:00+00:00)
Title: Support triple-quoted string literals

Even though current string implementation allows for multiline strings, I still think it would be a valuable addition to support a format which doesn't require quote escaping, or switching to single quotes (or the other way round) when necessary. Compare the following examples:

Currently:

example@example.com
or visit our website.
">

or:

example@example.com
or visit our website.
">

(Using single quotes for complex strings is even worse, as you need to remember to escape the apostrophe.)

Suggested third option:

example@example.com
or visit our website.
""">

(Note: This example might be a bit contrived, as with the addition of DOM fragments, you typically wouldn't need to put `href` attributes in your localization. `title` most likely stays, though.

HTML by its nature is unwieldy enough, and I think that making it slightly easier to localize it is worth the effort, especially if the required changes to the format are this small. Keep in mind, that many localization editors don't syntax-highlight HTML (they're designed to work with plain text), and you usually end up with a soup of `<>\"=` characters and the like. This has plagued gettext forever, and I'd like to change it :)