Hi all.
With the update I made about 1 week ago, a button display problem appeared on the user profile page as follows. I thought it could be fixed with the update to be made in the following days, and although I made the ongoing updates, it did not improve.
Does the text work on your profile here at Meta?
Have you customized the string in the past?
I also found this topic Turkish translation issue with share dialog so maybe try a rebuild.
There doesnāt seem to be any problem in meta. But the problem persists on my own site. I didnāt do any customization/localization.
I also tried the solution in the link you gave and rebuilt the Discourse. Unfortunately it didnāt work.
Have you tried a different browser or a private browsing / incognito tab?
Thank you for your concern.
I tried it in 4 different browsers and mobile. I can clearly say that it doesnāt work.
Then you have probably also tried safe mode already.
The problem persists in Safe Mode unfortunately. . .
Moved this to support:
Seeing the text properly hereā¦ are you sure you updated to absolute latest?
I think this is related to
I was able to reproduce the issue that the string for preferences in Turkish was broken. I customized js.user.preferences before updating and after the update the new js.user.preferences.title was broken.
Then I ran
TranslationOverride.where(translation_key: "js.user.preferences").delete_all
TranslationOverride.send(:reload_locale!)
and this fixed it
But I would wait for confirmation from someone with more knowledge before I would try to do this myself on a production site
When I check, the text value appears correct.
I changed the default text but it still didnāt work and the same problem persists.
Is it safe to do this in a production environment? Can someone guide?
No text customization works on the forum. It doesnāt just apply to this area.
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">
Iāve slipped your repro over to the previous reports to keep them grouped together.
Wow, I didnāt see there was a same bug report here ()
Iām already tracking it down, but itās weird, I think this should work fineā¦ I donāt know whatās going on here
This should be safe to do on a production site. (though please take a backup before attempting changes in the rails console, as accidents can happen)
Though if no text customisations are working, are you sure this is the same issue?
This issue has been resolved with the latest update. (3.4.0.beta1-dev)
Yes, I also confirm that the issue has been resolved with the current update.
Just to round this out, hereās the PR for the fix:
This topic was automatically closed after 14 hours. New replies are no longer allowed.