[pygettext] --package-name and --package-version unknown

aapost aapost at idontexist.club
Fri May 5 04:56:22 EDT 2023


On 5/5/23 04:39, c.buhtz at posteo.jp wrote:
> Thanks for the answer.
> 
> Am 05.05.2023 03:24 schrieb aapost:
>> pygettext is deprecated since xgettext supports python now, so using
>> xgettext is recommended.
> 
> If this is the official case then it should be mentioned in the python 
> docs. The 3.11 docs still tell about pygettext and xgettext and don't 
> recommend one of it.

Yep, no disagreement. A lot of things 'should' be though, and 
technically it is (which docs being the key, lol):

$man pygettext

PYGETTEXT(1)                                       General Commands 
Manual                                      PYGETTEXT(1)

NAME
        pygettext - Python equivalent of xgettext(1)

SYNOPSIS
        pygettext [OPTIONS] INPUTFILE ...

DESCRIPTION
        pygettext is deprecated. The current version of xgettext 
supports many languages, including Python.

        pygettext  uses Python's standard tokenize module to scan Python 
source code, generating .pot files identical to what
        GNU xgettext generates for C and C++ code.  From there, the 
standard GNU tools can be used.

        pygettext searches only for _() by default, even though GNU 
xgettext  recognizes  the  following  keywords:  gettext,
        dgettext, dcgettext, and gettext_noop. See the -k/--keyword flag 
below for how to augment this.


(I have never used either, I just spent a few minutes trying to be 
helpful =P)


More information about the Python-list mailing list