chewing / chewing-editor

Cross platform chewing user phrase editor
https://chewing.im/
GNU General Public License v2.0
31 stars 52 forks source link

add three-wchar word, returns 0 but the three-wchar word is not added #106

Closed YWJamesLin closed 8 years ago

YWJamesLin commented 8 years ago

When I run add feature, and add

爽炸天(ㄕㄨㄤˇ ㄓㄚˋ ㄊ一ㄢ )

the program returns 0 but the phrase is not added. screenshot_20160321_131030

screenshot_20160321_131303

screenshot_20160321_131337

david50407 commented 8 years ago

When chewing_userphrase_add returns NULL (0), it usually means add failed.

YWJamesLin commented 8 years ago

Ok, I understand. But this phrase should not failed to be added. And this is another example:

哈啦秀(ㄏㄚ ㄌㄚ ㄒ一ㄡˋ)

which failed to be added, too.

david50407 commented 8 years ago

Try using (bopomofo) instead of (Chinese word)

YWJamesLin commented 8 years ago

By doing replacement, this fixed my issue, 2 example are tested.

david50407 commented 8 years ago

Maybe we have to auto-convert (phone) to (Bopomofo) or give a warning while users type non-bopomofo words or any other poka-yoke solutions.

robert501128 commented 8 years ago

Hi, I adopt the recommendation of @david50407 and add a function to automatically change 一(phone) to ㄧ(Bopomofo) , please check it out! https://github.com/robert501128/chewing-editor/blob/master/src/model/UserphraseModel.cpp