Modify

Opened 2 years ago

Closed 2 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 2 years ago.
patch to fix this issue

Download all attachments as: .zip

Change History (6)

Changed 2 years ago by nyurik

patch to fix this issue

comment:1 Changed 2 years ago by nyurik

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

comment:2 Changed 2 years ago by nyurik

Component: CorePlugin wikipedia
Owner: changed from team to simon04

comment:3 Changed 2 years ago by Klumbumbus

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

comment:4 Changed 2 years ago by bastiK

Thanks for the patch!

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

comment:5 Changed 2 years ago by bastiK

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.

Add Comment


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

 
Note: See TracTickets for help on using tickets.