TL;DR: The existing translation override rudely overrides the outdated custom translation with the new translation, causing type issues. Or, here, failed to update the outdated translation override to “outdated”
The issue
The forum I manage has an override for the translation js.user.preferences. Before this commit, it was a string, so the translation override worked fine.
After this commit, the key becomes an object. However, the translation override does not detect the key type, but directly overrides it to the old defined string. This causes the translation of the key to be missing in the interface.
How to reproduce
For latest forums, this seems to require manually inserting an outdated record to trigger
INSERT INTO translation_overrides
(locale, translation_key, value, created_at, updated_at)
VALUES
('en', 'js.user.preferences', 'test', current_timestamp, current_timestamp);
Then modify a site text at random to trigger the update
It seems that somehow, the status of this override was not updated to “outdated”
[5] pry(main)> TranslationOverride.last
TranslationOverride Load (1.2ms) SELECT "translation_overrides".* FROM "translation_overrides" ORDER BY "translation_overrides"."id" DESC LIMIT 1
=> #<TranslationOverride:0x00007f0b20a31e20
id: 18,
locale: "en",
translation_key: "js.user.preferences",
value: "test",
created_at: Tue, 23 Jul 2024 17:08:17.317404000 UTC +00:00,
updated_at: Tue, 23 Jul 2024 17:08:17.317404000 UTC +00:00,
compiled_js: nil,
original_translation: nil,
status: "up_to_date">



