diff options
| author | aarne <aarne@chalmers.se> | 2014-04-15 22:02:06 +0000 |
|---|---|---|
| committer | aarne <aarne@chalmers.se> | 2014-04-15 22:02:06 +0000 |
| commit | 1bc77326e207a68bf4bf6711811f4a68277ed4e7 (patch) | |
| tree | ee196cef66157d58414874d6ae8fd7e8ab1eb4d2 /src/ui | |
| parent | fbcb5e195712b32393fb9435d7fa0ec20e206b5a (diff) | |
edits in App help ; name suggestion "Language Compiler" ; sepApo(), a quick fix to French and Italian elision in the App
Diffstat (limited to 'src/ui')
| -rw-r--r-- | src/ui/android/assets/help_content.html | 27 | ||||
| -rw-r--r-- | src/ui/android/res/values/strings.xml | 2 | ||||
| -rw-r--r-- | src/ui/android/src/org/grammaticalframework/ui/android/Translator.java | 17 |
3 files changed, 34 insertions, 12 deletions
diff --git a/src/ui/android/assets/help_content.html b/src/ui/android/assets/help_content.html index 08dec6834..dce3b2d31 100644 --- a/src/ui/android/assets/help_content.html +++ b/src/ui/android/assets/help_content.html @@ -2,12 +2,13 @@ <body> <p> DG Translator is a compact and completely off-line translator. -We do not show adds and we do not require internet connection. -However, if you want to use speech translation, then it might -work better if you are on-line. We use existing -Android speech services which may not be fully functional off-line. -In all cases you can always use keyboard input. +We do not show ads and we do not require internet connection. +However, if you encounter problems with the speech translation input +or output, it may work better if you are on-line. +In all cases you can always use keyboard input, also for editing the +speech input. </p> + <p> We indicate the translation confidence with colours: <ul> @@ -30,13 +31,13 @@ We indicate the translation confidence with colours: </ul> The translation works between any pair of the supported languages. However, it works best <b>from English</b> and also from Swedish. -From other languages it can be slow and give more red. +From other languages it can be slow and give more red results. But expect frequent updates and improvements! </p> <p> -When you tab on a translation you get a screen with <b>alternative translations</b>. -If the input is only a single word, then taping on each of the alternatives -gives you grammatical and morphological information for the word. +When you tap on a translation you get a screen with <b>alternative translations</b>. +If the input is only a single word, then tapping on each of the alternatives +gives you <b>grammatical information</b> about the word. </p> <p> The app also provides an <b>input method</b> which you can use as @@ -46,8 +47,12 @@ To activate it go to Settings > Language & input. </p> <p> Powered by <a href="http://www.grammaticalframework.org/">GF</a>, -built by <a href="http://www.digitalgrammars.com/">Digital Grammars</a> +built by <a href="http://www.digitalgrammars.com/">Digital Grammars</a>. +</p> +<p> +<i>Digital Grammars can tailor this app to you needs - tell us what you want to see + in the green area!</i> </p> - </body> +</body> </html> diff --git a/src/ui/android/res/values/strings.xml b/src/ui/android/res/values/strings.xml index 768ef60a4..f1a679244 100644 --- a/src/ui/android/res/values/strings.xml +++ b/src/ui/android/res/values/strings.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <resources> - <string name="app_name">DG Translator</string> + <string name="app_name">Language Compiler</string> <string name="microphone">Microphone</string> <string name="switch_languages">Switch languages</string> diff --git a/src/ui/android/src/org/grammaticalframework/ui/android/Translator.java b/src/ui/android/src/org/grammaticalframework/ui/android/Translator.java index e7c0a4966..c4135c41b 100644 --- a/src/ui/android/src/org/grammaticalframework/ui/android/Translator.java +++ b/src/ui/android/src/org/grammaticalframework/ui/android/Translator.java @@ -265,6 +265,16 @@ public class Translator { return out; } + private static String sepApo(String in) { + String out = ""; + for (int i = 0; i < in.length(); i++) { + out += in.charAt(i); + if (in.charAt(i) == '\'') + out += ' '; + } + return out; + } + private String translateWord(String input) { String output = "[" + input + "]" ; // if all else fails, return the word itself in brackets @@ -311,6 +321,13 @@ public class Translator { // for Chinese we need to put space after every character input = explode(input); } + if (getSourceLanguage().getLangCode().equals("fr-FR")) { + // for French and Italian we need to separate apostrophe by space... + input = sepApo(input); + } + if (getSourceLanguage().getLangCode().equals("it-IT")) { + input = sepApo(input); + } String output = null; List<ExprProb> exprs = new ArrayList<ExprProb>(); |
