Page MenuHomePhabricator

Surface the article the user is trying to create when suggesting to translate
Closed, ResolvedPublic

Description

When users are creating a new page, we want to let them know that translating is an alternative. The solution supported in T216032 provides a generic entry point to start a translation where users have to search for the article to translate.

In many cases it is not possible to guess which is the corresponding article in another language for the article that the user is trying to create (but does not exist yet). However, there are cases where we can have a reasonable guess. Depending on suggestions obtained through the API (T227571), we show either generic invite (when there are no suggestions) or we show the new page invite which will include a specific suggestion:

New page invite without suggestionNew page invite with a suggestionTranslation dashboard with the selected translation pre-filled

When to show which invite

We'll show the invites with following conditions:

  • Both invites will be shown only on wikis where Content Translation is enabled by default (no longer in beta).
  • When the system is confident that the suggested source article (T227571) and language are relevant for the user, show the invite with specific suggestion.
  • When the system cannot provide good suggestion for source article, generic invite from T216032 should be shown. It is better to show the generic invite than showing an irrelevant proposal.

Design details

  • Note that this invite can be shown multiple times for a user, if conditions from above are met.
  • A cog icon provides access to the preferences (T223896) as a way to disable entry points if needed. Note that the settings are only available for wikis where the tool is available as default (i.e. out of beta).
  • Clicking on the suggestion will lead to the Translation dashboard with the translation information pre-filled. Ready for the user to confirm and start to translate.
  • The "Find another page to translate" option will lead the user to the translation dashboard with the new translation dialog open for the user to search for an article to translate.
  • We may want to filter out disambiguation pages, not showing them as a suggestion.

Approaches to explore for getting good suggestions

Suggestions are provided by cxserver API developed for T227571 and are based on the criteria below.

To support this, we need strategies to have good guesses about the source article and the source language. Some approaches are listed below, but other ideas can be explored:

For the source article we can consider:

  • Articles with the same title. This may work for articles on proper names or scientific names that do not change across languages (at least for the same script).
  • Use machine translation (when available) to find the article.
  • Use Wikidata labels to find the article.

For the source language we can consider:

  • The language (other than the current one) where the user has more contributions.
  • A language the user has accessed (based on the ULS-CompactLinks ), giving priority to larger wikis which are more likely to act as source languages.

Details

Related Gerrit Patches:
mediawiki/extensions/ContentTranslation : masterShow translation option when creating a new article
mediawiki/extensions/ContentTranslation : masterShow the invitation to translate when creating new one, more than once

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 19 2019, 12:16 PM
cmadeo added a subscriber: cmadeo.Feb 19 2019, 6:11 PM
santhosh claimed this task.Feb 26 2019, 9:36 AM
santhosh removed santhosh as the assignee of this task.
santhosh added a subscriber: santhosh.

Given that our data shows that articles created as a translation are more likely to survive, we may want to show this invite (only for the case where there is a specific article to translate from) regularly, not just once.

We need to check that the suggestions provided are relevant, and that the way to guess the user language is good to target multilingual users. In addition, we may need to provide a way to access the settings (T223896) for those not interested in language entry points (similar to T217827).

Pginer-WMF updated the task description. (Show Details)Jul 29 2019, 2:13 PM
Pginer-WMF updated the task description. (Show Details)Jul 29 2019, 3:13 PM

Change 528632 had a related patch set uploaded (by Santhosh; owner: Santhosh):
[mediawiki/extensions/ContentTranslation@master] Show the invitation to translate when creating new one, more than once

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

@Pginer-WMF should this be shown to users who are already aware of Content Translation? Since it could be shown multiple times, assuming user accepted first invite, the answer seems to be yes.
With that assumption, I merged patch from @santhosh which allows the invite to be shown to CX users.

Change 528746 had a related patch set uploaded (by Santhosh; owner: Santhosh):
[mediawiki/extensions/ContentTranslation@master] WIP: Show translation option when creating a new article

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

