Skip to content

!mdn searches the english version of MDN but returns link without localization  #45

@KonradNojman

Description

@KonradNojman

The problem:
If there is an article in English version and not in e.g. Polish, the bot will find the article in English and send the link without localization (thus it can be opened as a Polish version) and it will show the error on the page.

Link for searching: https://github.com/typeofweb/typeofweb-discord-bot/blob/main/src/commands/mdn.ts#L11

Link that is sent: https://github.com/typeofweb/typeofweb-discord-bot/blob/main/src/commands/mdn.ts#L21

Suggested solution:
Add en-US localization to the sent URL, so it always redirects to the English version of MDN

Test search phrase: Promise.allSettled (available in EN, unavailable in PL)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions