-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Improved localisation #2177
Improved localisation #2177
Conversation
…code ('en') if specific code ('en-us') doesn not match
}); | ||
this.languages_ = languagesToLower; | ||
} | ||
else { |
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 else
should be on the same line as the closing curly-brace of the preceding if
.
I think there may be an additional whitespace issue in here (@gkatsev, how's that code formatting build step going?) but looks good to me. |
if (options['languages']) { | ||
// Normalise player option languages to lowercase | ||
let languagesToLower = {}; | ||
Object.getOwnPropertyNames(options['languages']).forEach(function(value,index,array){ |
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.
space after commas.
It's coming along slowly. If someone wanted to run it locally, it's doable by installing |
Fixed those and other issues flagged by |
Suggested some changes here: mister-ben#1 |
Replaces #1873, which got messy after being stagnant so long...
de-DE
translation, usede
if available.en-us
but Chrome and Firefox useen-US
, these should be treated the same.addLanguage()
is still effective for players that had languages set as a setup option. Player-local languages take precedence.