ttempe / chinese-support-addon

Addon for Anki2 that makes easier to input Chinese, in the spirit of batterseapower’s pinyin-toolkit for Anki1
https://github.com/ttempe/chinese-support-addon/wiki
47 stars 19 forks source link

The 'Toogle Chinese Support' button doesn't work #33

Closed thestick366 closed 10 years ago

thestick366 commented 11 years ago

I created a duplicate of the 'Cloze' note with an intent to use it for Chinese (the Cloze field has been renamed Hanzi). I filled out all the required fields (Pinyin, Sound, Simplified, etc.) then toogled the hanzi button, but the field doesn't automatically fill in.

https://dl.dropboxusercontent.com/u/23873169/Misc/ChineseCloze%200_7_5.png

After manually changing the Editor Behavior, it works: https://dl.dropboxusercontent.com/u/23873169/Chinese%20Support/0_7_5/EditorBehavior.png

https://dl.dropboxusercontent.com/u/23873169/Chinese%20Support/0_7_5/PostChangingEditor.png

Note: The Sound and Color fields don't update because I removed the functionality for them in the Editor Behavior file Also note that if I disable the 'Hanzi' button, the automatic fill-ins don't work, as expected. Another note: I haven't tested if the button works with non-Cloze type notes.

ttempe commented 10 years ago

Hello thestick366, I don't know if this is a bug or not... I'm not entirely sure how clozes should be used with this add-on. What field gets handled as a cloze field? Are there interferences with the mark-up? What's the actual use case? Also, edit_behavior is supposed to be modified by the (advanced) user.

Please share your experience.

thestick366 commented 10 years ago

'Chinese Cloze' is for writing practice. I cloze out one of the hanzi in a sentence, and provide the reading underneath the hanzi. Here is it in action: https://dl.dropboxusercontent.com/u/23873169/Chinese%20Support/0_7_6/Chinese%20Cloze.png

And these are the fields: https://dl.dropboxusercontent.com/u/23873169/Chinese%20Support/0_7_6/Chinese%20Support%20Fields.png

(Note: You have to input the hanzi, deselect the field, let the pinyin generate, and THEN add the clozes. If you add the clozes before you deselect the hanzi, the Cloze markers appear in the reading)

The main advantage over just presenting the pinyin is that this method saves time in writing out the entire sentence.

The issue isn't in the clozing itself. The problem is that activating the 'Chinese support' button isn't enough to generate readings. You have to activate the 'Chinese support' button and change the editor behavior to get readings to generate on this new card type. Extremely minor, yes, but I was under the impression that just activating the 'Chinese support' button would automatically generate readings.

ttempe commented 10 years ago

Hello, thanks for commenting, but I can't consider that as a bug. Your use case is specific enough, and the "edit behavior" modification is one feature for making this hack easier. If you have a specific suggestion for improving the add-on, you can send me a separate e-mail.

Yours sincerely,