-
Notifications
You must be signed in to change notification settings - Fork 89
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
737 all controllers i18n revision #791
737 all controllers i18n revision #791
Conversation
- Adds missing translations to corresponding en.yml - Fixes wrong look ups of translations
@@ -26,7 +26,7 @@ def create | |||
.new_adoption_application.deliver_now | |||
else | |||
redirect_to adoptable_pet_path(@pet), | |||
alert: "Error. Please try again." | |||
alert: t(".error") |
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.
So this finds the appropriately scoped translation? I have always called the full reference to it and did not know this would work!
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.
Yes, it's called lazy lookup. Important to notice that it is not ALWAYS suitable. Sometimes we have to use the full path. In tests or module helpers requires `I18n.t("full/path") since the path context is not clear.
ATE I18n rails documentation for this moment🤣
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.
LGTM - Just the one question bout the references. If that's all good, then merge away.
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.
Ah cool thank you for the info
@kasugaijin Once this is merged and I know it's all good I'll work on views so we can close the related issue. |
@wandergithub press that green button when you're ready :) |
@kasugaijin I don't have permission to merge. |
🔗 Issue
#737
✍️ Description
📷 Screenshots/Demos