translation-positional-used (W8120)#

A translated string has several positional placeholders.

What it does#

Reports translated strings with two or more positional placeholders, such as %s ... %s or {} ... {}.

Why is this bad?#

Translators cannot change the order of positional placeholders, but other languages often need the values in another order.

Example#

_("%s created %s", user.name, record.name)

Use instead:

_("%(user)s created %(record)s", user=user.name, record=record.name)