[dokuwiki] translation plugin and no root namespace

  • From: Mike Frysinger <vapier@xxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Mon, 11 Jun 2007 05:43:19 -0400

i added the translation plugin to the Blackfin site and noticed an issue with 
the default language ... our site is configured so there is no global 
namespace:
http://docs.blackfin.uclinux.org/doku.php?id=processes
the first set of links are ok:
[default (en)] id=processes
[de] id=de:processes
[zh] id=zh:processes

but when viewing an actual translation, the new links are:
[default (en)] id=de:processes
[de] id=de:processes
[zh] id=zh:processes

my guess is that since we dont have a root namespace like the dokuwiki site, 
the code expects "$id" to be a fully qualified id ... but when it isnt, 
dokuwiki treats it as a relative one and since we're in a sub-namespace for 
this specific language, the new id is treated as a relative one ... thus the 
page "processes" is assumed relative and the current translation namespace 
("de:") gets prefixed

my quick fix was to prefix ":" for the default language in the 
_buildTransLink() function ...
-mike

Other related posts: