-
Notifications
You must be signed in to change notification settings - Fork 755
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
Add translations for medications to ja.yml #1263
Add translations for medications to ja.yml #1263
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.
Thanks as always for working on these! Left my comments.
units: | ||
display: '%{count} %{unit}' | ||
mg: mg | ||
ml: ml | ||
tablets: | ||
one: tablet | ||
other: tablets | ||
one: 錠 |
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 I was doing some testing locally, I tried using the translated unit for tablet (錠) and then the Medications page became unusable after saving.
Looking in the logs revealed this:
20:15:42 web.1 | Medication Load (0.5ms) SELECT "medications".* FROM "medications" WHERE "medications"."user_id" = $1 ORDER BY created_at DESC LIMIT $2 OFFSET $3 [["user_id", 1], ["LIMIT", 6], ["OFFSET", 0]]
20:15:42 web.1 | Rendered search/_posts.html.erb (1.1ms)
20:15:42 web.1 | Rendered medications/_story_body.html.erb (5.1ms)
20:15:42 web.1 | Rendered collection of medications/_medication.html.erb [1 times] (10.7ms)
20:15:42 web.1 | Rendered medications/index.html.erb within layouts/application (23.6ms)
20:15:42 web.1 | Completed 500 Internal Server Error in 56ms (ActiveRecord: 1.3ms)
20:15:42 web.1 |
20:15:42 web.1 |
20:15:42 web.1 |
20:15:42 web.1 | ActionView::Template::Error (translation missing: ja.medications.units.錠):
20:15:42 web.1 | 4: </div>
20:15:42 web.1 | 5: <div>
20:15:42 web.1 | 6: <strong><%= t('medications.quantity') %></strong>
20:15:42 web.1 | 7: <%= t('medications.units.display', count: local_assigns[:medication].total, unit: t("medications.units.#{local_assigns[:medication].total_unit}", count: local_assigns[:medication].total)) %>
20:15:42 web.1 | 8: </div>
20:15:42 web.1 | 9: <div>
20:15:42 web.1 | 10: <% if local_assigns[:medication].daily? %>
@nshki @julianguyen before I merge, should I be concerned about this?
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.
This appears to not just be limited to Japanese. I tried this out with German and got the same behavior. I'll log a bug regarding this.
Description
Japanese translations continued.
Corresponding Issue
#1215
Test Coverage
✅