babel icon indicating copy to clipboard operation
babel copied to clipboard

Better argument validation for python *gettext functions

Open tomasr8 opened this issue 2 years ago • 0 comments

Overview Description

*gettext calls should be properly validated for the correct number/type of arguments and an error/warning should be issued if the signature does not match.

Some examples which currently produce po file entries w/o any errors/warnings:

gettext(some_arg="hello") - gettext takes only one positional argument gettext("hello", "asdad") - same for this ngettext("asd", "sdfsdfsd") - missing n argument

These should either be errors or at least warnings as they will result in runtime errors.

Additional Information

babel version 2.12.1

tomasr8 avatar May 01 '23 16:05 tomasr8