mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-10-25 09:13:18 -06:00
Change JS translation to replace existing output when a new translation is done.
This commit is contained in:
1 parent
4c44f9fe18
commit
8a022d65b3
2 files changed
+15
-5
No files matched your search
@@ -14,7 +14,10 @@
|
||||
var input = document.getElementById('inputText').value;
|
||||
var fromLang = document.getElementById('fromLang').value;
|
||||
var toLang = document.getElementById('toLang').value;
|
||||
addTranslation('output', grammar.translate(input, fromLang, toLang));
|
||||
var output = document.getElementById('output');
|
||||
var translation = grammar.translate(input, fromLang, toLang);
|
||||
removeChildren(output);
|
||||
output.appendChild(formatTranslation(translation));
|
||||
}
|
||||
|
||||
function populateLangs () {
|
||||
|
||||
Reference in new issue
Block a user