Skip to content

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

Merged
ultrabug merged 4 commits intomkdocs:masterfrom
ultrabug:missing_lang_fix
Oct 10, 2021
Merged

search plugin: do not crash on missing lang options, inform instead#2602
ultrabug merged 4 commits intomkdocs:masterfrom
ultrabug:missing_lang_fix

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
Contributor

@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 😬

@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
Contributor

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.

2 participants