Modify

Opened 7 years ago

Closed 7 years ago

#14421 closed defect (fixed)

[patch] Language codes with dashes fail in Wikipedia tags

Reported by: nyurik Owned by: simon04
Priority: normal Milestone:
Component: Plugin wikipedia Version:
Keywords: Cc:

Description

If wikipedia tag uses an uncommon language like "zh-classical" or "be-tarask", Fetch wikidata id will fail, because the site ID is different from those language codes. A general rule of thumb is to replace '-' with '_', but there are some exceptions, like "be-tarask" and "be-x-old" should both use "be_x_old" site ID.

The "proper" way to do it is to call the API and use "wikiid" value. The ID should never change.

https://zh-yue.wikipedia.org/w/api.php?action=query&meta=siteinfo&siprop=general

The workaround patch is attached

Attachments (1)

fix-uncommon-wikilangs.patch (1.7 KB ) - added by nyurik 7 years ago.
patch to fix this issue

Download all attachments as: .zip

Change History (6)

by nyurik, 7 years ago

patch to fix this issue

comment:1 by nyurik, 7 years ago

Summary: Language codes with dashes fail in Wikipedia tagsLanguage codes with dashes fail in Wikipedia tags (with patch)

comment:2 by nyurik, 7 years ago

Component: CorePlugin wikipedia
Owner: changed from team to simon04

comment:3 by Klumbumbus, 7 years ago

Summary: Language codes with dashes fail in Wikipedia tags (with patch)[patch] Language codes with dashes fail in Wikipedia tags

comment:4 by bastiK, 7 years ago

Thanks for the patch!

In [o33288], [o33289]: applied ​#14421 - Language codes with dashes fail in Wikipedia tags (patch by nyurik)

comment:5 by bastiK, 7 years ago

Resolution: fixed
Status: newclosed

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.