-
-
Notifications
You must be signed in to change notification settings - Fork 33.1k
Closed as not planned
Labels
triagedThe issue has been accepted as valid by a triager.The issue has been accepted as valid by a triager.type-featureA feature request or enhancementA feature request or enhancement
Description
Feature or enhancement
Proposal:
(Wasn't sure whether to categorize this as a bug or a feature, but went for latter to be safe)
Pygettext currently disallows all f-strings, even those which don't contain any formatted values such as f'foo'
.
I propose to allow pygettext to extract constant f-strings. Ideally, your linter would warn you about such f-strings,
but there is no harm in allowing them.
As a precedent, both xgettext and babel allow constant f-strings (though in the case of xgettext it might be accidental since
xgettext also extracts non-constant f-strings).
In short, I propose that this is extracted:
_(f'foo')
while this remains disallowed:
_(f'foo {x}')
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
No response
Linked PRs
StanFromIreland
Metadata
Metadata
Assignees
Labels
triagedThe issue has been accepted as valid by a triager.The issue has been accepted as valid by a triager.type-featureA feature request or enhancementA feature request or enhancement
Projects
Status
Done