Skip to content
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

Merged
merged 3 commits into from
Nov 13, 2018
Merged

Add translations for medications to ja.yml #1263

merged 3 commits into from
Nov 13, 2018

Conversation

toryalsip
Copy link
Contributor

Description

Japanese translations continued.

Corresponding Issue

#1215

Test Coverage

Copy link
Member

@nshki nshki left a 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.

config/locales/ja.yml Outdated Show resolved Hide resolved
config/locales/ja.yml Outdated Show resolved Hide resolved
config/locales/ja.yml Outdated Show resolved Hide resolved
config/locales/ja.yml Outdated Show resolved Hide resolved
config/locales/ja.yml Outdated Show resolved Hide resolved
config/locales/ja.yml Outdated Show resolved Hide resolved
config/locales/ja.yml Outdated Show resolved Hide resolved
config/locales/ja.yml Outdated Show resolved Hide resolved
config/locales/ja.yml Outdated Show resolved Hide resolved
@toryalsip toryalsip self-assigned this Nov 13, 2018
units:
display: '%{count} %{unit}'
mg: mg
ml: ml
tablets:
one: tablet
other: tablets
one: 錠
Copy link
Contributor Author

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.

image

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?

Copy link
Contributor Author

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.

@toryalsip toryalsip merged commit 26aa513 into ifmeorg:ja-translations Nov 13, 2018
@toryalsip toryalsip deleted the ja-yml-medications branch November 13, 2018 01:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants