Page MenuHomePhabricator

[M] WikibaseMediaInfo does not support editing monolingual text in languages not supported by MediaWiki
Open, Needs TriagePublic

Description

Wikibase supports a number of languages for monolingual text values which are not known to MediaWiki. On MediaInfo entities, monolingual text statements using these languages can be added using the API, but there is no support in the UI. On Wikidata, the monolingual text language selector doesn’t recognize these language codes (T124758), but still accepts them and sends them to the backend (where they’re known); on Commons, on the other hand, if a language (code) isn’t recognized by the UniversalLanguageSelector, there’s no way to even attempt to save the value.

API support tested on Test Commons with the wbsetclaim API, with the following claim payload (based on Finrod Felagund’s birth name):

{
  "mainsnak": {
    "snaktype": "value",
    "property": "P250",
    "datavalue": {
      "value": {
        "text": "Findaráto",
        "language": "qya"
      },
      "type": "monolingualtext"
    },
    "datatype": "monolingualtext"
  },
  "type": "statement",
  "id": "M1052$7313b8df-4548-bfd5-ae2b-979a8ff83cc8",
  "rank": "normal"
}

The resulting statement can be seen at File:Testfile Teufelsbruch.jpg, but can’t be edited – though that might just be because Test Commons is in a broken state in general; it seems to be in fact impossible to add any monolingual text statement at all, regardless of language. But you can see that adding such monolingual text is not supported on real Commons, e. g. File:PNG Test.png.

Event Timeline

Restricted Application added a project: Wikidata. · View Herald TranscriptOct 1 2020, 10:30 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Terms/captions seem to have a similar problem (not sure if it’s worth a separate task). With the ?uselang parameter, you can force one unsupported language code to appear in the user interface, but you can’t save it:

Ramsey-WMF moved this task from Triage to Tracking on the Structured-Data-Backlog board.
Ramsey-WMF moved this task from Tracking to Triage on the Structured-Data-Backlog board.
MarkTraceur renamed this task from WikibaseMediaInfo does not support editing monolingual text in languages not supported by MediaWiki to [M] WikibaseMediaInfo does not support editing monolingual text in languages not supported by MediaWiki.Nov 18 2020, 5:28 PM