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

gettext calls containing formatted strings produce untranslated text #5755

Closed
rmol opened this issue Jan 27, 2021 · 0 comments · Fixed by #5881
Closed

gettext calls containing formatted strings produce untranslated text #5755

rmol opened this issue Jan 27, 2021 · 0 comments · Fixed by #5881
Labels
i18n Anything related to translation or internationalization of SecureDrop

Comments

@rmol
Copy link
Contributor

rmol commented Jan 27, 2021

Description

There are a few places where we do gettext('something about {}'.format('blah')) instead of gettext('something about {}').format('blah') and the misplaced .format call has gettext looking for the formatted string in the message catalogs. When it can't be found, English appears in the user interface.

Steps to Reproduce

  • make dev
  • visit the JI admin interface, choose a language other than English, and add a user or edit dellsberg.
  • try to change the first name to something longer than 100 characters.

Expected Behavior

The flashed error message should be in the selected language.

Actual Behavior

It's in English.

name-too-long-english

Comments

There are at least these occurrences:

@rmol rmol added the i18n Anything related to translation or internationalization of SecureDrop label Jan 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
i18n Anything related to translation or internationalization of SecureDrop
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant