Page MenuHomePhabricator

Add support for vro code-alias in Wikipedia family to fix UnknownSiteError in tests
Closed, ResolvedPublic

Description

Description:
Pywikibot tests fail with UnknownSiteError for language code vro during test_pagelanglinks. This is because the language vro (Võro) — corresponding to the fiu-vro Wikipedia (https://fiu-vro.wikipedia.org) — is missing from the Wikipedia family definitions (wikipedia_family.py).

Error snippet
pywikibot.exceptions.UnknownSiteError: Language 'vro' does not exist in family wikipedia

Context:

The fiu-vro wiki is a valid Wikimedia project (Võro Wikipedia).

The language code vro appears in langlinks returned by the API or Wikidata, but Pywikibot’s family files do not list it.

This causes errors when Pywikibot attempts to create Site instances for vro.

Suggested solution:

Add fiu-vro or vro -> fiu-vro to code_aliases in family.py.

Tests:
Ensure test test_pagelanglinks handles this gracefully: tests.site_generators_tests.TestSiteGenerators.test_pagelanglinks

Details

Related Changes in Gerrit:

Event Timeline

Thank you for tagging this task with good first task for Wikimedia newcomers!

Newcomers often may not be aware of things that may seem obvious to seasoned contributors, so please take a moment to reflect on how this task might look to somebody who has never contributed to Wikimedia projects.

A good first task is a self-contained, non-controversial task with a clear approach. It should be well-described with pointers to help a completely new contributor, for example it should clearly point to the codebase URL and provide clear steps to help a contributor get set up for success. We've included some guidelines at https://phabricator.wikimedia.org/tag/good_first_task/ !

Thank you for helping us drive new contributions to our projects <3

Xqt triaged this task as High priority.Jul 14 2025, 9:26 AM

Change #1170080 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] L10N: Add code alias vro for fiu-vro

https://gerrit.wikimedia.org/r/1170080

Change #1170080 merged by jenkins-bot:

[pywikibot/core@master] L10N: Add code alias vro for fiu-vro

https://gerrit.wikimedia.org/r/1170080