From 0386334f49fde8c5e4a5f438ae5cf9ed285e4579 Mon Sep 17 00:00:00 2001 From: hallgren Date: Tue, 28 Jan 2014 16:51:21 +0000 Subject: Wide coverage translation web demo improvements + Add lexing/unlexing + Add a button to swap input and output + Minor layout adjustments --- demos/translation.t2t | 2 +- demos/wc.html | 68 ----------------------------- src/www/gfse/cloud2.js | 4 ++ src/www/translator/translator.js | 3 -- src/www/wc.html | 92 ++++++++++++++++++++++++++++++++++++++++ 5 files changed, 97 insertions(+), 72 deletions(-) delete mode 100644 demos/wc.html create mode 100644 src/www/wc.html diff --git a/demos/translation.t2t b/demos/translation.t2t index 428dd7acc..9ed59b42b 100644 --- a/demos/translation.t2t +++ b/demos/translation.t2t @@ -3,7 +3,7 @@ Powered by multilingual grammars %!style:../css/style.css %!postproc(html):

-%!postproc(html): #GFWCT +%!postproc(html): #GFWCT ==Try it online== diff --git a/demos/wc.html b/demos/wc.html deleted file mode 100644 index 600afda3d..000000000 --- a/demos/wc.html +++ /dev/null @@ -1,68 +0,0 @@ - - -Demo: GF Wide Coverage Translation - - - - - - - -
-

GF -Wide Coverage Translation

-
-
-
-

- -
- - → - → - - -
- -

-
- - - - - - - diff --git a/src/www/gfse/cloud2.js b/src/www/gfse/cloud2.js index dbb322ed8..318e2739e 100644 --- a/src/www/gfse/cloud2.js +++ b/src/www/gfse/cloud2.js @@ -272,3 +272,7 @@ function check_exp(s,cont) { } gfshell("cc "+s,check); } + +// Lexing/unlexing text +function lextext(txt,cont) { gfshell('ps -lextext "'+txt+'"',cont) } +function unlextext(txt,cont) { gfshell('ps -bind -unlextext "'+txt+'"',cont) } diff --git a/src/www/translator/translator.js b/src/www/translator/translator.js index e124e3523..1c8dbede6 100644 --- a/src/www/translator/translator.js +++ b/src/www/translator/translator.js @@ -1193,9 +1193,6 @@ function save_in_cloud(filename,document,cont) { with_dir(save) } -function unlextext(txt,cont) { gfshell('ps -bind -unlextext "'+txt+'"',cont) } -function lextext(txt,cont) { gfshell('ps -lextext "'+txt+'"',cont) } - // Like lextext, but separate punctuation from the end function lexgfrobust(txt,cont) { function rmpunct(txt) { diff --git a/src/www/wc.html b/src/www/wc.html new file mode 100644 index 000000000..08c7c62e0 --- /dev/null +++ b/src/www/wc.html @@ -0,0 +1,92 @@ + + +Demo: GF Wide Coverage Translation + + + + + + + + +
+

GF Wide Coverage Translation

+
+ + +
+
+ +
+ + → + → + + +    +
+ +
+ +
+

+

+Last modified: Tue Jan 28 17:38:32 CET 2014 +
+ + + + + + + + -- cgit v1.2.3