bug-gettext
[Top][All Lists]
Advanced

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

Re: gnulib-tool --po-base - allow empty message catalog


From: Bruno Haible
Subject: Re: gnulib-tool --po-base - allow empty message catalog
Date: Sat, 07 Dec 2024 08:59:56 +0100

[CCing bug-gettext]

Hi Gavin,

Gavin Smith wrote in
<https://lists.gnu.org/archive/html/bug-gnulib/2024-12/msg00031.html>:
> ... I found that the file was supposed to be updated by
> "make texinfo_tp-gnulib.pot-update".   This ran xgettext which is one
> of the gettext programs to handle message files:
> 
>     /usr/local/bin/xgettext --default-domain=texinfo_tp-gnulib 
> --directory=../.. \
>       --add-comments=TRANSLATORS: \
>       --files-from=./POTFILES.in \
>       --copyright-holder='Free Software Foundation, Inc.' \
>       --msgid-bugs-address="$msgid_bugs_address" \
>       --keyword=_ --flag=_:1:pass-c-format --keyword=N_ 
> --flag=N_:1:pass-c-format --keyword='proper_name:1,"This is a proper name. 
> See the gettext manual, section Names."' --keyword='proper_name_lite:1,"This 
> is a proper name. See the gettext manual, section Names."' 
> --keyword='proper_name_utf8:1,"This is a proper name. See the gettext manual, 
> section Names."' --flag=error:3:c-format --flag=error_at_line:5:c-format  
> --flag=asprintf:2:c-format --flag=vasprintf:2:c-format
> 
> 
> However, I found that this was not producing any output file (supposed to
> be "texinfo_tp-gnulib.po").  I found that the reason for this was that there
> were not actually any translatable strings discovered in the files listed
> in POTFILES.in.  There had been translatable strings in the past, before
> Gnulib module removals.

Yes, it is a good idea to test whether xgettext has produced the
expected $(DOMAIN).po file.

> This is likely to happen for other project too if they do not use
> many Gnulib modules or remove modules.
> 
> The effect of this means that the package will be distributed with the
> Gnulib translation catalogs with extra translations in them that the
> program does not use.

In this case, the package should ship no *.po files in this directory
at all — since there is nothing to translate.

> I found that xgettext needs the --force-po option to output an empty
> file (which then becomes a .pot file with Makefile rules).
> 
> Hence, I suggest the following change to use this option for Gnulib's
> runs of xgettext:

That's not an appropriate fix, since it means that the translators will
be notified to translate a file with no contents; this is useless noise
for them.

The only reasonable use of the xgettext --force-po option is when the
POT file is only partial, i.e. is then merged with a POT file produced
by some other tools (similar to xgettext) or by xgettext invocations
with different parameters.

Bruno






reply via email to

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