From fc4c8b0058e425baf4e2b516256f96ed900de29c Mon Sep 17 00:00:00 2001 From: hallgren Date: Fri, 20 Jun 2014 18:39:28 +0000 Subject: Cloud service & apps: better error handling in wide coverage translation The wide coverage demo apps now shows a "please wait" message while the grammar is loading, and a red error message if the grammar is not found on the server. The Simple Translation Tool also show red error messages if the grammar is not found. --- src/www/translator/translator.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/www/translator') diff --git a/src/www/translator/translator.js b/src/www/translator/translator.js index 4a088e66c..7ea5e0882 100644 --- a/src/www/translator/translator.js +++ b/src/www/translator/translator.js @@ -274,7 +274,10 @@ Translator.prototype.update_translation=function(i) { upd3s("["+msg+"]") } } - gftranslate.get_support(check_support) + function no_support(text,status,ct) { + upd3s("[GF Robust translation service error: "+status+"]") + } + gftranslate.get_support(check_support,no_support) } } -- cgit v1.2.3