Skip to content

Conversation

@GeorgiaSkrempou
Copy link

Fixing a bug where _key would always initialize as None when calling using transifex.native.django.t

_key could be passed in the t function as part of unpacking **params.
However it was not passed further to tx.translate which expects _key as an arg, so _key would always initialized as None

example usecase that led to the bug:

from transifex.native.django import t

from translations import constants


def transifex_translated_stings(key_string: str):
    match key_string:
        case constants.INSPECTION_CHECKLIST:
            return t("INSPECTION CHECKLIST", _key="inspectionChecklist")

Used with django 4.1.13 and python 3.10 / python 3.12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant