forked from GitHub/gf-core
Wide Coverage Web Demo: fix bug introduced in previous patch
Word-for-word translations were shown in the wrong language after switching traget language.
This commit is contained in:
@@ -107,7 +107,8 @@ wc.translate=function() {
|
|||||||
so.current_pick=i
|
so.current_pick=i
|
||||||
if(wc.selected==so) show_more()
|
if(wc.selected==so) show_more()
|
||||||
}
|
}
|
||||||
function showit2(r) {
|
function showit2(r,grammar) {
|
||||||
|
r.grammar=grammar
|
||||||
so.rs.push(r)
|
so.rs.push(r)
|
||||||
var j=so.rs.length-1
|
var j=so.rs.length-1
|
||||||
if(so.current_pick==j) show_trans(j)
|
if(so.current_pick==j) show_trans(j)
|
||||||
@@ -115,16 +116,16 @@ wc.translate=function() {
|
|||||||
//disable(false)
|
//disable(false)
|
||||||
}
|
}
|
||||||
function showit(r,grammar) {
|
function showit(r,grammar) {
|
||||||
r.grammar=grammar
|
|
||||||
r.t=trans_quality(r,grammar+f.to.value)
|
r.t=trans_quality(r,grammar+f.to.value)
|
||||||
r.text=r.t.text
|
r.text=r.t.text
|
||||||
showit2(r)
|
showit2(r,grammar)
|
||||||
}
|
}
|
||||||
function show_words(r) {
|
function show_words(r) {
|
||||||
var ix=find_to(gftranslate.grammar+f.to.value,r.linearizations)
|
var g=gftranslate.grammar
|
||||||
|
var ix=find_to(g+f.to.value,r.linearizations)
|
||||||
r.text=r.linearizations[ix].text
|
r.text=r.linearizations[ix].text
|
||||||
r.t={quality:"bad_quality",text:r.text}
|
r.t={quality:"bad_quality",text:r.text}
|
||||||
showit2(r)
|
showit2(r,g)
|
||||||
}
|
}
|
||||||
|
|
||||||
function word_for_word(text,cont) {
|
function word_for_word(text,cont) {
|
||||||
|
|||||||
Reference in New Issue
Block a user