Page MenuHomePhabricator

Add support for empty states to the current language selector
Open, MediumPublic

Description

With recent desktop improvements the language selector is provided in a new place,. The language selector will become the main entry point for activities (T289840) such as translation, language settings, and connecting interlanguage links in Wikidata.

This ticket proposes to improve the empty states of the current selector in order to (a) support the case where the content is not available in other languages (users may still need to access the selector to translate it or connect it to another article in Wikidata), and (b) surface options to translate where the user searches for a missing language (similar to the mobile update in T286645).

Currently when searching for a language not available, this is the current empty state:

Screenshot 2021-09-06 at 15.54.07 2.png (400×636 px, 48 KB)

The proposed empty states will use the following structure:

  • Title
  • Description
  • (Optional) Actions represented by an icon and (optionally) a label. Up to three actions are shown.

The proposed empty states are described below for both cases mentioned.

No initial languages

When the list of languages is empty because no options are available at all, the empty state is used with additional language options listed below (if available). Options will be different depending on whether options to add languages to the list are available (i.e., translate with Content Translation or edit Wikidata links) which can be different in different wikis (i.e., on Wikipedias vs. other projects):

Options to add languages availableOnly language settings availableNo options available
nolangs-options.png (550×472 px, 43 KB)
no-langs-settings.png (550×472 px, 36 KB)
nolangs-nooptions.png (550×472 px, 34 KB)

(Related ticket: T275147: Empty state for language button and menu)

Searching a language that does not exist or content is not available

When the user searches for a language that does not exist or the content is not available, an empty state will be shown. For the cases where Content translation can be used, options to translate will be surfaced.

Language not available with option to translateLanguage not available (without option to translate) or not existing
unavailable-invite.png (310×348 px, 16 KB)
unavailable.png (310×348 px, 12 KB)

Note that the user search query can result in multiple unavailable languages (e.g., searching for "esp" could lead to this empty state if content is not available for both "español" and "esperanto"), so the generic version of the message does not mention a specific language. For cases where the search query identifies only one language, the title message would include it (e.g., " Esperanto not available").

Additional design details

Empty states - Layout spacing.png (768×1 px, 45 KB)


These designs are based on the equivalent ticket for the new language selector (T265585)