Modify

Opened 8 years ago

Closed 8 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 8 years ago.
screenshot of wikidata display with wrong language
wikidata-JOSM-title-only-userlang.png (20.6 KB ) - added by species 8 years ago.

Download all attachments as: .zip

Change History (5)

by species, 8 years ago

Attachment: JOSM-wikidata.png added

screenshot of wikidata display with wrong language

comment:1 by simon04, 8 years ago

Resolution: fixed
Status: newclosed

Fixed in [o32001:32002].

Querying Wikidata w/ an unknown language (such as en_GB) causes it to return all languages, compare:

Now the language selection has been moved to the Java code …

comment:2 by species, 8 years ago

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 />" (e.g. 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?

Version 0, edited 8 years ago by species (next)

comment:3 by simon04, 8 years ago

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. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.