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

search plugin: do not crash on missing lang options, inform instead #2602

Merged
merged 4 commits into from Oct 10, 2021

Conversation

ultrabug
Copy link
Member

@ultrabug ultrabug commented Oct 8, 2021

  • fallback to english on missing search.lang option
  • support search.lang territory pt_BR -> pt

- fallback to english on missing search.lang option
- support search.lang territory pt_BR -> pt
@ultrabug ultrabug requested a review from oprypin October 8, 2021 12:43
@ultrabug
Copy link
Member Author

ultrabug commented Oct 8, 2021

This replaces #2564 to address your points #2535 (comment) with #2535 (comment)

Example output:

INFO     -  Option search.lang 'pt_BR' fallbacked to 'pt'
INFO     -  Option search.lang 'zz_BR' is not supported, falling back to 'en'

Copy link
Member

@oprypin oprypin left a comment

Choose a reason for hiding this comment

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

Thanks! The approach looks good to me. Let's get this done :)

CI is failing, though 😬

mkdocs/contrib/search/__init__.py Show resolved Hide resolved
mkdocs/contrib/search/__init__.py Outdated Show resolved Hide resolved
mkdocs/contrib/search/__init__.py Outdated Show resolved Hide resolved
@ultrabug
Copy link
Member Author

Fixing tests now, should be good soon

@ultrabug
Copy link
Member Author

Good for me now 👍

@ultrabug ultrabug merged commit c426455 into mkdocs:master Oct 10, 2021
@ultrabug
Copy link
Member Author

Thanks for the review @oprypin

@oprypin
Copy link
Member

oprypin commented Oct 10, 2021

Ah thanks for the great fix.

@ultrabug so you probably saw that I mentioned that a release is coming on Sunday [today]
but it seems like there's still some language PRs that we could merge now. So let's not rush with the release.

@ultrabug
Copy link
Member Author

Yes mate indeed, I'll check the pt_BR PR out later today, thanks

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.

None yet

2 participants