-
Notifications
You must be signed in to change notification settings - Fork 481
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
Localize the password-reset email #41627
Conversation
255650b
to
d81ae10
Compare
I'm a bit confused why these strings have to be in a different Crowdin project. The strings don't contain PII, what are we worried about here? |
To me, the restricted CrowdIn project is for strings from sensitive contexts that we want to control and maintain high translation quality. Direct email from Code.org is considered sensitive. Email related to password is even more sensitive. |
Yep, it's about us not wanting bad or malicious translations for these strings, more so than others. In the future, things like the privacy policy and terms of service might live in this project. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, but it'd be nice if someone else can review the changes to bin/i18n/codeorg_restricted_crowdin.yml
, as I'm not very familiar with that code
@@ -32,6 +32,7 @@ files: [ | |||
# hourofcode content is handled by the hourofcode-specific sync | |||
"ignore" : [ | |||
"/source/hourofcode/**", | |||
"/source/dashboard/restricted.yml" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we care about generalizing the file names similar to the hourofcode path, for future proofing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now, it's only 1 file; and I think we will use just this 1 file for a while. Later, if we want to break it into more files we can change this config easily.
In addition, I put this file under /source/dashboard/
path so it can be processed by the current in-up-down-out code without much changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The email template needs to avoid string concatenation, otherwise it will be very challenging to translate.
FND-1481
Localize the password-reset email, which is sent by
Devise::Mailer
. Strings in this email are very sensitive. Thus, they are entrusted to only approved translators in the Code.org - Restricted CrowdIn project.This PR contains:
dashboard/app/views/devise/mailer/reset_password_instructions.html.erb
.dashboard/config/locales/restricted.en.yml
.bin/i18n-codeorg/in.sh
.bin/i18n/i18n_script_utils.rb
,bin/i18n/codeorg_restricted_crowdin.yml
, andbin/i18n/codeorg_crowdin.yml
.dashboard/test/models/user_test.rb
.Links
Testing story
Use
mailcatcher
to intercept emails sent on the local machine.For regular account (user who doesn't have associated child accounts)
Password-reset email in English
Password-reset email in es-MX
For user with associated child accounts
Password-reset email in English
Password-reset email in es-MX
bundle exec rails test test/models/user_test.rb
Follow-up work
i18n/locales/source/dashboard/restricted.yml
todasboard/restricted.yml
in Crowdin.dasboard/restricted.yml
files toi18n/locales/<locale_code>/dashboard/restricted.yml
. Currently, it downloads translated files toi18n/locales/<language_name>/dashboard/restricted.yml
. See this line.subject
string inreset_password_instructions
indevise.en.yml
bin/i18n/codeorg_restricted_credentials.yml
file to the i18n-dev server.Code.org - Restricted
project.Code.org
project toCode.org - Restricted
project. (link)Security
Only a few approved translators, likely all Code.org members, can join the Code.org - Restricted project.
PR Checklist: