HomePhabricator

Suggestions: Allow selecting languages

Authored by santhosh.

Description

Suggestions: Allow selecting languages

The language list is populated by previous CX languages,
content, UI languages, English, ULS common languages.

Refactored the language selector a bit to use the selector between
translations and suggestions.

We also try to give some smart defaults. Previous CX language is
first try. If they dont exist, English is source language. Target
language will be content language, or source language, or one from
ULS common language, till it differs from source language.

At present, if use select same language for both source and target,
we just present 'Sorry no suggestions'. But it can be more smart
to save an API request.

The current UI is very simple <select>, but this need to be converted
to ULS in next step

Bug: T112051
Change-Id: I59d59fbfafd733fc33e0706b86d2a551fd38bc5f