ultrabug / mkdocs-static-i18n

MkDocs i18n plugin using static translation markdown files
https://ultrabug.github.io/mkdocs-static-i18n/
MIT License
232 stars 39 forks source link

Language selector not showing. #115

Closed champsblanc closed 2 years ago

champsblanc commented 2 years ago

Since version 0.30, my second language's pages don't have a button for selecting language. I've downgraded to 0.22 and it works flawlessly. Is there something that was changed and i need to add to my config?

Thanks.

ultrabug commented 2 years ago

Hello @champsblanc ; you mention a "since" version but not the actual version you've been trying with?

Do you have a problem with version 0.45?

If so, please provide a repo + config to reproduce the problem you're facing mate.

champsblanc commented 2 years ago

I've tried every single version (0.30, 0.31, 0.40, 0.41, 0.44 and 0.45) with the same results. Sadly it's a private work repo so i can not share it here. I'll try to reproduce the problem on a new one, it's just the translated HTMLs missing the button on the bar, i don't know why.

ultrabug commented 2 years ago

Sure, whenever I can reproduce, I'll make sure there's a test + a fix mate!

champsblanc commented 2 years ago

mkdocs-static-i18n-bug.zip

I managed to reproduce it with a small example:

Created a venv, installed requirements_doc.txt, ran mkdocs serve.

ultrabug commented 2 years ago

Ok @champsblanc it's actually written in the build logs:

WARNING  -  mkdocs-material language switcher contextual link is not compatible with theme.features = navigation.instant

If you remove navigation.instant, it works as expected.

Instant navigation uses JS which is not respectful of the localized page links and breaks localization language switcher I'm afraid.

champsblanc commented 2 years ago

Oh fuck, i'm blind. Thank you so much!

Just out of curiosity, why did it work with version 0.22?

ultrabug commented 2 years ago

<3