WikiExtractor / WikiExtractor/wikiextractor

`#invoke` dispatch doesn't recognize localized aliases (e.g. Urdu's `#استدعا`)

Open
#414 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
4k
Forks
1k
Avg merge
1m
Merged PRs (30d)
10

Description

callParserFunction() dispatches on a hardcoded function #invoke rather than checking against the wiki's actual configured aliases for the invoke magic word. On Urdu Wikipedia, Template:Lang's body resolves to {{safesubst:#استدعا:لغات|...}} - #استدعا is Urdu's alias for #invoke, and since it never matches the hardcoded check, it's never recognized as a module invocation at all. It falls through to an ordinary template-title lookup for the literal string #استدعا:لغات, which of course doesn't exist, silently producing empty output. Reproduced via doc 726616 (علی اکبر معین فر), whose infobox name field disappears as a result.

This is the same shape of problem as the redirect-keyword localization already fixed (رجوع_مکرر, چوريو) — the parser-function dispatch table is effectively another hardcoded-English-only list, same as redirectKeywords was. The same discovery approach applies directly: action=query&meta=siteinfo&siprop=magicwords returns every magic word's aliases, not just redirect — find_redirect_keywords.py's api mode could be trivially generalized to look up any magic word by name (invoke, presumably, though worth confirming the canonical internal name rather than assuming), giving a verified, per-wiki list rather than reactively discovering aliases one broken template at a time.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing callParserFunction() and compare its dispatch logic with find_redirect_keywords.py's API mode. Query action=query&meta=siteinfo&siprop=magicwords to verify the configured invoke aliases, then reproduce doc 726616 on Urdu Wikipedia. Done means the localized #استدعا invocation is recognized and the infobox name is retained.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
localization, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.