Hi,
is it possible to add the Topic Title translation at the beginning of the translated text (see red arrow below)?
סיכום מבוסס בינה מלאכותית
Users are requesting the ability to translate topic titles in Discourse, both within the topic view and in topic lists, to improve usability and avoid blind clicks. AndreaG initiated the discussion, noting that translated titles should appear at the top of translated content. icaria36 and pmusaraj emphasized the need for translations in topic lists, while hansdreesen noted the oddity of mismatched title/content languages. nealmcb referenced Tgr to highlight how the lack of translated titles degrades read tracking and notification systems. angus outlined a spec for automatic title translation upon topic creation, storing translations in topic custom fields, and syncing updates — with optional bulk translation and search integration. angus confirmed plans to integrate with Discourse Translator, and later shared a PR that was ultimately closed. mnalis inquired about its status, and kris.kotlarek confirmed that basic title translation was merged via PR #130. th0rgall praised the implementation but suggested moving the translate button before the title and adding translation to topic lists, with visual examples. thoka asked for updates on auto-translation in topic lists, noting no instances currently offer this without user intervention.
The possibility to translate the title as described above is important, otherwise users have to click the translation blindly only to know whether they are interested.
The real deal would be the possibility to have the titles translated already in the topic lists, so users can browse topics and click only those they are interested about, just like all of us do here in English. However, it is easy to see that this feature would be way more complex to implement.
Agreed with both requests, it would be great to have topic titles be translatable in both the topic view and topic lists.
I agree. At least in the topic view. Seeing the title in the original language but the content in your own, is a bit odd.
If this is expensive (technically and economically) because of the number of queries to the API that listing a page would require, one possible solution would be to show the translations of those titles that have been queried already (through topic view), and are therefore available in the database.
As noted by Tgr at https://forum.movement-strategy.org/t/automatic-translation-for-the-topic-titles/259/6?u=nealmcb, this is multi-faceted, and degrades the utility of topic-tracking in the rest of Discourse:
There are several pieces to this:
- When I click the “translate” icon on comment 0 of the topic, it should translate the topic title as well, not just the comment body.
- When I am browsing a list of topics (such as a category page), there should be a way to translate the titles. Having to enter the topic just to be able to see what it is about is inconvenient, and conflicts with Discourse’s read tracking / notification system (e.g. from now on I’ll see the blue new comment counts on that topic, which is distracting if it is a topic I am not interested in).
- Ideally, if the translations for the topics are stored already, they should be displayed from the start. I don’t want to click translate a hundred times when I enter a category to look around. (This is true for comment bodies as well, but less annoying there.)
Pavilion is considering a request from a potential client to add this feature. This is the spec we’re considering. Comments welcome.
Core Feature
-
Translate topic titles into a predefined list of locales, defined by a site setting, upon topic creation.
-
Translations will be stored in topic custom fields as
locale : translationkey pairs (same as the key pairs for posts currently stored in post custom fields) -
Title translations will be automatically updated on title edit. This can be disabled by a site setting.
Additions
-
Allow the topic translation controls to translate the title into additional locales beyond the predefined list, including perhaps by users without topic edit privileges.
-
Add a rake task to bulk translate existing titles
-
Integrate title translations into search
@angus this is very interesting, thank you.
Are you considering in this spec an interaction with Discourse Translator and its cached translations via automatic translation?
Yes, we’re planning to make a PR to the Translator plugin.
This core spec here will be worked on by me in July (due at the end of the month), culminating in a PR to the Translator plugin
For those following this, note that this does not include search or the translation of existing titles. If you want those features please reach out and we can look at building them.
As promised here’s the PR that adds topic title translations to the Translator Plugin
Hi, I come here from OpenStreetMap Discourse instance thread.
Being able to see translated topic title would’ve been very useful there. I’ve looked at that github PR (for which I’d very much like to thank @angus
), but that specific PR #79 seems to have been closed without merging in the end.
Was it implemented somewhere else, or some other approach tried if this was not the most wanted one? i.e. this feature implemented somewhere in Discourse via some other way, and if not, could it be?
Thanks for getting this first implementation merged!
It’s a great start to have the title translated along with the topic content.
As feedback:
-
I agree with “I feel like we can put the translate button before the topic title?” suggested here in the GitHub Thread. In a long opening post, getting to the translate button requires first scrolling down considerably.
-
I think having a topic title translate button (or configurable auto-translation?) in the topic list view would be valuable: then an other-language reader can more easily decide whether they want to jump into the topic or not. I’m including some location suggestions for my specific use case/community below, where at least 3 languages may be spoken (NL, FR, EN).
This pull request was not merged, as it appears.
Could you provide a brief update regarding your experiences in this direction?
Are there any Discourse instances currently displaying automatic translations of titles without requiring user intervention?
https://github.com/discourse/discourse-translator/pull/79#issuecomment-1468893425


