-
Notifications
You must be signed in to change notification settings - Fork 5
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
fix: 言語の表示を正しくする #311
fix: 言語の表示を正しくする #311
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.
In conclusion, this is a bug embedded in this PR.
#293
The Language string(e.g., JA) should be transformed to downcase and compared using Schedule.languages.has_key?
, but isn't.
Do not fix this by adding a new method language_text
in Schedule model, it should be corrected by comparing downcased string in the seed file.
結論から言うと、このPRでエンバグしてました。
#293
シードファイルに書かれてるJAみたいな文字列を、downcaseしてから Schedule.languages#has_key?
にかける必要があるんですが、そうなってないですね。
Scheduleモデルに新しい文字列をはやして対処するのではなく、seedの取り込み段階で修正する必要があります。
@@ -106,7 +106,11 @@ | |||
schedule.update!( | |||
title: presentation['title'], | |||
description: presentation['description'], | |||
language: presentation['language'].then { Schedule.languages.has_key?(_1) ? _1 : "en & ja" }.downcase | |||
language: case presentation['language'] |
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.
language: case presentation['language'] | |
language: presentation['language'].then(&:downcase).then { Schedule.languages.has_key?(_1) ? _1 : "en & ja" } |
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 know what this fix must be applied as soon as possible, so I approve it.
Fix details later.
割とすぐに入れないといけないことは理解しているので、いったんこれで行きましょう。
詳細は後日修正で。
Fix conflict plz |
#308
言語表示が
en & ja
となっているのを、セッションの情報に合わせてJapanese
、English
と表示するよう修正