chewing / chewing-editor

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

Modify/Add phrase message and the modification failed phrase should not be removed. #75

Closed alwayschoco closed 8 years ago

alwayschoco commented 8 years ago

When I modify a existing phrase, the message shows "Add new phrase successful" rather than "Modify a phrase successful" .

I add a new phrase 耶(一ㄝ) e

And then I modify it to 一ㄝˋ, but the message above shows "Add new phrase 耶(一ㄝˋ) successful" . r

I think it should be some modify message like "Modify phrase 耶(一ㄝ) to 耶(一ㄝˋ) successful" because I didn't add any new phrase into phrase list.

Besides, if Add failed, the message should be "Add new phrase 耶(一ㄝ) failed" while if Modification failed, the message should be "Modify phrase 耶(一ㄝ) to 耶(一ㄝˋ) failed" instead of "Remove 1 phrase successful", and the original phrase before modification should not be removed. (in this example , the phrase 耶(一ㄝ) should exists in list)

david50407 commented 8 years ago

Because we are re-using add and remove function in modify implementation, see https://github.com/chewing/chewing-editor/issues/109#issuecomment-199329500 . But you're right, it shouldn't remove the old phrase while failing add new phrase.