-
Notifications
You must be signed in to change notification settings - Fork 481
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
Skip unchanged files in course content sync #36068
Conversation
bin/i18n/sync-out.rb
Outdated
sanitize_data_and_write(type_data, "dashboard/config/locales/#{type}.#{locale}.#{extension}") | ||
type_file = "dashboard/config/locales/#{type}.#{locale}.#{extension}" | ||
|
||
existing_data = YAML.load_file(type_file).dig(locale, "data", type) || {} |
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.
Aren't these json files now?
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.
d'oh! That's what I get for testing this before the other changes out there got merged
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.
Approach makes sense to me, just one question on file types.
Extends our earlier improvements to the sync out to also include course_content files.
Note that unlike the earlier improvements, this one comes with a slight change to functionality. Specifically, in order to be able to skip parsing some files without losing the data in them, we now merge the new data from the sync with the existing data. This means that removing a string from crowdin will no longer remove it from our system. I would definitely consider this a downside, but a relatively minor one compared to the significant time savings this change gets us. I am however quite open to discussion on that point!
Reviewer Checklist: