Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EventStreams: Some interwiki links in messages do not work #16

Open
stjohann opened this issue Dec 12, 2021 · 0 comments
Open

EventStreams: Some interwiki links in messages do not work #16

stjohann opened this issue Dec 12, 2021 · 0 comments

Comments

@stjohann
Copy link
Owner

stjohann commented Dec 12, 2021

Since MediaWiki only handles some links as forwarding, all links on a typical interwiki map that are not forwarding currently result in link errors such as this:
https://ru.wikipedia.org/wiki/translatewiki:MediaWiki:Coll-create_a_book_tooltip/ru?uselang=en

This needs to be fixed. The best way to fix it would be to add some code to Linking that would use default interwiki map for the site (if it exists) to do transformations to the link without any API requests (i. e. replicating much of Linking.AddLink without any API calls for interwiki links), and then use it where the Linking.GetLink is currently used. It should be fairly easy to write this, but code duplication should be avoided. Ideally, EventStreams.ParseComment and Linking.AddLink should call the same function, but the latter should be able to replace basic (requestless) interwiki link handling with more advanced.

Simpler way to solve the same problem is to append Special:GoToInterwiki/ everywhere, but given that interwiki links can follow basically any rules, it would mean handling every link with : in it this way. [This is now done, so links would start to work, but this issue still needs to be fixed in a better way.]

stjohann added a commit that referenced this issue Dec 12, 2021
- (EventStreams) Hack around broken interwiki links (see #16)
- Change guild to server in commands
- Bug fixes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant