summaryrefslogtreecommitdiff
path: root/src/www/gfse/example_based.js
diff options
context:
space:
mode:
authorhallgren <hallgren@chalmers.se>2011-11-28 16:36:51 +0000
committerhallgren <hallgren@chalmers.se>2011-11-28 16:36:51 +0000
commit70d292d83b33395ea0313a970461a1af61b508d0 (patch)
tree91dd78778ce40d2e2e93e5729fd4790545e30dc9 /src/www/gfse/example_based.js
parent8fffefd268fb680a41c131da95b5ed868446eb6c (diff)
gfse: fix bugs and typos
Diffstat (limited to 'src/www/gfse/example_based.js')
-rw-r--r--src/www/gfse/example_based.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/www/gfse/example_based.js b/src/www/gfse/example_based.js
index cd5d256b5..285344e39 100644
--- a/src/www/gfse/example_based.js
+++ b/src/www/gfse/example_based.js
@@ -52,6 +52,9 @@ function ask_possibilities(g,ci) {
reload_grammar(g);
}
var exci=conc_index(g,conc.example_lang);
+ if(!conc.example_lang || !exci)
+ conc.example_lang=g.concretes[ci==0 ? 1 : 0].langcode;
+ var exci=conc_index(g,conc.example_lang);
exb_call(g,ci,"possibilities",{example_state:exb_state(g,exci)},show_poss)
}
@@ -67,7 +70,9 @@ function exb_extra(g,ci) {
}
function exblangmenu() {
- function opt(conc) { return option(conc.langcode,conc.langcode); }
+ function opt(conc) {
+ return option(concname(conc.langcode),conc.langcode);
+ }
function skip_target(c) { return c.langcode!=conc.langcode; }
var m =node("select",{},map(opt,filter(skip_target,g.concretes)));
if(conc.example_lang) m.value=conc.example_lang;
@@ -93,7 +98,7 @@ function exb_extra(g,ci) {
var why= g.concretes.length>1
? " ("+concname(conc.langcode)+" is not supported yet)"
: " (Add another language to take examples from first.)"
- return indent([unimportant("Example-based grammar editing: "), sb,
+ return indent([unimportant("Example-based editing: "), sb,
unimportant(why)])
}
}