Page MenuHomePhabricator

Show matching results when searching for languages where the content is not available
Closed, ResolvedPublic

Assigned To
Authored By
Pginer-WMF
Jun 21 2024, 12:21 PM
Referenced Files
F56698311: Kapture 2024-07-26 at 10.32.59.webm
Jul 26 2024, 8:36 AM
F55526207: Unrecognized.png
Jun 21 2024, 12:21 PM
F55526622: Proposed - one match.png
Jun 21 2024, 12:21 PM
F55526149: Proposed.png
Jun 21 2024, 12:21 PM
F55526145: Current.png
Jun 21 2024, 12:21 PM
F55526135: Previous.png
Jun 21 2024, 12:21 PM

Description

After adding support to access machine translation from the language selector on mobile web (T363183), the "Language not found" view was adjusted to accommodate the new option. As part of this change, the user is no longer getting confirmation from the system about which language(s) are being considered. In this way, if the user types "po" the system may provide options to translate to Polish or Portuguese without the user knowing for sure whether the language they are searching for is considered by the system.

This ticket proposes to include a line of text listing the matching languages below the "Language not available" label. The text would use the color-subtle color from Codex. The logic for obtaining the languages will be the same that was followed originally for showing the translation buttons for each language, but listing them as part of a one line text using ellipsis to crop the comma separated list.

Below there is a comparison between the previous version (with language-specific buttons for translation), the current version (with actions for each activity with no detail on the matching languages) and the proposal (where a non-interactive list of languages is added for reference)

PreviousCurrentProposed
Previous.png (568×320 px, 16 KB)
Current.png (568×320 px, 27 KB)
Proposed.png (568×320 px, 29 KB)

Note that this applies only when there are matches for the language the system knows. For cases where the search query is not recognized, the current behaviour still applies. for a comparison below we can see the proposal for different cases:

Multiple languages matchedOne language matchedNo languages matched
Proposed.png (568×320 px, 29 KB)
Proposed - one match.png (568×320 px, 28 KB)
Unrecognized.png (568×320 px, 13 KB)

Event Timeline

Pginer-WMF created this task.

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

[mediawiki/extensions/ContentTranslation@master] CX language searcher entrypoint: Show matching language autonyms

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

Change #1052258 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX language searcher entrypoint: Show matching language autonyms

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

The languages are shown as expected. In the example below as the search string is extended we can see examples of existing languages marching, missing languages matching (two of them an a single one) as well as no match at all. All working as expected: