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
Use FreeResponse translations #33974
Conversation
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 except I could you double check my comment about removing the default placeholder text?
@@ -48,8 +48,7 @@ | |||
ReactDOM.render(React.createElement(dashboard.Attachments, {showUnderageWarning: !appOptions.is13Plus, readonly: #{!!@view_options.readonly_workspace}}), document.querySelector('#free-response-upload')); | |||
|
|||
- height = level.height || '80' | |||
-# FND-984 placeholder needs to be localized level property. | |||
- placeholder = level.placeholder || I18n.t('free_response.placeholder') |
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.
I think we still want the || I18n.t('free_response.placeholder')
so the default text is still there. Most levels don't define the 'placeholder' property.
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.
oh, good catch!
dashboard/config/locales/en.yml
Outdated
@@ -719,8 +719,6 @@ en: | |||
help_support: "Help and support" | |||
documentation: "Documentation" | |||
tutorials: "Tutorials" | |||
free_response: | |||
placeholder: "Enter your answer here" |
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.
Related to comment above. I'm not sure we want to remove this.
…placeholder values.
Use translations of FreeResponse fields (added in #33970) in the view. Also remove the placeholder placeholder we added to hold us over until now.
Links
Testing story
Added a test translation file to
dashboard/config/locales/free_responses.es-MX.yml
:Then checked
http://localhost-studio.code.org:3000/s/csp1-2018/stage/1/puzzle/3/lang/es-mx
:Reviewer Checklist: