Forums | Mahara Translation
Translations
/
adminlang.git - update
13 March 2009, 5:26
Hello world,
I have just updated adminlang-1.1 branch of the adminlang.git Mahara tree. As usually, Nigel's 1.1_STABLE was merged so the tree should contain the most recent strings.
Also, several fixes and improvements have been done at the translation page: Textareas close when they loose focus (as one of the Nigel's request). When loading the page, the cursor is automatically put into the first untranslated string field. The page loading is a little bit faster now. The textarea appears when you click anywhere into the table cell, not just the text (I also tried an alternative to open the textare editor whenever user clicks on the row but it did not approve as a good idea as sometimes you want to loose focus, ie move the cursor out of the textarea field).
Technote: Nigel, I added a new "global" smarty variable called BODYONLOAD. If set, it populates <body onload="TheValueGoesHere"> defined in header.tpl.
13 March 2009, 6:40
Thanks for let us know, David.
As I wrote, I found Adminlang a very handy and smart tool. In your previous version that I used, the html hep files were not listed, and I think that it would be helpful to that the lang.php code found them too.
Thanks for programming the tool, anyway.
14 March 2009, 8:16
Hi Mari Cruz
HTML help files support is on my todo list... I'm quite busy these days working on other projects, so I can't tell you when it happens
14 March 2009, 6:19
Hi David - you shouldn't need to add an onload to the body - you can do it with MochiKit and addLoadEvent(). Grep the source for some examples. You can write some javascript and assign it in smarty using INLINEJAVASCRIPT if you need.14 March 2009, 8:12
Thanks for the tip Nigel! I shall check MochiKit more and learn about events handling provided. Currently, I am using HTML native onClick, onChange and onBlur attributes, maybe MochiKit provides a better approach... (I have worked with YUI only so far)15 March 2009, 16:36
Yes, MochiKit is the recommended approach, with its excellent signal/slot event mechanism. Using it in conjunction with native HTML events could cause strange behaviour, so I think it's better to use MochiKit all the time.
The key function you care about is 'connect'. See the documentation here: http://mochikit.com/doc/html/MochiKit/Signal.html