[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: xgettext invocation and docs
From: |
Bruno Haible |
Subject: |
Re: xgettext invocation and docs |
Date: |
Fri, 18 Oct 2024 19:25:47 +0200 |
Hi,
Andrea G. Monaco wrote in
<https://lists.gnu.org/archive/html/bug-gettext/2020-12/msg00036.html>:
> 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
It's not actually wrong if xgettext cannot find any message to extract.
That happens routinely in projects that have not yet started marking
the extractable strings in the source code.
> - the _ alias for gettext() should be default for the C language, being
> also recommended in gettext documentation
The _ alias is not defined by any include file (on purpose: we want the
programmer to have the choice of the alias). Therefore it would be wrong
if xgettext would enable the knowledge about this alias by default.
> - the xgettext docs describe all options, but should provide common usage
> examples, which of course include the -k_ option.
Good suggestion; thanks. Implemented through
https://git.savannah.gnu.org/gitweb/?p=gettext.git;a=commitdiff;h=8f089a25a48a2855e2ca9c700984f4dc514cfcb6
Bruno
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: xgettext invocation and docs,
Bruno Haible <=