Language dependend Help online for addon

Language dependend Help online for addon

Postby jokro » Wed Sep 25, 2013 8:15 pm

In a different post I presented a script to open a help file for an addon. The Help takes the help file in the current language or chooses english if the translated help file doesn't exist. :D The problem with this solution is that each time the help file is translated, the translation has to be included into the addon build. This isn't handy, as this has to be done by the programmer and can/shouldn't be done by the translator. :twisted:

For that reason i developed a "Help online" script which loads the help file from the addon wiki.
In this way it is possible for a transalator to upload the translated helpfile himself, to share it with other users.
I ran in the following problem however: the path where the help file is stored seems to be changing. A concrete example. I uploaded smartlocker.mm and its translation smartlocker_nl.mm. The default position where both files are stored are:

"http://freeplane.sourceforge.net/wiki/images/8/85/Smartlocker.mm"
"http://freeplane.sourceforge.net/wiki/images/7/7f/Smartlocker_nl.mm"

Given the path for smartlocker.mm I should be able to predict the path for the translation to have Help online act in the way described.
Is this possible :?:

Regards
Jodi
jokro
 
Posts: 486
Joined: Sun Jul 24, 2011 2:56 pm

Re: Language dependend Help online for addon

Postby fnatter » Thu Sep 26, 2013 5:35 pm

hi Jodi,

looks like the parent directory names consist of the prefix of the hash of the uploaded file, hence
it will be different for every file. I think your best bet is to write a php script for freeplane.org
utilizing the mediawiki API to get an uploaded file (sth like getmap.php?filename=Smartlocker_nl.mm).

You could also google whether we can use the mediawiki translation extension to create the link between English and
translated mind maps / uploads.

Best Regards,
Felix
fnatter
 
Posts: 149
Joined: Mon Jan 23, 2012 5:50 pm

Re: Language dependend Help online for addon

Postby jokro » Thu Sep 26, 2013 7:21 pm

Felix,
You are right. It is md5. Thx
Regards
Jodi
jokro
 
Posts: 486
Joined: Sun Jul 24, 2011 2:56 pm


Return to Developers

Who is online

Users browsing this forum: No registered users and 1 guest