Warning: Declaration of action_plugin_blockquote::register(&$controller) should be compatible with DokuWiki_Action_Plugin::register(Doku_Event_Handler $controller) in /homepages/28/d368155305/htdocs/RYT/lib/plugins/blockquote/action.php on line 46

Warning: Declaration of action_plugin_columns::register(&$controller) should be compatible with DokuWiki_Action_Plugin::register(Doku_Event_Handler $controller) in /homepages/28/d368155305/htdocs/RYT/lib/plugins/columns/action.php on line 141

Warning: Declaration of action_plugin_logstats::register(&$controller) should be compatible with DokuWiki_Action_Plugin::register(Doku_Event_Handler $controller) in /homepages/28/d368155305/htdocs/RYT/lib/plugins/logstats/action.php on line 184

Warning: Declaration of action_plugin_orgapp::register(&$controller) should be compatible with DokuWiki_Action_Plugin::register(Doku_Event_Handler $controller) in /homepages/28/d368155305/htdocs/RYT/lib/plugins/orgapp/action.php on line 28

Warning: Declaration of action_plugin_pixshow::register(&$controller) should be compatible with DokuWiki_Action_Plugin::register(Doku_Event_Handler $controller) in /homepages/28/d368155305/htdocs/RYT/lib/plugins/pixshow/action.php on line 177

Warning: Declaration of action_plugin_wrap::register(&$controller) should be compatible with DokuWiki_Action_Plugin::register(Doku_Event_Handler $controller) in /homepages/28/d368155305/htdocs/RYT/lib/plugins/wrap/action.php on line 148

Warning: Cannot modify header information - headers already sent by (output started at /homepages/28/d368155305/htdocs/RYT/lib/plugins/blockquote/action.php:46) in /homepages/28/d368155305/htdocs/RYT/inc/auth.php on line 543

Warning: Cannot modify header information - headers already sent by (output started at /homepages/28/d368155305/htdocs/RYT/lib/plugins/blockquote/action.php:46) in /homepages/28/d368155305/htdocs/RYT/inc/actions.php on line 217
wiki_plugin_plus_script [Redesign Your Town]

Redesign Your Town

Urban Regeneration in Four European Countries

User Tools

Site Tools


wiki_plugin_plus_script

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /homepages/28/d368155305/htdocs/RYT/inc/parser/handler.php on line 1427

Warning: Declaration of syntax_plugin_wrap_div::handle($match, $state, $pos, &$handler) should be compatible with DokuWiki_Syntax_Plugin::handle($match, $state, $pos, Doku_Handler $handler) in /homepages/28/d368155305/htdocs/RYT/lib/plugins/wrap/syntax/div.php on line 14

Warning: Declaration of syntax_plugin_wrap_div::render($mode, &$renderer, $indata) should be compatible with DokuWiki_Syntax_Plugin::render($format, Doku_Renderer $renderer, $data) in /homepages/28/d368155305/htdocs/RYT/lib/plugins/wrap/syntax/div.php on line 14

Warning: Declaration of syntax_plugin_vshare::handle($match, $state, $pos, &$handler) should be compatible with DokuWiki_Syntax_Plugin::handle($match, $state, $pos, Doku_Handler $handler) in /homepages/28/d368155305/htdocs/RYT/lib/plugins/vshare/syntax.php on line 162

Warning: Declaration of syntax_plugin_vshare::render($mode, &$R, $data) should be compatible with DokuWiki_Syntax_Plugin::render($format, Doku_Renderer $renderer, $data) in /homepages/28/d368155305/htdocs/RYT/lib/plugins/vshare/syntax.php on line 162

Automatization script for the translate plugin

Hello everyone again. As you may know, recently I've developed a plugin for the wiki. If you don't know what I'm talking about, I suggest you to read it here. The thing is that, as I told you before, I've been working in something more to make use of the plugin. And It's finally done.

Until now, to use the plugin you needed to edit some page and write the translate tag. Something like this:

{{translate>some words here||direction_of_mp3}}

Not so hard, I think. But we are awared that you all are really busy (so we are). And we wanted to help you save more time of editing the page. In consecuence, I've developed a script (a set of computer instructions) that automatice all the work. Now you can concentrate more in expanding the glossaries while my program does the dirty work.

So, what does It exactly do ?. Well, in fact It have two parts:

-The wikiventario script: This one read all the glossarie pages searching the words with their recorded translations (exactly the information the plugin needs) and index it in simple text file. This mean that the script needed to know the format of how the glossaries were stored. Not sutch a big deal because they all use the same format, but still hard to do.

-The wikitranslate script: This one takes the text file created by the previous one and search in the wiki for the indexed words. When It finds one, It's replaced with the apropiate translate tag. That was the tough part. In the wiki there is many different tags whith different formats. And you can't replace the words everywhere. For example, inside the direction of a link. So the script had to understand all that formats and replace only in the adecuate parts. It took a lot of work and headache to accomplish it. At the end, I think it works really well. Also, a log of all the changes is created and a backup of the files is done. All fully professional (more or less).

So that's the idea: You fill in the glossaries and, periodically, the scripts are executed by us. The index is updated and the words replaced without further work. Really easy and time-saving.

To clarify things, I've recorded a video showing the execution of the script:


This is all. The code of both scripts is published under a free software license (so you are free to estudy, modify and use it) and can be found here: https://github.com/Kamisama666/inventarioWiki. If you find some bug or malfunctioning, please report it (I will register an email direction for that soon).

For now, this is all the work I've planned to do for the wiki (at least, on the developing side). Now It's your turn to colaborate expanding the wiki and making it bigger. Also, if you have any suggestion of idea for new cool features, let me know it. Any feedback is welcome. Maybe, in the future, I'll develope. In any case, I'll keep you informed.

Anyway, goodbye for the moment. See you soon.

by Ángel García Jiménez

TOP

wiki_plugin_plus_script.txt · Last modified: 2014/10/15 22:39 by antony