jayvdb added a comment.

Copying a comment from 
https://gerrit.wikimedia.org/r/#/c/207179/3/pywikibot/family.py,cm

If we dig up the history of linktrails, we may be able to deprecate the family 
definitions without _much_ loss of functionality for older versions, and 
*increase* our support for older versions at the same time.

We'll need to look at any changes to regex in family.py to see if the commit 
messages give clues for specific choices made by previous pywikibot 
contributors.

The values are defined in the language files, but could be overridden by 
MediaWiki messages
https://www.mediawiki.org/wiki/Manual:MediaWiki_architecture#Localizing_messages
*however* I believe that overriding linktrail was using a MediaWiki: message 
was disabled for performance reasons.

Some wikis still have the MediaWiki: message, even thought it was not used, so 
that could be a fallback.
https://fr.wikipedia.org/wiki/MediaWiki:Linktrail
fr.wikipedia.org/w/api.php?action=query&meta=allmessages&ammessages=linktrail
on wmf wikis, often these messages have been deleted

- https://de.wikipedia.org/wiki/MediaWiki:Linktrail
- 
https://de.wikipedia.org/w/api.php?action=query&meta=allmessages&ammessages=linktrail

As the value in those language files changed over time, our static hard-wired 
linktrail definitions in the Family class will be wrong on some older sites.  
So, what we have is not perfect, and we may be able to build an alternative 
which is also not perfect, but requires less maintenance.

The link trail was previously always quite close to 'unicode word', however 
there was a lot of problems with using pcre's 'unicode' functionality, which is 
why custom sets of permitted letters were added to the link trail per language.

If the python re unicode word matching is similar to the custom sets of letters 
in the mediawiki language files, it could be good enough as a generic fallback 
for pre 1.21


TASK DETAIL
  https://phabricator.wikimedia.org/T97630

REPLY HANDLER ACTIONS
  Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign 
<username>.

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: jayvdb
Cc: pywikipedia-bugs, jayvdb, Aklapper



_______________________________________________
Pywikipedia-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-bugs

Reply via email to