Skip to content

Configurable behavior when translated string interpolation fails. #1763

@ewdurbin

Description

@ewdurbin

Similar to #421 when translation strings are not kept perfectly up to date, changes to the names of variables in strings can break behavior on a site. I'd like to see some way to manage this behavior via a policy similar to the ext.i18n.trimmed that would fallback to the untranslated string in scenarios where KeyError is raised.

PyPI.org's codebase (pypi/warehouse) is translated by volunteers, so occasionally when we change our templates to use new or different variable names translations fall out of sync and raise errors when trying to render them.

Our work around is pretty fragile: pypi/warehouse@94d9503#diff-8125a22a065160a5ac02ff19f3dc404a6d92ecfdf31b496dc9446120f59eb6ff

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions