Skip to content

Warn of non-lazy gettext is used in static code #6

@ljodal

Description

@ljodal

Provide a warning if any of the non-lazy gettext functions are used outside of functions and methods. Ie

from django.utils.translation import gettext

# This will be translated with the language active when the module is loaded,
# which is probably not what the author intended.
FOO = gettext("test")  # Should use gettext_lazy

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions