Page MenuHomePhabricator

Adapt the suggestion to preferred languages
Open, Needs TriagePublic

Description

When looking for a value, the suggester displays label and description in the language of the user interface. When several labels are identical, and the descriptions doesn't exist in the selected user-interface language, it is difficult for the user to choose which item to use.

In some other cases, the item doesn't show up at all in the list.

The following screenshots were produced on the dates indicated:

UI language = deUI language = en
searching by item ID (as of 2017-08-10)
suggester.UI lang=de.searching by item ID.png (144×861 px, 8 KB)
This is the expected behavior.
suggester.UI lang=en.searching by item ID.png (148×852 px, 7 KB)
German label (which exists) should be displayed.
searching by item ID (as of 2018-03-25)untested
suggester.UI lang=en.searching by item ID.2018-03-25.png (156×942 px, 9 KB)
German label (which exists) should be displayed.
searching by keyword (as of 2017-08-10)
suggester.UI lang=de.searching by keyword.png (150×834 px, 10 KB)
This is the expected behavior.
suggester.UI lang=en.searching by keyword.png (150×828 px, 7 KB)
Item should be found by its German label.
searching by keyword (as of 2018-03-25)untested
suggester.UI lang=en.searching by keyword.2018-03-25.png (156×940 px, 11 KB)
✔️ This is the expected behavior.

It would be great if the display of the label and description could be adapted depending on the babel boxes of the user. Then, if the description doesn't exist in my language, it can be displayed in my second language, or the third, etc.

Related discussion

Related Objects

Event Timeline

When I have this problem this indicates to me that someone needs to assign descriptions to the items in question (and I've done that on several instances).

I think this problem would be better resolved by hooking into the statements on an item first (P31/P279) as with the auto-description gadget, which already fills in on the dropdowns (so far as I recall it does so).

In my interface, which prefers Czech, descriptions usually fallback to English (or Slovak)...

In my interface, which prefers Czech, descriptions usually fallback to English (or Slovak)...

MediaWiki-defined fallbacks work, but user-specific fallbacks (from Babel boxes) don't. That seems to be how all Wikibase-specific parts of the interface work.

re-tested; some behavior has changed for the better, but some issues remain (see updated task description)

It would seem that the suggester now searches labels in all languages, but when searching by item ID (Q…), if there is no label for the UI language, there is still no fallback to any of the user’s other languages. While this might be difficult to implement (requiring analysis of Babel boxes or the like), an easier intermediate solution might be to fall back to official name (P1448) of the suggested item.