Hi Serj,

You have well described the issue.

> we'll have to maintain slightly different strings in source code (escaped)
> and in `.pot` files (unescaped), which feels kinda wrong.
> ...
> we will have different strings in source code and l10n files, which is
> against consistency

This "feels kinda wrong" is the wrong part of your expectation.

The PO file format and its string-escaping syntax has been defined once,
and it is independent of the syntax in any programming programming language.

If we had done it like you wish, namely to copy strings including their
delimiters and escaping to the PO file, then - since a project can contain
C, Shell, Python, Lisp, Java, JavaScript, etc. files and xgettext can
extract strings from all of this files - the resulting PO file would
becomes a syntactic mix between C, Shell, Python, Lisp, Java, JavaScript, etc.
With so many different (and contradictory) escape syntaxes such a file
could not be parsed correctly any more.

A second reason why your expectation is wrong is:
- The strings in source code are viewed by the developer.
- The strings in the PO file are viewed by the translator (if she is not
  actually using some translation tool that hides the escaping from her).
Since these are usually different persons, it does not matter if the syntaxes
are different.

Bruno


Reply via email to