discourse/app/controllers/admin
Ted Johansson 9915236e42
FEATURE: Warn about outdated translation overrides in admin dashboard (#22384)
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.
2023-07-10 10:06:40 +08:00
..
admin_controller.rb DEV: Apply syntax_tree formatting to `app/*` 2023-01-09 14:14:59 +00:00
api_controller.rb DEV: Apply syntax_tree formatting to `app/*` 2023-01-09 14:14:59 +00:00
backups_controller.rb SECURITY: Rate limit the creation of backups 2023-03-16 16:09:22 +01:00
badges_controller.rb UX: Easily toggle badges in admin badge list (#20225) 2023-02-09 11:36:27 -08:00
color_schemes_controller.rb DEV: Apply syntax_tree formatting to `app/*` 2023-01-09 14:14:59 +00:00
dashboard_controller.rb DEV: Apply syntax_tree formatting to `app/*` 2023-01-09 14:14:59 +00:00
email_controller.rb DEV: Remove unused raw-email code (#22364) 2023-07-05 18:13:30 +02:00
email_styles_controller.rb FEATURE: customization of html emails (#7934) 2019-07-30 15:05:08 -04:00
email_templates_controller.rb DEV: Apply syntax_tree formatting to `app/*` 2023-01-09 14:14:59 +00:00
embeddable_hosts_controller.rb FEATURE: Update topic/comment embedding parameters (#20181) 2023-02-28 14:31:59 +02:00
embedding_controller.rb DEV: Apply syntax_tree formatting to `app/*` 2023-01-09 14:14:59 +00:00
emojis_controller.rb DEV: Apply syntax_tree formatting to `app/*` 2023-01-09 14:14:59 +00:00
form_templates_controller.rb DEV: Show form templates in the composer (#21190) 2023-05-29 14:47:18 -07:00
groups_controller.rb DEV: Fix random typos (#22345) 2023-06-29 12:23:28 +02:00
impersonate_controller.rb DEV: Apply syntax_tree formatting to `app/*` 2023-01-09 14:14:59 +00:00
permalinks_controller.rb DEV: Apply syntax_tree formatting to `app/*` 2023-01-09 14:14:59 +00:00
plugins_controller.rb DEV: Apply syntax_tree formatting to `app/*` 2023-01-09 14:14:59 +00:00
reports_controller.rb DEV: Prefer \A and \z over ^ and $ in regexes (#19936) 2023-01-20 12:52:49 -06:00
robots_txt_controller.rb DEV: Apply syntax_tree formatting to `app/*` 2023-01-09 14:14:59 +00:00
screened_emails_controller.rb DEV: Apply syntax_tree formatting to `app/*` 2023-01-09 14:14:59 +00:00
screened_ip_addresses_controller.rb DEV: Apply syntax_tree formatting to `app/*` 2023-01-09 14:14:59 +00:00
screened_urls_controller.rb DEV: Apply syntax_tree formatting to `app/*` 2023-01-09 14:14:59 +00:00
search_logs_controller.rb DEV: Apply syntax_tree formatting to `app/*` 2023-01-09 14:14:59 +00:00
site_settings_controller.rb FEATURE: Add default site settings to control the defaults of navigation menu preferences (#22485) 2023-07-07 04:52:10 +03:00
site_texts_controller.rb FEATURE: Warn about outdated translation overrides in admin dashboard (#22384) 2023-07-10 10:06:40 +08:00
staff_action_logs_controller.rb DEV: Apply syntax_tree formatting to `app/*` 2023-01-09 14:14:59 +00:00
staff_controller.rb Refactor admin base controller (#18453) 2022-10-31 12:02:26 +00:00
themes_controller.rb DEV: Refactor updating parent/child relationships between themes (#22244) 2023-06-22 13:57:39 -05:00
user_fields_controller.rb DEV: Apply syntax_tree formatting to `app/*` 2023-01-09 14:14:59 +00:00
users_controller.rb DEV: Move distance_of_time_in_words/time_ago_in_words (#21745) 2023-05-25 14:53:59 +02:00
versions_controller.rb Refactor admin base controller (#18453) 2022-10-31 12:02:26 +00:00
watched_words_controller.rb DEV: Apply syntax_tree formatting to `app/*` 2023-01-09 14:14:59 +00:00
web_hooks_controller.rb DEV: Apply syntax_tree formatting to `app/*` 2023-01-09 14:14:59 +00:00