Opened 8 years ago
Closed 8 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)
Change History (6)
by , 8 years ago
Attachment: | fix-uncommon-wikilangs.patch added |
---|
comment:1 by , 8 years ago
Summary: | Language codes with dashes fail in Wikipedia tags → Language codes with dashes fail in Wikipedia tags (with patch) |
---|
comment:2 by , 8 years ago
Component: | Core → Plugin wikipedia |
---|---|
Owner: | changed from | to
comment:3 by , 8 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 , 8 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 , 8 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
patch to fix this issue