Page MenuHomePhabricator

Invite for translation when creating a new article on mobile
Closed, ResolvedPublic4 Estimated Story Points

Description

Translation has proven to be a successful way to start a new article for multilingual editors. When multilingual editors express the intent to create a new article it may be useful to propose making a translation as an option. For example, a user starting the Paneer article in the Yoruba Wikipedia on mobile could be provided the option to translate it from another language they know instead of creating it from scratch. Such invite to translate is already available on desktop (T216500), but it is missing on mobile.

This ticket proposes to surface a similar alternative to translate on mobile. For the mobile case we want to be extra careful not to add distractions, given the limited screen space available. So the proposed approach tries to be minimal and get out of the way if the intent from the user prefers to start from scratch.

The al idea is to include an invite at the bottom of the viewport. This will be initially visible when the user reaches the editor but covered by the keyboard if the user decides to focus on the text area to type and create the article from scratch (note that the input focus does not go automatically to the text area).

Invite at the bottom of the viewport with an alternative to translateWhen the text area is focused the invite will be hidden by the keyboard
translate-alternative.png (667×375 px, 26 KB)
editing-focus.png (667×375 px, 27 KB)

When to show the invite

We'll show the invites with following conditions:

  • On wikis where Section Translation is enabled.
  • When the system is confident that the suggested source article (T227571) and language are relevant for the user.
  • While there is no content on the editing surface. Once the user starts typing, the invite won't be visible even if the user hides the keyboard.
  • The invite will be shown on both visual and wikitext modes.

Design details

The invite supports the following actions:

  • Tapping on the main body of the invite will open Section Translation with the article and languages pre-selected. The target language will be the one from the current wiki, and the article and source languages will be based on the API suggestion. Users will be able to change it on the confirmation step.
  • The close ("X") icon will hide the invite.
  • The cog icon will lead to the settings system where users can opt-out to this kind of invite (to be supported when T290317 is ready. Meanwhile the cog can be skipped)

Dimensions and styling are detailed below:

translate-alternative-details.png (667×375 px, 30 KB)
translate-alternative-details.png (667×375 px, 35 KB)

Event Timeline

Pginer-WMF created this task.
Pginer-WMF updated the task description. (Show Details)
Pginer-WMF added a subscriber: ngkountas.
Pginer-WMF raised the priority of this task from Medium to High.Jan 25 2022, 9:11 AM
santhosh set the point value for this task to 4.Apr 5 2022, 5:57 AM

Change 779864 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] Add invitation for translation when creating article in mobile

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

Change 779864 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] Add invitation for translation when creating article in mobile

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

While there is no content on the editing surface. Once the user starts typing, the invite won't be visible even if the user hides the keyboard.

Currently the invite disappears when the user taps on the editing surface, would it be possible for it to disappear once the user types instead?
When the editing surface gets the focus, the user may still not be committed to create the article from scratch, and trying to get back to the invite by hiding the on-screen keyboard would fail. If the invite disappears once the user typed content, it may be easier to understand why it was gone.

Change 818084 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] SX new by translation mobile entrypoint: Hide invite when user types

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

Change 818084 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] SX new by translation mobile entrypoint: Hide invite when user types

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

Change 818992 had a related patch set uploaded (by Santhosh; author: Santhosh):

[mediawiki/extensions/ContentTranslation@master] CX3 Build 0.2.0+20220801

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

Change 818992 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX3 Build 0.2.0+20220801

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

@ngkountas I have three(3) scenarios for the links below in ig wiki. For the first link I was able to see the invite but not for the remaning two

https://ig.m.wikipedia.org/wiki/Alba_Longa

https://ig.m.wikipedia.org/wiki/Ndawa

https://ig.m.wikipedia.org/wiki/Amol_Nowabad

See video

is that expected ?

@ngkountas Should we move this back to in progress?

@ngkountas for now I will move this back to in progress.. when you clarify those scenarios we take the next action. thanks

Change 842807 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] SX new article invitation: Display article icon when no thumbnail

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

@EChukwukere-WMF in the screencast you uploaded above, there are 3 cases:

  1. The "Alba Longa" article, for which the invitation is shown properly.
  2. The "Ndawa" article for which the invitation is missing. In this case, a suggestion for translation is returned by cxserver (https://cxserver.wikimedia.org/v2/suggest/source/Ndawa/ig?sourcelanguages=en) but the thumbnail property is missing for this suggestion. The invitation is not displayed because of uncaught errors related to the missing thumbnail properly. This issue is fixed in the latest patch. For the suggestions with missing thumbnail, an article icon will be displayed as placeholder.
  3. The "Amol Nowabad" article for which the invitation is also missing. In this case, the invitation is correctly not rendered, as there is no suggestion returned from the cxserver (https://cxserver.wikimedia.org/v2/suggest/source/Amol%20Nowabad/ig?sourcelanguages=en).

Moving the ticket to "In Review" column for now.

Change 842807 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] SX new article invitation: Display article icon when no thumbnail

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

@ngkountas

Testing status: QA PASS

Screen Shot 2022-11-08 at 9.55.37 PM.png (741×404 px, 88 KB)

Screen Shot 2022-11-08 at 9.56.17 PM.png (721×383 px, 75 KB)

as for the 3rd scenario like you mentioned there is no suggestion from the cxserver as shown below:

// 20221108215720
// https://cxserver.wikimedia.org/v2/suggest/source/Amol%20Nowabad/ig?sourcelanguages=en

{
  "suggestions": []
}