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
Creating locale for pt-BR (Brazilian Portuguese) #141
Conversation
With this commit the application will have a pt-BR locale available for usage.
Awesome @ramirovjr Thank you very much. Which "Created" button do you mean is not translatable? |
The one at the top of resource and I think it's 'Create' (sorry for posting the wrong label of the button) |
@ramirovjr I see. It is defined here: It uses the default translation from Rails, for creating models ( |
As detailed in the PR comments, I'm adding to the translations a key to enable the translation of the 'Create' button. Added the key to all the translation files available. refs #141
After creating the translation key for the 'Create' button, 2 tests were failing. Fixed by changing the reported lines to match the label defined in the translation file. refs #141
pt-BR: | ||
helpers: | ||
submit: | ||
create: Novo |
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 don't think we should add any translations outside of the godmin scope. It will affect the entire site. If we want these to be translatable only in godmin we should add specific translations for them inside the godmin scope.
You can just include the appropriate locale file and it will be translated. See:
https://github.com/svenfuchs/rails-i18n/blob/master/rails/locale/pt-BR.yml#L133-L139
Can you revert these changes and squash it into one commit please?
Yeah, no problem. |
@ramirovjr I cherry-picked your commit directly instead :) So no need for squashing. Thank you for the contribution! |
With this commit the application will have a pt-BR locale
available for usage.
I've tested using the sandbox application pointing to my GH fork and it was ok.
Also, I've noticed that some interface items (like the 'Created' button) is not on the translation file.
Whenever you make changes or add new translation items, feel free to ping me for updating the translation.