Page MenuHomePhabricator

"No results found" displayed when entering (most) monolingual text-only language codes on Commons
Open, MediumPublicBUG REPORT

Description

List of steps to reproduce (step by step, including full links if applicable):

  • Start adding a statement on a Commons file
  • Select a monolingual text property, e.g. Sandbox-Monolingual text
  • Click "Select language" and enter the code sjt (some others with the same problem: pyu, sjk, gml, gmy)

What happens?:

The name of the language is shown in the input field, while the search results say "No results found."

Bildschirmfoto_2022-03-22_01-33-44.png (196×114 px, 4 KB)

Pressing enter will select the language, allowing the statement to be added, but there is no way to select the language with the mouse.

What should have happened instead?:

The language should be shown in the search results.

Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc.:

As far as I can tell, this affects languages which have been enabled for monolingual text in WikibaseContentLanguages.php but have not been added to langdb, since codes such as cnr, nr and tzl which are in both files work fine.

Event Timeline

Nikki renamed this task from "No results found" displayed when entering (most) monolingual text-only language codes to "No results found" displayed when entering (most) monolingual text-only language codes on Commons.Mar 22 2022, 10:51 AM

I haven't debugged deeply, but I'm not sure that their absence from langdb is necessarily the problem, even though it might be.

A more likely problem is that the language list is not set correctly when initializing the jquery.uls plugin. It must be set correctly when calling the .uls() method.

I've put a list of language codes currently available for monolingual text (and lexemes) which aren't in language-data at P68526. I added the code I used to generate it as a comment, too, if anyone wants to generate a newer version at some point.

I haven't debugged deeply, but I'm not sure that their absence from langdb is necessarily the problem, even though it might be.

A more likely problem is that the language list is not set correctly when initializing the jquery.uls plugin. It must be set correctly when calling the .uls() method.

It only supports using a subset of the supported languages. This bit of code removes any languages from the list provided to it that aren't in its internal database.

The SDC extension has extra code to explicitly work around ULS's behaviour - https://gerrit.wikimedia.org/g/mediawiki/extensions/WikibaseMediaInfo/+/master/resources/UlsWidget.js#45

I've also put the autonyms that are in CLDR in P68546

OK, I am able to reproduce this, and I understand why it's wrong. I'll start adding at least some of those codes. Maybe all eventually. Because of their number, however, it may take some time, and I may have a lot of questions. But I'll try not to get stuck on silly things. I'll also try to develop an easy process that other people may be able to follow to add them.

I have an immediate general question: Is there existing information in all those languages in Wikidata or Commons? If there is, how can I find it?

MaryMunyoki subscribed.

removing tag as this is not in Q1 priorities (July 2025- Sep 2025), might need to revisit later