Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed on 2 or more spaces between the bopomofo of word #204

Open
yachiyang01 opened this issue Apr 8, 2017 · 9 comments
Open

Failed on 2 or more spaces between the bopomofo of word #204

yachiyang01 opened this issue Apr 8, 2017 · 9 comments

Comments

@yachiyang01
Copy link

when I type "天將降大人於斯人也", this word will be cut into 3 words.(including "天將降大任於" & "斯人" & "也")
and I though I can edit "天將降大任於" and make it to be "天將降大人於斯人也".
However,it doesn't work. The word's still "天將降大任於" .

111111

222222

p.s. there is a space between each word's bopomofo during editing the word. issue98

Cannot edit the word which is more than 6 characters longer

@david50407
Copy link
Member

Could you provide debug message from console and the phrase with bopomofo you typed?

I added the phrase with master build successful.

image

@yachiyang01
Copy link
Author

yachiyang01 commented Apr 9, 2017

I knew it works when adding a new word with master.
If I modify(修改) a word which is already existed and consists of six characters(天將降大任於), it still shows success but not right answer(天將降大任於,not天將降大任於斯人也).

@jserv
Copy link
Member

jserv commented Apr 9, 2017

@yachiyang01, Please check the debugging messages generated by chewing-editor -d and look for related operations. We need to know more about program behavior.

@yachiyang01
Copy link
Author

Hi. I upload the messages.
debug

@jserv
Copy link
Member

jserv commented Apr 9, 2017

@yachiyang01 , you should attach text messages as possible as you can since developers would like to figure out by searching certain words.

@yachiyang01
Copy link
Author

yachiyang01 commented Apr 9, 2017

@jserv Okay.

I was modifying "天將降大任於" to "天將降大任於斯人也" and add "ㄙ ㄖㄣˊ ㄧㄝˇ" in the bopomofo.
I just found it isn't modified successfully because of "ㄙ ". I type 2 space between "ㄙ" and "ㄖㄣˊ".
If I just type 1 space between them, it works!

02

@jserv
Copy link
Member

jserv commented Apr 9, 2017

Good! Let's clarify the subject to be more precise. If key stroke sequence contains space which means vocal intensity in Bopomofo, chewing-editor would suffer from unexpected discard with phrases. @yachiyang01, can you verify my understanding and revise the subject of this issue?

@yachiyang01
Copy link
Author

I think the conclusion @jserv made is right. It happens not only modifying a phrase but also adding a new phrase.I try to add the new phrase "哈囉" and the bopomofo is "ㄏㄚ ㄌㄨㄛ" (one space between "ㄏㄚ" and "ㄌㄨㄛ").It's fine.
However, when I add the new phrase "嗨你好" and the bopomofo is "ㄏㄞ ㄋㄧˇ ㄏㄠˇ" (2 spaces between "ㄏㄞ" and "ㄋㄧˇ"), it fails.

2-1
2-2

I will trace the code and do my best to revise it!

@david50407
Copy link
Member

@jserv @yachiyang01 Since the reason is declared now, I'm going to change the subject to "Failed on 2 or more spaces between the bopomofo of word" (Original "Cannot edit the word which is more than 6 characters longer")

@david50407 david50407 changed the title Cannot edit the word which is more than 6 characters longer Failed on 2 or more spaces between the bopomofo of word Apr 9, 2017
david50407 added a commit to david50407/chewing-editor that referenced this issue Apr 10, 2017
Replace all duplicated spaces (included tabs) into single space.
Move `testBopomofo` method from UserphraseModel into BopomofoUtil for testing.
david50407 added a commit to david50407/chewing-editor that referenced this issue Apr 10, 2017
Replace all duplicated spaces (included tabs) into single space.
Move `testBopomofo` method from UserphraseModel into BopomofoUtil for testing.
david50407 added a commit to david50407/chewing-editor that referenced this issue Apr 17, 2017
Fixed chewing#204.

Move `testBopomofo` method from UserphraseModel into BopomofoUtil for testing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants