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

Fix race interstitial #24052

Merged
merged 3 commits into from Aug 2, 2018
Merged

Fix race interstitial #24052

merged 3 commits into from Aug 2, 2018

Conversation

Hamms
Copy link
Contributor

@Hamms Hamms commented Aug 2, 2018

With the recent changes to only export English strings, we unfortunately broke the one place (that I could find) in our i18n code in which we are using an array of data; in the case of (for example) ar-SA, we were actually returning a value like:

[
  {white: "أبيض"},
  {black: "أسود أو أمريكي من أصل أفريقي"},
  nil,
  {asian: "آسيوي"},
  nil,
  nil,
  {other: "أخرى"},
  nil
]

(Note that this was only a problem for languages that had the races list partially translated; for languages that translated the whole thing we were obviously fine, and for languages that had none of them translated, the entire array fell back to English)

So instead, we convert this array into a hash and use a code constant to handle the iteration, so we're just looking up individual keys and the English fallback should now work fine:

image

I also cleaned up the i18n source and translation files with a simple sed script, and will do an i18n sync with these changes to make sure the translation data coming out of that is also correct.

Copy link
Contributor

@wjordan wjordan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 looks great, thanks for the quick fix!

@Hamms Hamms merged commit d3face8 into staging Aug 2, 2018
@Hamms Hamms deleted the fix-race-interstitial branch August 2, 2018 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants