mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-29 14:32:51 -06:00
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:
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user