From de6047cd09534d1054cb2344fb69031a2e3c53f5 Mon Sep 17 00:00:00 2001 From: Michael Z Date: Fri, 18 Feb 2022 10:53:25 -0500 Subject: [PATCH] Translate Show/Hide strings in the remember codename widget Previously untranslated because strings were injected via CSS, now referencing data attributes. Fixes #6287 --- securedrop/sass/source.sass | 4 ++-- securedrop/source_templates/lookup.html | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/securedrop/sass/source.sass b/securedrop/sass/source.sass index b4e1a80a49..9c20b64fd2 100644 --- a/securedrop/sass/source.sass +++ b/securedrop/sass/source.sass @@ -40,7 +40,7 @@ cursor: pointer &:after - content: "Show" + content: attr(data-show) display: block float: right @@ -56,7 +56,7 @@ &[open] summary &:after - content: "Hide" + content: attr(data-hide) @media only screen and (max-width: 880px) #codename-hint diff --git a/securedrop/source_templates/lookup.html b/securedrop/source_templates/lookup.html index efb4f1e8f8..05a42f4ebb 100644 --- a/securedrop/source_templates/lookup.html +++ b/securedrop/source_templates/lookup.html @@ -3,7 +3,9 @@ {% block body %} {% if new_user_codename %}
- {{ gettext('Remember, your codename is:') }} + + {{ gettext('Remember, your codename is:') }} + {{ new_user_codename }}
{% endif %}