Page MenuHomePhabricator

LanguageImporter gadget must add description and alias
Closed, ResolvedPublicFeature

Description

The gadget "LinguaImporter" allows to import language from a Wikidata ID. Currently only the label (and property information) are imported. I think the description and the alias should also be imported. Alias are really a plus when we are looking for a language. For example, should we search (in French) for "guadeloupéen" or "créole guadeloupéen", etc?

Related: T233917 , T215056 , T232299

Event Timeline

0x010C triaged this task as High priority.Apr 29 2019, 7:35 AM
Pamputt updated the task description. (Show Details)

For the description, I guess it is possible to use

newItem.descriptions = wikidataItem.getDescriptions();

at line 171.
Yet, for aliases, it seems it is not yet easily possible. Maybe it has changed in the last couple of years.

Pamputt changed the subtype of this task from "Task" to "Feature Request".Oct 6 2020, 7:13 PM
Yug renamed this task from Import also description and alias when importing language to LanguageImporter gadget also description and alias when importing language.Feb 16 2021, 10:43 PM
Yug renamed this task from LanguageImporter gadget also description and alias when importing language to LanguageImporter gadget must add description and alias.
Seb35 subscribed.

I will solve this task (WMFR contract).

The library creating these items is a module inside RecordWizard.

I added descriptions and aliases similarly to labels (it does exist in the library), but only the descriptions were added. I guess there is an issue with the serialization, particularly since aliases are a dictionary of lists instead of simply a dictionary; I continue searching.

It is missing the small part about aliases in rw.wikibase.Item.prototype._buildFingerprint; I add it.

The missing part about aliases was added in RecordWizard commit 11b794ce.

LinguaImporter now imports descriptions and aliases from Wikidata, see this example for the language Laki (that I imported just after the code change), called Lekî in Kurdish but also known as Lak or Leky.