cmn: search for dictionary matches instead of translating characters.

cmn (Mandarin chinese) has been broken since 4825905.

This fix makes mandarin behave more like Cantonese. Instead of
translating characters, we search for dictionary matches.

The functionality of normal vs Chao tones should be investigated more.
Looks like latin characters as pinyin still uses Chao tones whereas
the characters in cmn_list and cmn_listx do not.

See #1044 for discussion. See also #1028 and #1163.
This commit is contained in:
Juho Hiltunen
2022-08-31 21:15:29 +03:00
parent 366658e85a
commit 1443c970cd
4 changed files with 41 additions and 9 deletions
+1 -1
View File
@@ -1588,8 +1588,8 @@ Translator *SelectTranslator(const char *name)
tr->langopts.ideographs = 1;
tr->langopts.our_alphabet = 0x3100;
tr->langopts.word_gap = 0x21; // length of a final vowel is less dependent on the next consonant, don't merge consonant with next word
tr->langopts.textmode = true;
if (name2 == L3('y', 'u', 'e')) {
tr->langopts.textmode = true;
tr->langopts.listx = 1; // compile zh_listx after zh_list
tr->langopts.numbers = NUM_DEFAULT;
tr->langopts.numbers2 = NUM2_ZERO_TENS;