]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-36310: Allow pygettext.py to detect calls to gettext in f-strings. (GH-19875)
authorjack1142 <6032823+jack1142@users.noreply.github.com>
Mon, 9 Nov 2020 22:50:45 +0000 (23:50 +0100)
committerGitHub <noreply@github.com>
Mon, 9 Nov 2020 22:50:45 +0000 (01:50 +0300)
commitbfc6b63102d37ccb58a71711e2342143cd9f4d86
tree7363462e163ebfa86f099802493389b42f217871
parent1f73c320e2921605c4963e202f6bdac1ef18f2ce
bpo-36310: Allow pygettext.py to detect calls to gettext in f-strings. (GH-19875)

Adds support to Tools/i18n/pygettext.py for gettext calls in f-strings. This process is done by parsing the f-strings, processing each value, and flagging the ones which contain a gettext call.

Co-authored-by: Batuhan Taskaya <batuhanosmantaskaya@gmail.com>
Lib/test/test_tools/test_i18n.py
Misc/ACKS
Misc/NEWS.d/next/Tools-Demos/2020-05-03-01-30-46.bpo-36310.xDxxwY.rst [new file with mode: 0644]
Tools/i18n/pygettext.py