aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorSamuel Tardieu <sam@rfc1149.net>2013-09-13 14:20:43 +0200
committerSamuel Tardieu <sam@rfc1149.net>2013-09-13 14:20:59 +0200
commit2a645cb6bfe136dc9b16234e64e2af83c71dd26b (patch)
tree632a618ca5f24fef2ba1d158921483ffbe895082 /main
parentfaf8118561cbb2d63c037fee34c34845f370e5d9 (diff)
downloadcgeo-2a645cb6bfe136dc9b16234e64e2af83c71dd26b.zip
cgeo-2a645cb6bfe136dc9b16234e64e2af83c71dd26b.tar.gz
cgeo-2a645cb6bfe136dc9b16234e64e2af83c71dd26b.tar.bz2
close #3271: document handling of unit expressions in text-to-speech
Diffstat (limited to 'main')
-rw-r--r--main/src/cgeo/geocaching/speech/TextFactory.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/main/src/cgeo/geocaching/speech/TextFactory.java b/main/src/cgeo/geocaching/speech/TextFactory.java
index 72475f7..2a3b6d7 100644
--- a/main/src/cgeo/geocaching/speech/TextFactory.java
+++ b/main/src/cgeo/geocaching/speech/TextFactory.java
@@ -12,6 +12,13 @@ import java.util.Locale;
/**
* Creates the output to be read by TTS.
*
+ * Note: some languages need to read "one hour" as "a hour" (indefinite article). Also, other languages
+ * use the <tt>quantity="1"</tt> plurals rule for other values than 1, such as Slovenian, so it is not
+ * possible to store the literal value to use for 1 in this rule. For this reason, we need to have one
+ * string for the unit quantity ("one meter") and a plurals rule for everything else.
+ *
+ * See http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html for rules
+ * on unit expressions.
*/
public class TextFactory {
public static String getText(Geopoint position, Geopoint target, float direction) {