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
Translate actions in articles view #14911
Translate actions in articles view #14911
Conversation
|
Thank you for opening this PR! We appreciate you! For all pull requests coming from third-party forks we will need to A Forem Team member will review this contribution and get back to |
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.
Thanks a lot for the contribution, just some minor comments.
app/views/articles/_actions.html.erb
Outdated
| @@ -5,23 +5,23 @@ | |||
| <%= render partial: "articles/reaction_button", | |||
| locals: { | |||
| category: :like, | |||
| description: "Heart", | |||
| description: t("core.heart"), | |||
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 should eventually start using namespaced keys more, I'd suggest core.reactions.heart, etc.
config/locales/en.yml
Outdated
| @@ -57,9 +58,12 @@ en: | |||
| read_next: "Read next" | |||
| reply: "Reply" | |||
| report_abuse: "Report abuse" | |||
| save: Save | |||
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.
While it's strictly speaking not necessary, we opted for quoting all strings in our translation files, please keep it this way. This also avoids some issues with YAML's implicit typing, e.g.
YAML.load("- yes\n- maybe\n- no")
#=> [true, "maybe", false]|
Hi @mtayllan, I took the liberty to fix the conflict and merge main in |
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.
Thanks @mtayllan!
|
@citizen428 @mtayllan for some reason specs are failing because Cypress is seeing the text in French but the test code expects them in English: https://app.travis-ci.com/github/forem/forem/jobs/541750706#L2527 it's quite odd :D |
The last merge from main changed the translation in the en.yml I'll fix that |


What type of PR is this? (check all applicable)
Description
This add Internationalization to the actions that are displayed at left of an article.
Related Tickets & Documents
https://dev.to/devteam/forem-hacktoberfest-let-s-internationalize-404n
#14888
QA Instructions, Screenshots, Recordings
UI accessibility concerns?
None
Added/updated tests?