bug-indent
[Top][All Lists]
Advanced

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

--gettext-strings option


From: Bruno Haible
Subject: --gettext-strings option
Date: Tue, 11 Sep 2018 01:31:40 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-134-generic; KDE/5.18.0; x86_64; ; )

Hi,

(1) doc/indent.texi lines 1582 and 1584 are identical: you are listing
    --gettext-strings twice. The second one probably should read
    --no-gettext-strings, right?

(2) The documentation should explain why --gettext-strings is important
    and recommended. Namely, when a message has comments for translators,
    the 'xgettext' programs recognizes such comments only when they
    appear at most one line apart. So, after 'indent' has added an
    additional line break, they are no longer recognized. See:

$ cat foo1.c
/* TRANSLATORS: the argument is non-negative. */
printf (_("speed: %g knots"));
$ cat foo2.c
/* TRANSLATORS: the argument is non-negative. */
printf (_
        ("speed: %g knots"));
$ xgettext -o - -k_ -cTRANSLATORS foo1.c
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <address@hidden>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-09-11 01:11+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <address@hidden>\n"
"Language-Team: LANGUAGE <address@hidden>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"

#. TRANSLATORS: the argument is non-negative.
#: foo1.c:2
#, c-format
msgid "speed: %g knots"
msgstr ""
$ xgettext -o - -k_ -cTRANSLATORS foo2.c
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <address@hidden>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-09-11 01:11+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <address@hidden>\n"
"Language-Team: LANGUAGE <address@hidden>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"

#: foo2.c:3
#, c-format
msgid "speed: %g knots"
msgstr ""




reply via email to

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