Readthedocs.org: Redirect to the default version of any translation when visiting /{lang}/

Created on 23 Jun 2017  路  10Comments  路  Source: readthedocs/readthedocs.org

Details

I have registered the project as Italian translation of ghini. Italian is one of a couple translations I have registered for the Ghini project. Others are French and Spanish. These work as a charm.

Expected Result

translated project documentation visible at short url: http://ghini.readthedocs.io/it/

Actual Result

maze found at http://ghini.readthedocs.io/it/

A description of what actually happened
the translated docs are built, and I can see them at http://ghinidesktop-docsi18n-it.readthedocs.io/, but not at the shorter link, which is the one offered to the user.
image

I tried twice: remove the project, create it again, same result. I have forced a build, same result. I did not yet try to create the project under a different name, I will do so shortly (without removing the one which is not working) and comment here. but I would rather follow a uniform project naming policy.

Improvement design decision

All 10 comments

under a different name ghini-it works, but the link again does not. I find a different maze, not "page not there yet" but "permission denied".

I did not change anything and it now works. I will try with registering one more translation, and report here.

http://ghinidesktop-docsi18n-ar.readthedocs.io/ar/latest/ (gives the still totally untranslated documentation, but it does show the desired page)
http://ghini.readthedocs.io/ar/latest/ (gives Maze found, Permission Denied)

Hi, are you still having this issue? All the links provided work properly (I really don't understand your last comment, sorry)

I had forgotten about this, I think it has to do with the fact I'm not using 'master': I'm working with branches 'ghini-1.0-dev' and 'ghini-1.1-dev' and 'master' does not mean much to me.

http://ghini.readthedocs.io/it/ does not work,
http://ghini.readthedocs.io/it/ghini-1.0-dev works
and I wish to use the first, shorter link, when telling people where they can find the translated docs.

ghini-1.0-dev is the default version for all projects, the one being translated as well as its translations, but only http://ghini.readthedocs.io/ correctly sends me to http://ghini.readthedocs.io/ghini-1.0-dev, for translations I have to type the complete url, or a maze is found.

So the problem here is to redirect to the default version of any translation when visiting /{lang}/.

yes, this is a better title for the issue. I guess it wasn't clear to me either, what was going on.

I changing the title to be more accurate to the real issue

@stsewd , are you sure it's clear enough? or was the clearer option too long?
redirect to the default version of any translation when visiting /{lang}/
the problem is namely not with the default language, but with the translations.

Supporting this is not trivial since these files are served by nginx directly and does not hit the Django instance. So, at that level, we don't know what it's the default version.

In case we want to handle this, we would need to redirect /{lang}/ requests to Django, and it will needs to return a 302 to the full path containing the default version.

Was this page helpful?
0 / 5 - 0 ratings