Modify

Opened 4 years ago

Closed 4 years ago

#12397 closed enhancement (fixed)

Wikidata title should be displayed in user's language

Reported by: species Owned by: simon04
Priority: normal Milestone:
Component: Plugin wikipedia Version: latest
Keywords: wikidata Cc:

Description

Currently, the wikidata title displayed in gray after the Q-number shows the /first/ language entry found.

It should display the title in the User's language.

An example is https://www.wikidata.org/wiki/Special:EntityData/Q51056.json . The item name is displayed in hungarian, regardless of the language set in JOSM.

Attachments (2)

JOSM-wikidata.png (133.6 KB) - added by species 4 years ago.
screenshot of wikidata display with wrong language
wikidata-JOSM-title-only-userlang.png (20.6 KB) - added by species 4 years ago.

Download all attachments as: .zip

Change History (5)

Changed 4 years ago by species

Attachment: JOSM-wikidata.png added

screenshot of wikidata display with wrong language

comment:1 Changed 4 years ago by simon04

Resolution: fixed
Status: newclosed

Changed 4 years ago by species

comment:2 Changed 4 years ago by species

Resolution: fixed
Status: closedreopened

Thanks for the quick reply, works for the user's language!

But now, if there is no label defined in the users's language, wikidata returns empty "<labels />" and no text is displayed.

e.g. here:
https://www.wikidata.org/w/api.php?action=wbgetentities&props=labels&ids=Q21849466&format=xml&languages=en&languagefallback=de


Maybe fetch all langs:

  • use userlange
  • fall back to "en"
  • or if "en" empty display the first one returned by wikidata.

does this sound reasonable?

Last edited 4 years ago by species (previous) (diff)

comment:3 Changed 4 years ago by simon04

Resolution: fixed
Status: reopenedclosed

Yes, that's a good improvement :) …

Fixed in ​[o32003:32004].

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain simon04.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.