discourse/spec
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
..
fabricators FEATURE: Warn about outdated translation overrides in admin dashboard (#22384) 2023-07-10 10:06:40 +08:00
fixtures FEATURE: Basic support for threads.net onebox (#22471) 2023-07-06 16:02:49 -03:00
helpers DEV: Replace #pluck_first freedom patch with AR #pick in core (#19893) 2023-02-13 12:39:45 +08:00
import_export DEV: Apply syntax_tree formatting to `spec/*` 2023-01-09 11:49:28 +00:00
initializers DEV: Fix test (#22018) 2023-06-08 16:12:13 -05:00
integration DEV: Update the rubocop-discourse gem 2023-06-26 11:41:52 +02:00
integrity DEV: Update TranslateAccelerator missing translation string (#22158) 2023-06-16 15:28:03 +01:00
jobs FEATURE: Warn about outdated translation overrides in admin dashboard (#22384) 2023-07-10 10:06:40 +08:00
lib FEATURE: Separated 'trusted users can edit others' setting for trust level 3 & 4 (#21493) 2023-07-07 10:48:14 -05:00
mailers DEV: Update the rubocop-discourse gem 2023-06-26 11:41:52 +02:00
models FEATURE: Warn about outdated translation overrides in admin dashboard (#22384) 2023-07-10 10:06:40 +08:00
multisite DEV: Remove Discourse.redis.delete_prefixed (#22103) 2023-06-16 12:44:35 +10:00
requests FEATURE: Separated 'trusted users can edit others' setting for trust level 3 & 4 (#21493) 2023-07-07 10:48:14 -05:00
script/import_scripts DEV: Correct syntax_tree violations 2023-02-02 13:03:11 +00:00
serializers DEV: Update the rubocop-discourse gem 2023-06-26 11:41:52 +02:00
services FIX: post alerter notification when topic directly watched (#22433) 2023-07-06 11:27:23 +10:00
support DEV: Normalize key modifier checks for keyboard shortcuts (#22451) 2023-07-06 13:34:24 +10:00
system FIX: Can't dismiss new topics for experimental new new view (#22484) 2023-07-07 08:28:27 +08:00
tasks DEV: Capture output in hashtags spec (#20773) 2023-03-23 11:47:14 +10:00
views DEV: Fix random typos (#22078) 2023-06-13 22:02:21 +02:00
rails_helper.rb Revert "FIX: Always clear caches after committing the current transaction" (#22493) 2023-07-07 18:05:38 -05:00
regenerate_swagger_docs DEV: Add API docs for uploads and API doc watcher (#15387) 2021-12-23 08:40:15 +10:00
swagger_helper.rb DEV: Apply syntax_tree formatting to `spec/*` 2023-01-09 11:49:28 +00:00