mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 16:44:27 +08:00
9915236e42
This PR adds a feature to help admins stay up-to-date with their translations. We already have protections preventing admins from problems when they update their overrides. This change adds some protection in the other direction (where translations change in core due to an upgrade) by creating a notice for admins when defaults have changed. Terms: - In the case where Discourse core changes the default translation, the translation override is considered "outdated". - In the case above where interpolation keys were changed from the ones the override is using, it is considered "invalid". - If none of the above applies, the override is considered "up to date". How does it work? There are a few pieces that makes this work: - When an admin creates or updates a translation override, we store the original translation at the time of write. (This is used to detect changes later on.) - There is a background job that runs once every day and checks for outdated and invalid overrides, and marks them as such. - When there are any outdated or invalid overrides, a notice is shown in admin dashboard with a link to the text customization page. Known limitations The link from the dashboard links to the default locale text customization page. Given there might be invalid overrides in multiple languages, I'm not sure what we could do here. Consideration for future improvement. |
||
---|---|---|
.. | ||
admin_controller.rb | ||
api_controller.rb | ||
backups_controller.rb | ||
badges_controller.rb | ||
color_schemes_controller.rb | ||
dashboard_controller.rb | ||
email_controller.rb | ||
email_styles_controller.rb | ||
email_templates_controller.rb | ||
embeddable_hosts_controller.rb | ||
embedding_controller.rb | ||
emojis_controller.rb | ||
form_templates_controller.rb | ||
groups_controller.rb | ||
impersonate_controller.rb | ||
permalinks_controller.rb | ||
plugins_controller.rb | ||
reports_controller.rb | ||
robots_txt_controller.rb | ||
screened_emails_controller.rb | ||
screened_ip_addresses_controller.rb | ||
screened_urls_controller.rb | ||
search_logs_controller.rb | ||
site_settings_controller.rb | ||
site_texts_controller.rb | ||
staff_action_logs_controller.rb | ||
staff_controller.rb | ||
themes_controller.rb | ||
user_fields_controller.rb | ||
users_controller.rb | ||
versions_controller.rb | ||
watched_words_controller.rb | ||
web_hooks_controller.rb |