summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhallgren <hallgren@chalmers.se>2015-01-21 16:02:37 +0000
committerhallgren <hallgren@chalmers.se>2015-01-21 16:02:37 +0000
commitc398b1e794cada1558eb10c1d09573e184269de2 (patch)
tree38ab5898ab351a6fa28db1a17cb141e2a9aa9a85 /src
parent6b55ad88d4440ff6e68445006f625249637053b8 (diff)
Wide Coverage Translation Demo: use App13.pgf, adding support for Japanese
Japanese uses the same lexer as Chinese, i.e. every character is a separate token.
Diffstat (limited to 'src')
-rw-r--r--src/www/js/gftranslate.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/www/js/gftranslate.js b/src/www/js/gftranslate.js
index e061554b6..c25d6859e 100644
--- a/src/www/js/gftranslate.js
+++ b/src/www/js/gftranslate.js
@@ -3,7 +3,7 @@
var gftranslate = {}
-gftranslate.jsonurl="/robust/App12.pgf"
+gftranslate.jsonurl="/robust/App13.pgf"
gftranslate.grammar="App" // the name of the grammar
gftranslate.call=function(querystring,cont,errcont) {
@@ -20,7 +20,7 @@ function enc_langs(g,to) {
gftranslate.translate=function(source,from,to,start,limit,cont) {
var g=gftranslate.grammar
var lexer="&lexer=text"
- if(from=="Chi") lexer="",source=source.split("").join(" ")
+ if(from=="Chi" || from=="Jpn") lexer="",source=source.split("").join(" ")
var encsrc=encodeURIComponent(source)
function errcont(text,code) { cont([{error:code+" "+text}]) }
function extract(result) { cont(result[0].translations) }