ultrabug / mkdocs-static-i18n

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

incompatibility with mkdocs-material-insiders #231

Closed gnaegi closed 1 year ago

gnaegi commented 1 year ago

We recently upgrade to the mkdocs material insider program and ever since the language chooser disappeared. I tried to debug why and could trace it down to the plugin.py script at the very beginning:

During the basic import and init code the i18n plugin tries to identified the languages: lang.split(".html")[0]. For whatever reason the "lang" variable is not available in my case. Thus, later in the except code the material version is set to none. If I manually set the version to 7.1.1 everything works again.

I don't know why the lang variable is empty when using the insider or maybe this is a side effect of something else. Has someone any clue where the lang variable comes from and how I could fix this?

ultrabug commented 1 year ago

Hello @gnaegi ; which version of insiders are you using?

gnaegi commented 1 year ago

Hi @ultrabug, thanks for asking. I use always the latest version.

When I debug the variable material_version I get the value 9.1.18+insiders.4.36.1 as the value. When I print out the lang value at the same place I get nothing, the variable is empty.

ultrabug commented 1 year ago

@gnaegi it makes little sense indeed, are you using the latest version of this plugin as well? The code should catch that...

In case you're interested, I'm looking for beta testers for what is gonna become v1.0.0 of this plugin here : #216

ultrabug commented 1 year ago

I'm happy to announce release v1.0.0 of the mkdocs-static-i18n plugin!

Please check it out and reopen if needed as this should fix the problem :)