Skip to content

Allow an optional language code in playground URLs #197

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

Conversation

mkantor
Copy link
Contributor

@mkantor mkantor commented Feb 25, 2022

I'm not entirely sure about the structure of such URLs, but tried a few things and noticed that things like /es/ and /fr/ work, while /en-US/ does not, so I'm guessing they're meant to be IETF BCP 47 "primary language subtags" without additional subtags. I could make the regex looser if we want to accept dashes/capital letters/longer language codes/other stuff in this path segment.

@mkantor
Copy link
Contributor Author

mkantor commented Feb 25, 2022

Copy link
Collaborator

@ckiee ckiee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works in a RegEx playground. Someone should probably test it in the bot.

Copy link
Contributor

@tjjfvi tjjfvi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested in bot

@ckiee ckiee force-pushed the handle-language-specific-playground-urls branch from a8d1b6c to 199b022 Compare March 10, 2022 13:57
@ckiee ckiee merged commit 7df81b8 into typescript-community:master Mar 10, 2022
@mkantor mkantor deleted the handle-language-specific-playground-urls branch March 11, 2022 03:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants