bug-gettext
[Top][All Lists]
Advanced

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

Re: xgettext invocation and docs


From: Miguel Ángel Arruga Vivas
Subject: Re: xgettext invocation and docs
Date: Mon, 21 Dec 2020 22:48:36 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

Hello,

Thanks for reaching out.  My answers are inline.

"Andrea G. Monaco" <andrea.monaco@autistici.org> writes:

> some days ago I had issues with xgettext.  I kept calling it for my C
> project, but it would just say nothing and generate no file.  After
> some search, I figured out the reason: I didn't pass the -k_ option,
> so the program could not find any invocation of gettext() through the
> _ macro.
>
> So I have three proposals:
>
> - xgettext should say something when it can't find anything and it
>   doesn't generate any file, because it's a puzzling behavior to
>   beginners

The option --force-po already generates a file even when no message is
extracted.  A warning message could be useful when the option isn't
provided and a change like that may fit well into the early return of
msgdomain_list_print.  This is also used by the other tools, but a
change on the messages emitted by current code may be puzzling behavior
to current users, so it must be thought carefully.

> - the _ alias for gettext() should be default for the C language, being
>   also recommended in gettext documentation

Even though it's a common idiom for simple use cases and it's already
the default on other languages, I disagree that it should be one of the
defaults for C, which is mainly a backwards-compatible language and the
project may want, or need, that keyword for other uses, instead of
that...

> - the xgettext docs describe all options, but should provide common usage
>   examples, which of course include the -k_ option.

... a pointer to the needed flag as an actual example of the xgettext
invocation at chapter 1.5 (Overview of GNU 'gettext') could be very
useful, as reading it only points to the full documentation and doesn't
mention the --keyword option, unlike at chapter 4.4 (How Marks Appear in
Sources) where this option is mentioned explicitly, although the link
isn't provided there.

> Let me know, I can work on all three.

Just as a note: non-trivial changes (> around 10 lines) to gettext
require a copyright assignment to the FSF, so if a change of that kind
is going to be integrated into the repository you'd be asked to sign
one.

Best regards,
Miguel



reply via email to

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