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 contained levels in i18n sync #29015

Merged
merged 1 commit into from Jun 10, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 8 additions & 4 deletions bin/i18n/sync-codeorg-in.rb
Expand Up @@ -78,11 +78,15 @@ def localize_level_content

script.levels.each do |level|
url = get_level_url_key(script, level)
if level.is_a?(DSLDefined)
level.contained_levels.each do |contained_level|
dsl_i18n_strings.deep_merge! get_dsl_i18n_strings(contained_level)
end

# TODO: we also need to deal with contained levels that are not
# DSL-Defined, like FreeResponse. That, or just get rid of contained
# levels entirely.
level.contained_levels.each do |contained_level|
dsl_i18n_strings.deep_merge! get_dsl_i18n_strings(contained_level) if contained_level.is_a?(DSLDefined)
end

if level.is_a?(DSLDefined)
dsl_i18n_strings.deep_merge! get_dsl_i18n_strings(level)
else
# display_name
Expand Down