Page MenuHomePhabricator

View translated messages in Talk pages
Open, Needs TriagePublic

Description

Especially on multi-language sites (such as Mediawiki.org), users may participate in discussions posting on different languages. When that happens, users that do not speak that language usually make use of an on-line automatic translation service to get a general idea of the given message. That adds another barrier for participation.

An option to "view translation in X" (being X a language the user understands) would be helpful. It will save the user the steps of copying the whole message, going to an external website losing the links and format in the way). This is a common pattern users may have experienced in other sites such as twitter or facebook.

Considering that ContentTranslation already provides an automatic translation service (based on multiple translation providers) for some languages, providing the above capability should be possible (as long as the language of the original message can be identified).

In order to simplify the process for the user, it may be convenient to auto-detect the source language based on content (T99666)

Event Timeline

For what it's worth, the Editing Team supports this idea and does not see any reason for us to block y'all (the Language Team) on exploring it!

Having spoken to @Nikerabbit and @Esanders, it sounds like the Language Team has everything you need to work on this if/when you prioritize.

Tho, we would value being involved with how the user experience is implemented.

If you want to fetch comment contents in the client you can use the JS API, mw.dt.pageThreads is an instance of ThreadItemSet, and can be use to fetch DOM ranges:

First comment in the first thread:
mw.dt.pageThreads.getThreads()[0].replies[0].getNativeRange().cloneContents()

For a specific ID:
mw.dt.pageThreads.findCommentById( id ).getNativeRange().cloneContents()

Change 966857 had a related patch set uploaded (by Esanders; author: Esanders):

[mediawiki/extensions/ContentTranslation@master] [POC] Provide translations links for talk page comments

https://gerrit.wikimedia.org/r/966857