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

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

Re: gettext 0.15 complains about \v in strings, but argp uses \v


From: Bruno Haible
Subject: Re: gettext 0.15 complains about \v in strings, but argp uses \v
Date: Tue, 8 Aug 2006 16:52:32 +0200
User-agent: KMail/1.9.1

Paul Eggert wrote:
> GNU tar 1.15.91 <ftp://alpha.gnu.org/gnu/tar/tar-1.15.91.tar.gz>
> contains a file src/tar.c that has the declaration quoted at the end
> of this message.  This declaration contains a string of the form
> N_("...\v...").  GNU gettext 0.15, unlike earlier versions of GNU
> gettext, complains about the \v:
> 
>    $ cd tar-1.15.91/src
>    $ xgettext --keyword=N_ tar.c
>    ../../../gettext-0.15/gettext-tools/src/xgettext.c:2038: internationalized 
> messages should not contain the `\v' escape sequence
> 
> The \v is needed by argp: argp uses it to split the diagnostic into
> two pieces, which are formatted differently; the \v is never sent to
> the user.

Ouch; that is an unfortunate choice of a separator.

> Is there some reason for this new restriction in gettext 0.15?  I
> searched the gettext 0.15 manual for instances of "\v", and didn't see
> anything relevant.  It's not clear to me why the restriction is
> needed, as the C escapes \a \b \f \n \r \t \v should all be fairly
> portable these days.

The restriction is not enforced; the cited message above is only a warning,
as it doesn't affect xgettext's return code.

The restriction reflects the understanding of the translators and the
checks done in msgfmt.
  - Translators usually don't ask much questions, but try to do a good
    effort quickly. A \v in a string is an unusual thing. Some
    translators will put a \v literally in the translation; some will
    know that it means a vertical space and put one or two blank lines;
    some will not even notice it.
  - If you want to be sure that a translator follows a certain policy,
    e.g. regarding HTML tags or newlines at the beginning/end of a message,
    this check needs to be added to msgfmt. But msgfmt so far doesn't
    have a check that \v is mapped to \v.

Your change to GNU tar reflects the guidelines in the GNU gettext manual
section "Preparing Translatable Strings" - especially: Entire sentences,
Split at paragraphs -; thank you for this change.

Bruno




reply via email to

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