Change 528632 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] Show the invitation to translate when creating new one, more than once

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

Screenshot based on the above patch

I used the following set as suggestion candidate languages:

  • navigator.language - The browser accept language
  • navigator.languages - The configured language preferences given by browser
  • mw.uls.getPreviousLanguages - Previously visited languages using ULS

Me and @Pginer-WMF were discussing why the design has changed from T216032, when the invite was not shown to anyone yet, since no wikis have Content Translation out of beta. Turns out that generic dialog from T216032 should be displayed when we don't have a good source article to suggest to the user. I will update description of this ticket to include new information.

Me and @Pginer-WMF were discussing why the design has changed from T216032, when the invite was not shown to anyone yet, since no wikis have Content Translation out of beta. Turns out that generic dialog from T216032 should be displayed when we don't have a good source article to suggest to the user. I will update description of this ticket to include new information.

The new dialog was implemented by removing that old design. So having both is not easy- especially when all these widgets are custom components and not provided by UI library. Is there a mid way? For example, instead of having completely different dialogs. maintain one and have a small variation when suggestion is not present? This would be also an opportunity to fix the design where we show a small width button which does not fit title and description in many cases,

In cany case, consider it as a new ticket and iteration.

Me and @Pginer-WMF were discussing why the design has changed from T216032, when the invite was not shown to anyone yet, since no wikis have Content Translation out of beta. Turns out that generic dialog from T216032 should be displayed when we don't have a good source article to suggest to the user. I will update description of this ticket to include new information.

The new dialog was implemented by removing that old design. So having both is not easy- especially when all these widgets are custom components and not provided by UI library. Is there a mid way? For example, instead of having completely different dialogs. maintain one and have a small variation when suggestion is not present?

Well, I'd not consider the two variants "completely different dialogs" since they share most elements. If replacing the suggestion cards by the button in the same place (below the text), makes it technically much more easy to support, I think that's ok.

This would be also an opportunity to fix the design where we show a small width button which does not fit title and description in many cases,

Ok. I'll review the suggested cards to explore how to better adjust them and create a follow-up ticket.

// If replacing the suggestion cards by the button in the same place (below the text), makes it technically much more easy to support,
this is easy. But are we going to show this one every time or based on our old code to detect the probability that the translator will translate? That code was also removed since we decided to show this more than once to a user when a translation suggestion available. Please clarify.

I think the button adjustment can be done with the same ticket. but if we are restoring the conditions where the fallback dialog shown, we need to go back and restore lot of code.

In anycase, I can only comeback to this ticket after my holddays.

// If replacing the suggestion cards by the button in the same place (below the text), makes it technically much more easy to support,
this is easy. But are we going to show this one every time or based on our old code to detect the probability that the translator will translate? That code was also removed since we decided to show this more than once to a user when a translation suggestion available. Please clarify.

An invite with a specific suggestion has more value than the generic invite:

  • The generic invite has the purpose of letting users know about content translation, and telling them once is enough.
  • The specific invite brings information that is relevant to the particular article and makes sense to show when we have a specific suggestion.
  • In both cases, it makes sense to show it to multilingual users only, and not show it when it is the first time they edit (to avoid conflicts like F30230052)

Having both cases in separate tickets trying to keep tickets minimal) may have contributed to the confusion. I'll create a ticket with the whole specification for the invite covering both cases.

Having both cases in separate tickets trying to keep tickets minimal) may have contributed to the confusion. I'll create a ticket with the whole specification for the invite covering both cases.

The follow-up ticket was created here: T232372: Update invite for translation when creating a new article

@santhosh please check it has all the clarifications needed, and ask if any additional detail is needed.

Change 528746 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] Show translation option when creating a new article

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

Jpita closed this task as Resolved.Oct 15 2019, 4:21 PM
Jpita added a subscriber: Jpita.

moving to done because it's being checked on T232372