chinese-support-redux icon indicating copy to clipboard operation
chinese-support-redux copied to clipboard

Add a tone number Pinyin field

Open PandaScience opened this issue 5 years ago • 4 comments

Is your feature request related to a problem? Please describe. I just started out learning Mandarin last week and immediately found Anki and your really great chinese-support addon. Thanks for maintaining! I also bought the Hanping Pro dictionary app on Android which I think has some really nice sound database. However, as far as I can see you can only combine Anki+Hanping using sth. like

<a href='android-app://com.embermitre.hanping.app.pro#Intent;action=com.hanpingchinese.cmn.intent.action.PLAY;S.p={{text:Pinyin}};S.s={{text:Simplified}};S.t={{text:Traditional}};S.LANG=cmn;S._SOURCE=anki;end'>

in cards, where S.p seems to be the important part for it to work. Unfortunately, it only takes pinyin in numbered form.

Describe the solution you'd like Could you please add to config.json another field, e.g. NumPinyin, that will be filled with the corresponding numbered pinyin instead of the one with converted tone markings? That would also be helpful for cards with {{type:NumPinyin}} when learning with "simple" keyboards.

I would do it myself and provide a pull request, but because of lack of documentation it's somehow hard to go through your code.

Describe alternatives you've considered Writing a JavaScript converter in each card's code.

PandaScience avatar Apr 07 '19 12:04 PandaScience

On the face of it, I think this would be straightforward to add. Give me a few days.

jdlorimer avatar Apr 10 '19 12:04 jdlorimer

Or months.

jdlorimer avatar Dec 16 '19 10:12 jdlorimer

Or years :laughing:

PandaScience avatar May 22 '22 12:05 PandaScience

I just started with anki/chinese again this week and found this old issue. Had some free time today and gave it a shot. Seems to work, at least for my purpose :wink: (PR #206)

PandaScience avatar May 23 '22 19:05 PandaScience