From 7d4e419c0eeef01bfd673e49266eef07e3f714ca Mon Sep 17 00:00:00 2001 From: Patrick Simianer Date: Fri, 6 Nov 2015 18:50:15 +0100 Subject: fix nomt --- js/lfpe.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'js') diff --git a/js/lfpe.js b/js/lfpe.js index 30f7787..e2b0f42 100644 --- a/js/lfpe.js +++ b/js/lfpe.js @@ -311,7 +311,11 @@ function Next() // update interface oov_correct.value = false; status.style.display = "none"; - target_textarea.value = translation; + if (!translation) { + target_textarea.value = ""; + } else { + target_textarea.value = translation; + } //raw_source_textarea.value = raw_source; $("#raw_source_textarea").html(raw_source); button.innerHTML = "Next"; @@ -322,7 +326,8 @@ function Next() if (id > 0) { removeClass(document.getElementById("seg_"+(id-1)), "bold"); } - target_textarea.rows = Math.round(translation.length/80+0.5); + if (translation) + target_textarea.rows = Math.round(translation.length/80+0.5); //raw_source_textarea.rows = Math.round(raw_source.length/80+0.5); target_textarea.focus(); target_textarea.selectionStart = 0; -- cgit v1.2.3