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

Parts of print/export dialog are not translatable #1534

Closed
eloquence opened this issue Jul 13, 2022 · 0 comments · Fixed by #1539
Closed

Parts of print/export dialog are not translatable #1534

eloquence opened this issue Jul 13, 2022 · 0 comments · Fixed by #1539
Labels
bug Something isn't working

Comments

@eloquence
Copy link
Member

Description

The initial headings in the print/export dialog are not translatable, even though translations exist in Weblate

Steps to Reproduce

  1. Start the app with changes in feat: enable pt_PT and zh_Hans as supported languages #1531 using LANG=pt_PT securedrop-client or similar.
  2. Initiate a print or export dialog

Expected Behavior

Entire dialog is translated

Actual Behavior

Only parts of dialog are translated:

translate1
translate2

Comments

This appears to be due to the common issue where string substitution is applied to a string prior to passing it to the translation function, which means that the string content is not constant, and translation lookup will fail.

self.starting_header = _(
"Preparing to print:"
"<br />"
'<span style="font-weight:normal">{}</span>'.format(self.file_name)
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant