-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switching languages on non-default branch goes to default branch #4490
Comments
It makes sense to me to stay on the same branch. We'll need to send the current branch to the footer API, I think we already have this information. |
Just adding more context here to have the URLs hardcoded: At https://discordpy.readthedocs.io/en/rewrite/faq.html ( |
We can add the version in https://github.com/rtfd/readthedocs.org/blob/4911600c230809bd6fb3585d1903121db2928ad6/readthedocs/restapi/templates/restapi/footer.html#L21-L30 But, that is a function, we need to use this tag But, we need to be careful with the performance when the project has a lot of versions. And I think we already have some bugs related to the path that we should fix first (#4638) |
The problem of linking to the specific version translated is that most of the docs do not have all the versions translated. So, in the end, we will be generating a lot of 404 for many projects also. I assume that's why we link to the "default version" instead. We could add more logic here and "link to the same version only if that version exists in the translated project or fallback to the default version if not" but that won't work in the cases also, because the version may exists but the file does not. |
We already jump between files when switching versions, even if the file gives 404. |
That's my point. It's not a good UX clicking on a link and get 404. |
Details
When switching the language from en to ja here it goes to the default branch here (which since it has no ja language goes back to en.
Expected Result
It stays on the same branch/version you were previously on
Actual Result
Switches to the default branch,
The text was updated successfully, but these errors were encountered: