minibar: internal state type change

The current intput is now represented as an array of words instead of as a
string.
(This is the kind of change is scary to do in a dynamically type language
like JavaScript. In a statically typed language like Haskell you can do it
with confidence, since you know the compiler can help you catch all mistakes...)
This commit is contained in:
hallgren
2012-04-10 18:00:13 +00:00
parent 89b415ac37
commit 68e2c0c0eb
3 changed files with 24 additions and 26 deletions

View File

@@ -51,12 +51,11 @@ Translations.prototype.translateFrom=function(current,startcat) {
Translations.prototype.get_translations=function() {
with(this) {
var c=current;
var args={from:c.from,input:gf_unlex(c.input),cat:startcat}
if(options.show_grouped_translations)
server.translategroup({from:c.from,input:c.input,cat:startcat},
bind(show_groupedtranslations,this));
server.translategroup(args,bind(show_groupedtranslations,this));
else
server.translate({from:c.from,input:c.input,cat:startcat},
bind(show_translations,this));
server.translate(args,bind(show_translations,this));
}
}