Hi Everyone, I experience similar situation where I localized the topic and have both full EN and FR translation but this pinned topic only shows original abstract. Switching language basically only “update” its title in the home page. Is there any workaround ? It seems that you guys made it work for meta.discourse.org (see the welcome pinned message “New to Discourse?Start Here” that successfully switch languages even the abstract in the home page) ![]()
Thanks for sharing, I’ll have a look at this.
This is a detail for extra info - excerpts and titles are attached to TopicLocalizations (a localization of a topic). The post content is attached to a PostLocalization.
So what is likely happening is that we may need to “refresh” the excerpt when the topic’s first post has modifications to their localization.
Hi Nat ![]()
Thank you so much for your help and support. If this can be of any help for investigating:
Example of expected behaviors on meta.discourse.org with the “New to Discourse? Start Here” pinned topic that is well updating its title + abstract when we switch language. That’s what I am looking to have as well.
Example of similar issue on meta.discourse.org as I have on my own instance:
Support - Discourse Meta looking at the “About the Support category” pinned topic. Switching language to french only update its title but abstract remains in english. I basically experience the same ![]()
Thank you for your help and support,
Cheers,
Terenui
This has been fixed with
- FIX: Update topic excerpts when the first post is localized by nattsw · Pull Request #36885 · discourse/discourse · GitHub
- and also DEV: Add rake task to backfill localization excerpts which were empty by nattsw · Pull Request #36901 · discourse/discourse · GitHub
This should also be fixed ![]()
One thing to note though for self-hosters with missing localized excerpts: you will need to update, then run the following rake task [1] in your console
bundle exec rake topic_localizations:backfill_excerpts
## or possibly with sudo
sudo -E -u discourse bundle exec rake topic_localizations:backfill_excerpts
so that the empty localized excerpts may be populated.
Alternatively if the rake task is not possible, a more manual way is to re-translate the first post of topics that are affected.
Some might ask - “Why not a migration which is automatic?”, because we use
PrettyTexthere for the excerpts, and as usual we do try to avoid application code in migrations. ↩︎
Thanks a lot !! I’ll upgrade my instance after New Year and let you know if I still have any issues but thanks for this efficient and fast response
Cheers
