splitbrain / dokuwiki-plugin-translation

Easily setup a multi-language DokuWiki
http://www.dokuwiki.org/plugin:translation
23 stars 24 forks source link

Automatically adjust links in translated page to lead to translated variants, where available #272

Closed stapelberg closed 3 years ago

stapelberg commented 3 years ago

I’m working on a dokuwiki instance that is in German as its main language.

We’re now trying to add a French translation.

Let’s say we have the following 2 German pages:

Now, we add (only) a French version of recht/einleitung under path fr/recht/einleitung, but not yet a translation of recht/verzeigung.

When displaying the French fr/recht/einleitung, the link leads to the German recht/verzeigung.

So far, this is expected. But, what happens when we add a translation of recht/verzeigung under fr/recht/verzeigung, too?

AFAICT, the link in the French fr/recht/einleitung will still end up in the German recht/verzeigung.

I would have expected the translation plugin to realize that a French version exists, and update the link accordingly.

It seems like, whenever we add a new French page, we need to update all incoming links in the French versions manually?

splitbrain commented 3 years ago

This has nothing to do with the translation plugin. Links containing a namespace are always absolute. Please read up on https://www.dokuwiki.org/namespaces

stapelberg commented 3 years ago

Links containing a namespace are always absolute. Please read up on https://www.dokuwiki.org/namespaces

Which part specifically?

And I don’t quite understand: even if namespaces are absolute, why does that mean we can’t automatically link to translated pages?

splitbrain commented 3 years ago

The translation plugin does not handle linking except for what it does in it's own language switching menu. When you translate pages you have to link to the proper pages yourself.

stapelberg commented 3 years ago

The translation plugin does not handle linking except for what it does in it's own language switching menu. When you translate pages you have to link to the proper pages yourself.

But wouldn’t you agree it’d be more convenient if the translation plugin would do so?

Or is there some reason to not add this feature request?