bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: Question about gettext


From: Bruno Haible
Subject: Re: Question about gettext
Date: Wed, 29 Aug 2007 23:18:36 +0200
User-agent: KMail/1.5.4

Hello,

Nacho wrote:
> I have a question about a possible bug:
> 
> if i have this message:
> 
> #, c-format
> msgid ""
> "Compile successful:\n"
> "%s"
> 
> and i translate it as:
> msgstr "Compile successful:%s"
> 
> Why this is not an error

This is not an error because the translators have the freedom to insert
or remove newlines in the translation, to improve the esthetics of the
result.

> and:
> 
> #: ../src/compile.c:84
> msgid "An error occurred while msgfmt was executed:\n"
> msgstr "An error occurred while msgfmt was executed:"
> 
> is it an error?

This is an error because in 99% of the cases, the translator does not
intend to add a blank line or to join two lines. The programmer wrote a
string that ends in a newline, therefore he assumes that the next string
after it will be output from the beginning of a line. When you provide a
translation that does not end in a newline, you are violating that
expectation of the programmer, and the result would most likely be bad.

Bruno





reply via email to

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