Anki add-on: Chinese Pinyin Translator Zhuyin Bopomofo Gwoyeu Romatzyh

Intro: This is a plugin I made to translate premade (shared) Chinese decks with Pinyin fields into different reading formats. I made this because I prefer Gwoyeu Romatzyh, the problem is that there is hardly any material for learning with GR. This add-on supports translating to and from Pinyin, Zhuyin (Bopomofo), IPA, and GR (Gwoyeu Romatzyh). (It will auto-detect the language) This plugin is still in its developmental stage, however, it worked for me, so I want others to be able to use it too. If it fails and you really want to use it, please send me an email and I will update the plugin(addon) to work for your deck. mjaspers [a@t] mtu {d0t.}edu Use: 1. Install the plugin 2. Go to deck browser>Filter>Decks>choose deck 3. Copy the text in the search bar e.g:"deck:Chinese:: 3000 Hanzi to learn first" 4. Remove "deck: and " so, Chinese:: 3000 Hanzi to learn first 6. Fields...>Add. Make a new field to store the translation for example, name it "Zhuyin" 7. Take note of the field name with the text you want to translate e.g:Pinyin 8. Go to the main Anki window and then Tools>Add-ons>this plugin>Config 9. Change line 1 to the text in step 4 e.g:Chinese:: 3000 Hanzi to learn first 10. Change line 2 to step 7 e.g:(do not change in this case, it is default Pinyin) 11. Change line 3 to step 6 (Zhuyin) 12. Choose the translation language on line 4 eg:zhuyin (not case sensitive) 13. Click OK to save 14. Go to deck browser 15. Notes>Translate Pinyin 16. If error, change config 17. If message "done", then success! Advanced: You can make an extra field with pinyin, but with numbers instead of accent by changing line 5 to false. If the source field has HTML (eg: <span class="tone4">shì</span>), you can keep this or remove it by editing line 6 to true or false. Set to false will replace the string found between > and <, but leave the rest of the HTML. If set to false, you may need to change line 7 to 1 or 2 if you get a translation failed error (otherwise leave 0). Credits: Thank you tsroten for the python library dragonmapper and zhon to translate pinyin to other formats. I have edited the source of Dragon Mapper to also work with Gwoyeu Romatzyh, as this is was not yet supported. And thank you Yuen Ren Chao and Lin Yutang, for creating Gwoyeu Romatzyh, I have been using it for a while now and it is very nice for learning and remembering Chinese pronunciation. I hope this add-on makes GR more accessible for learners. Note: I have tested it on Linux and Windows for Anki 2.1 Again, I know this software is full of bugs, and it may not work for your deck configuration. I also understand that the instructions may not be super clear, you can check the source code by going to the add-on folder and viewing init.py with a text editor, as there are some comments that may help. If the add-on does not work, send me a mail and I will fix it for you.