bug-gettext
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gettext] Hardcoded escaping


From: Bruno Haible
Subject: Re: [bug-gettext] Hardcoded escaping
Date: Fri, 30 Oct 2015 00:00:02 +0100
User-agent: KMail/4.8.5 (Linux/3.8.0-44-generic; KDE/4.8.5; x86_64; ; )

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

[Prev in Thread] Current Thread [Next in Thread]