Skip to content

Commit

Permalink
Make no use the more specific nb locale as nb is what Android uses.
Browse files Browse the repository at this point in the history
  • Loading branch information
rhdunn committed Oct 11, 2015
1 parent 0b898ed commit e308cec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public Exception(Voice voice, String context, AssertionError error)
new Voice("ms", "asia/ms", "ms", "msa", "", "", "", SpeechSynthesis.GENDER_MALE, "Malay", "msa", "Ini adalah sampel teks yang dilafazkan dalam Bahasa Melayu", "Ini adalah sampel teks yang dilafazkan dalam Malay"),
new Voice("ne", "asia/ne", "ne", "nep", "", "", "", SpeechSynthesis.GENDER_MALE, "Nepali", "nep", "This is a sample of text spoken in Nepali", "This is a sample of text spoken in नेपाली"),
new Voice("nl", "europe/nl", "nl", "nld", "", "", "", SpeechSynthesis.GENDER_MALE, "Dutch", "nld", "Dit is een voorbeeld van tekst die is uitgesproken in het Nederlands"),
new Voice("no", "europe/no", "no", "nor", "", "", "", SpeechSynthesis.GENDER_MALE, "Norwegian", "nor", "This is a sample of text spoken in Norwegian", "This is a sample of text spoken in norsk"),
new Voice("no", "europe/no", "nb", "nob", "", "", "", SpeechSynthesis.GENDER_MALE, "Norwegian (Bokmål)", "nob", "Dette er et teksteksempel lest opp på norsk bokmål"),
new Voice("om", "test/om", "om", "orm", "", "", "", SpeechSynthesis.GENDER_UNSPECIFIED, "Oromoo", "orm", "This is a sample of text spoken in Oromo", "This is a sample of text spoken in Oromoo"),
new Voice("or", "test/or", "or", "ori", "", "", "", SpeechSynthesis.GENDER_UNSPECIFIED, "Oriya", "ori", "This is a sample of text spoken in Oriya", "This is a sample of text spoken in ଓଡ଼ିଆ"),
new Voice("pa", "asia/pa", "pa", "pan", "", "", "", SpeechSynthesis.GENDER_UNSPECIFIED, "Panjabi", "pan", "This is a sample of text spoken in Punjabi", "This is a sample of text spoken in ਪੰਜਾਬੀ"),
Expand Down
2 changes: 2 additions & 0 deletions android/src/com/reecedunn/espeak/SpeechSynthesis.java
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,7 @@ private static String getIanaLocaleCode(String code, final Map<String, String> j
mJavaToIanaLanguageCode.put("msa", "ms");
mJavaToIanaLanguageCode.put("nep", "ne");
mJavaToIanaLanguageCode.put("nld", "nl");
mJavaToIanaLanguageCode.put("nob", "nb");
mJavaToIanaLanguageCode.put("nor", "no");
mJavaToIanaLanguageCode.put("ori", "or");
mJavaToIanaLanguageCode.put("orm", "om");
Expand Down Expand Up @@ -449,6 +450,7 @@ private static String getIanaLocaleCode(String code, final Map<String, String> j
mLocaleFixes.put("es-la", new Locale("es", "MX"));
mLocaleFixes.put("fa-pin", null); // Script tags not supported.
mLocaleFixes.put("hy-west", new Locale("hy", "AM", "arevmda")); // hy-arevmda crashes on Android 5.0
mLocaleFixes.put("no", new Locale("nb")); // 'no' is valid, but the system uses the more specific 'nb' and 'nn'
mLocaleFixes.put("vi-hue", new Locale("vi", "VN", "hue"));
mLocaleFixes.put("vi-sgn", new Locale("vi", "VN", "saigon"));
mLocaleFixes.put("zh-yue", new Locale("zh", "HK"));
Expand Down

0 comments on commit e308cec

Please sign in to comment.