Page MenuHomePhabricator

[M] Add support for 'monolingual text' data type (top-level and qualifiers)
Closed, ResolvedPublic

Description

Add support for 'monolingual text' data type (top-level and qualifiers)

Monolingual text is a string plus a language - see https://www.wikidata.org/wiki/Property:P1684

This type of string that is not translated into other languages: it is defined once and reused in all languages. Plain text string plus a mandatory language code (IETF language tag) or a special language code. On Wikidata, special language codes are not included in the Language dropdown and must be known ahead of time or users have to know where to look to know what the special codes are (such as "unknown").

Users need to be able to add text plus language for any property that takes monolingual text as a value, in the File page and in UploadWizard

Use cases

A monolingual text can be an official name, nickname, birth name (if different than a person’s name), an inscription, someone’s “last words” or others (see[[ https://www.wikidata.org/wiki/Special:ListProperties/monolingualtext | full list of Wikidata properties ]] that use the monolingual text data type).

User story

As a Commons editor, I want to add a string of text (as well as the language it’s in) to a media file’s metadata, so that anyone using that file can read that string and its linguistic context.

Acceptance criteria:

  • can select a property with data type 'monolingual text' and enter a value for it
  • can add a (mandatory) language code
    • on File page
    • in UploadWizard

Event Timeline

MBinder_WMF renamed this task from Add support for 'monolingual text' data type (top-level and qualifiers) to [M] Add support for 'monolingual text' data type (top-level and qualifiers).Dec 10 2019, 5:47 PM

Change 571970 had a related patch set uploaded (by Matthias Mullie; owner: Matthias Mullie):
[mediawiki/extensions/WikibaseMediaInfo@master] Implement support for monolingual text datavalue

https://gerrit.wikimedia.org/r/571970

Proposed implementation (with ULS):

Statement level:

Screenshot 2020-02-13 14.21.17.png (588×1 px, 76 KB)

ULS open:

Screenshot 2020-02-13 14.21.25.png (822×1 px, 97 KB)

Qualifiers:

Screenshot 2020-02-13 14.20.57.png (202×1 px, 25 KB)

How does this look on mobile? (particularly the qualifiers) ❓

Proposed implementation (with ULS):

Statement level:

Screenshot 2020-02-13 14.21.17.png (588×1 px, 76 KB)

ULS open:

Screenshot 2020-02-13 14.21.25.png (822×1 px, 97 KB)

Qualifiers:

Screenshot 2020-02-13 14.20.57.png (202×1 px, 25 KB)

How does this look on mobile? (particularly the qualifiers) ❓

Screenshot 2020-02-20 11.37.43.png (276×806 px, 20 KB)

Screenshot 2020-02-20 11.37.17.png (528×816 px, 41 KB)

Screenshot 2020-02-20 11.40.00.png (700×788 px, 74 KB)

It wouldn't hurt to have the input be a little wider for mobile qualifiers, but it's doable enough IMO.
Especially since other solutions would be a serious redesign of what qualifiers look like (on mobile), or split the language selector & input field on multiple lines, but then it'll become really unclear which parts are property and which are value...

I think this is good enough for our mobile web use case standard. Just to make sure - the Add button is disabled until both the language has been selected and the text box has at least some value?

If so, I think this is good to go to beta.

Just to make sure - the Add button is disabled until both the language has been selected and the text box has at least some value?

Correct!

Change 571970 merged by jenkins-bot:
[mediawiki/extensions/WikibaseMediaInfo@master] Implement support for monolingual text datavalue

https://gerrit.wikimedia.org/r/571970