Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configurable behavior when translated string interpolation fails. #1763

Open
ewdurbin opened this issue Nov 17, 2022 · 0 comments · May be fixed by #1764
Open

Configurable behavior when translated string interpolation fails. #1763

ewdurbin opened this issue Nov 17, 2022 · 0 comments · May be fixed by #1764

Comments

@ewdurbin
Copy link

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

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 a pull request may close this issue.

1 participant