Replies: 1 comment 1 reply
-
The If not, I think I would need some info on how you build things. I have not used the PO plugin before, so not sure what the workflow is with this but I am about to look into all the different ways to generate translations. Would love to learn about how you are doing things so we can ensure we meet your needs in the future. If you can share more about the workflow here that would be great but you can also reach out by email, see my profile. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
I want to preface this with the fact that my current workflow is a bit complicated. I have updated the
mkdocs-mdpo-plugin
to get it to work with Python 3.13 and an updated version Translate Toolkitmd2po
tool. (Themd2po
tool makes better, more accurate .po files. Further, Weblate needs the PO template files, and the plugin doesn't generate them.) So this may be an artifact of some other variable in this setup.I am currently able to build multiple languages successfully, with translations from the .po files, from
mkdocs serve
andmkdocs build
. However, I noticed that in the translated files, the "canonical URL" is showing up as a full path to a Markdown file (e.g.<link rel="canonical" href="https://docs.beeware.org/fr/index.md">
in the French translated HTML file, versus<link rel="canonical" href="https://docs.beeware.org/">
in the English version).I read up on how that link is generated, i.e. from the
page.canonical_url
when thebase.html
template is rendered, IIRC. So, it seems like it would make sense for it to have the language code appended to it, however, theindex.md
will ultimately 404 because it won't exist. I have absolutely no idea where to start with figuring out where the full path is coming from, as it doesn't appear to have a configuration option anywhere. I have no idea, though, whether the various things in my workflow could be affecting it.Let me know if further specific information from my config files, etc, would be helpful here. I didn't want to overload this post if it turned out to be something obvious without needing that information.
I also have no idea what that canonical link is used for, so it may not actually matter. I'm ok with that as well.
Beta Was this translation helpful? Give feedback.
All reactions