Opened 9 years ago
Closed 9 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)
Change History (5)
by , 9 years ago
Attachment: | JOSM-wikidata.png added |
---|
comment:1 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed in [o32001:32002].
Querying Wikidata w/ an unknown language (such as en_GB
) causes it to return all languages, compare:
- https://www.wikidata.org/w/api.php?action=wbgetentities&props=labels&ids=Q51056&format=xml&languages=en_GB&languagefallback=en
- https://www.wikidata.org/w/api.php?action=wbgetentities&props=labels&ids=Q51056&format=xml&languages=en&languagefallback=en
Now the language selection has been moved to the Java code …
by , 9 years ago
Attachment: | wikidata-JOSM-title-only-userlang.png added |
---|
comment:2 by , 9 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
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.
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?
comment:3 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Yes, that's a good improvement :) …
Fixed in [o32003:32004].
screenshot of wikidata display with wrong language