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
Copy Markdown
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
Copy Markdown
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
Copy Markdown

@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
Copy Markdown
Member Author

Fixing tests now, should be good soon

@ultrabug
Copy link
Copy Markdown
Member Author

Good for me now 👍

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

Thanks for the review @oprypin

@oprypin

This comment was marked as abuse.

@ultrabug
Copy link
Copy Markdown
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