
Fix messages are not shown in preferred language
Problem: When a user prefers "ko-KR" and Yobi has a "ko" message, Yobi does not show "ko" messages for the user because PlayFramework thinks "ko" does not match with "ko-KR". Solution: Rename message files to have country code; e.g. messages.ko -> messages.ko-KR.
@43d2c6b5fa85172dcd875477f625b5b3afda685e
--- conf/application.conf.default
+++ conf/application.conf.default
... | ... | @@ -29,7 +29,7 @@ |
29 | 29 |
|
30 | 30 |
# The application languages |
31 | 31 |
# ~~~~~ |
32 |
-application.langs="en, ko, ja" |
|
32 |
+application.langs="en-US, ko-KR, ja-JP" |
|
33 | 33 |
|
34 | 34 |
# Global object class |
35 | 35 |
# ~~~~~ |
--- conf/messages.ja
+++ conf/messages.ja-JP
No changes |
--- conf/messages.ko
+++ conf/messages.ko-KR
No changes |
--- test/controllers/PasswordResetAppTest.java
+++ test/controllers/PasswordResetAppTest.java
... | ... | @@ -34,7 +34,7 @@ |
34 | 34 |
@Test |
35 | 35 |
public void testRequestResetPassword_validLoginIdAndEmailAddress() { |
36 | 36 |
Map<String, String> config = support.Helpers.makeTestConfig(); |
37 |
- config.put("application.langs", "ko"); |
|
37 |
+ config.put("application.langs", "ko-KR"); |
|
38 | 38 |
|
39 | 39 |
running(support.Helpers.makeTestApplication(config), new Runnable() { |
40 | 40 |
public void run() { |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?