Page MenuHomePhabricator

Add "relevant missing languages" to the current language selector
Closed, ResolvedPublic

Description

With recent desktop improvements the language selector is provided in a new place at the top of the page. This leaves no place for the current grey interlanguage links that Content Translation adds. These are useful to signal relevant missing languages for the user where the content is missing and they can start translating.

This ticket proposes to add an indicator inside the current language selector to surface these relevant languages for which the content is missing.

The general elements of this feature include:

  • A message mentioning affected languages is shown in an area on top of the list of languages.
  • A separate panel provides additional information for the action.

The message( "Missing in X, Y and more") will be shown when there are some suggested languages for the user where the content is not available. These languages will be provided in the follow-up panel to start a translation with Content Translation (plus an additional option to pick a different one).

Action area on top of the language listPanel with additional details
invite.png (316×354 px, 22 KB)
invite-next.png (316×354 px, 16 KB)

Translate this page
This page is missing in some languages you may know. You can translate it in minutes!

Additional design details

General:

  • The message will be shown only on Wikipedias where Content Translation is enabled. We should not show an invite leading to a tool that is not available for that wiki or user.
  • Suggested languages will follow stricter version of the criteria used for compact language links considering only the top 4 criteria y priority when selecting languages:
    • The languages on which the user clicked in the language selector panel previously.
    • The languages of your web browser. This is configurable by you.
    • The languages defined in your Babel box.
    • Geographic information,
  • Only the name of at most 2 languages will be surfaced, for which content is not available in these. The same languages will be listed in the second panel.
    • If there is only one language selected as per the above, the following message will be shown instead "Missing in X and more". The "and more" part refers to the other languages the content is missing even if they are not relevant for the user.

Group.png (342×934 px, 53 KB)

Message:

  • The message is not sticky or floating (it just scrolls up with the language list) and it is not shown in the results while searching. In this way users can focus on language selection if they are not interested in the action.
  • Background: Base90 (#f8f9fa)
  • Text: 14px Base20 (#54595d)

Related Objects

Event Timeline

Pginer-WMF triaged this task as Medium priority.Sep 14 2021, 2:24 PM
Pginer-WMF created this task.
Pginer-WMF raised the priority of this task from Medium to High.Feb 11 2022, 9:08 AM

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

[mediawiki/extensions/ContentTranslation@master] CX Entrypoints: Add relevant missing languages entrypoint inside ULS

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

Change 775795 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX Entrypoints: Add relevant missing languages entrypoint inside ULS

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

@ngkountas I noticed the following part is not supported:

The message is not sticky or floating (it just scrolls up with the language list) and it is not shown in the results while searching. In this way users can focus on language selection if they are not interested in the action.

Currently the message remains visible on top when scrolling, and remains visible while searching.

QA Status: PASS



- Able to see the "Missing in X, X and more" language


- Able to see the "Translate this page" dialog


- Able to navigate from the  "Translate this page" dialog to the CX tool based on the two most recently selected language


- Both dialogs are not sticky or does not flot with the page article itself

Thanks for the review @EChukwukere-WMF. This is a ticket with lots of details, I tried to go through some of the aspects not covered and found the following aspects to polish (non critical to the main functionality):

With follow-up tickets created we can close the current one and continue the work in the new ones.
Thanks!!

This change causes the behavioral regression mentioned in T344028, which is that since this part of the UI is
dynamically loaded, it has a slightly delay in showing compared to the language selector itself, which causes
misclicking when the user wants to click one of the language link below.

I'm surprised this problem wasn't raised during review, nor fixed after 1 year of its landing, since I
would assume that this bug would annoy anyone who uses Wikipedia relatively frequently immediately,
including devs of MediaWiki.

Anyway, I sincerely request you to fix or at least look into that bug @Pginer-WMF

Thanks in advance.

This change causes the behavioral regression mentioned in T344028, which is that since this part of the UI is
dynamically loaded, it has a slightly delay in showing compared to the language selector itself, which causes
misclicking when the user wants to click one of the language link below.

I'm surprised this problem wasn't raised during review, nor fixed after 1 year of its landing, since I
would assume that this bug would annoy anyone who uses Wikipedia relatively frequently immediately,
including devs of MediaWiki.

Anyway, I sincerely request you to fix or at least look into that bug @Pginer-WMF

Thanks in advance.

Thanks for sharing your experience @fireattack. The current language selector has been extended for multiple purposes and we think it is time to consider a rewrite (T287860) using Codex, the more modern UI framework we have available today.
Surfacing missing languages has been a key entry point for translation. We can explore if there is a simple solution to support this in a better way on the current codebase, otherwise we may need to incorporate as a requirement for the new version which will take still some time.