On Jan 14, 2010, at 1:40 PM, qnix wrote:
> Hi,
>
> In our sphinx doc, we have 2 languages in 2 differents directory (en,
> de). The official doc is always in the en directory. In the "de"
> directory, there are only translated documents and all the
> untranslated documents are handled with an apache 404 handler (which
> just returns the english document).
>
> However, we generate the html documentation of the "de" language, all
> untranlated pages are not linked properly with a <a> tag. You can see
> the problem there:
>
> ok: http://mapserver.org/en/documentation.html
> not ok: http://mapserver.org/de/documentation.html
>
> We would like to get shinx generate the html link even if the real
> page is missing. How could I solve this?
>
Here is some more detail on this issue. Each translation is essentially its
own Sphinx build, though their trees mimic each other. You can see our layout
here: https://svn.osgeo.org/mapserver/trunk/docs/
What we would like to do is have a primary translation tree, in our case en, as
well as any other translation trees. The other translation trees are not going
to be complete, however, and we need the ability to fall back to the en docs if
a translated doc is not available. Our plan is to use some simple 404 handlers
the point back to the en docs in case a de one is not found. This has the
advantage of letting document writers only worry about one set of labels and
provides us the ability to add multiple languages without too much hassle while
still degrading translation-wise somewhat gracefully.
The only hiccup with our approach is the labels of the de directory don't
really know about the primary translation's labels -- the ones in the en tree.
What we need to do is somehow inform the de tree to use the en tree's labels
after it is unable to resolve the reference in its own tree. Does this make
sense?
How should we do this? How can we make these two BuildEnvironment's know about
each other? Upgrading to tip or adding our own code are no problem in our
case.
Thanks for any ideas,
Howard
--
You received this message because you are subscribed to the Google Groups
"sphinx-dev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sphinx-dev?hl=en.