Page MenuHomePhabricator

default disambiguationspage message not correctly parsed for ~10 languages
Closed, ResolvedPublic

Description

The default disambiguationspage message parser in page.isDisambig does the following

message = self.site.mediawiki_message('disambiguationspage').split(':', 1)[1]

That works well when the message content is 'Template:disambig' , which is very prevalent in the i18n messages, however it will fail for most of the following

$ git show d4018551b09b88b3b45bed3eb6b5d2828ade0bf9 | grep disambiguationspage | egrep -v '(Template:|disambiguations-text|This message)'
-'disambiguationspage' => 'সাঁচ:দ্ব্যৰ্থতা-দূৰীকৰণ',
-'disambiguationspage' => '{{ns:template}}:Milyoltaca',
-'disambiguationspage' => '{{ns:template}}:Čvor',
-'disambiguationspage' => 'Кеп:цхьатера маьӀна доцуш',
-'disambiguationspage' => '{{ns:template}}:disambig',
-'disambiguationspage' => 'Project:Σύνδεσμοι_προς_τις_σελίδες_αποσαφήνισης',
-'disambiguationspage' => '{{ns:project}}:Naisc_go_leathanaigh_idirdhealaithe',
-'disambiguationspage' => '{{ns:template}}:disambig',
-'disambiguationspage' => 'سانچہ: ڈسایمبگ',
-'disambiguationspage' => '{{ns:template}}:ايرىق',
-'disambiguationspage' => '{{ns:template}}:Айрық',
-'disambiguationspage' => '{{ns:template}}:Aýrıq',
-'disambiguationspage' => 'नमूना: निवारण',
-'disambiguationspage' => 'سانچہ: ڈسایمبگ',
-'disambiguationspage' => 'sujhi',
-'disambiguationspage' => '{{ns:template}}:disambig',
-'disambiguationspage' => 'ದ್ವಂದ್ವ ನಿವಾರಣೆ',
-'disambiguationspage' => 'Майык: уш-бажы билдинмес',
-'disambiguationspage' => 'سانچہ:ضدابہام',
-'disambiguationspage' => '{{ns:template}}:Disambig',

Most of those problems would be fixed by T103080: Link should recognise {{ns:Project}} in text if Link was used.

Event Timeline

jayvdb claimed this task.
jayvdb raised the priority of this task from to Medium.
jayvdb updated the task description. (Show Details)
jayvdb added a project: Pywikibot.
jayvdb added subscribers: Xqt, Aklapper, jayvdb and 3 others.
Xqt removed jayvdb as the assignee of this task.Feb 19 2020, 6:56 AM
Xqt claimed this task.

The isDisambig() method was changed a lot in meantime and this is no longer valid.

https://doc.wikimedia.org/pywikibot/master/_modules/pywikibot/page/_basepage.html#BasePage.isDisambig