Skip to content

Bopomofo (Zhuyin) support #1

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

Open
heinzelotto opened this issue Sep 29, 2023 · 1 comment
Open

Bopomofo (Zhuyin) support #1

heinzelotto opened this issue Sep 29, 2023 · 1 comment

Comments

@heinzelotto
Copy link

Thanks for the great deck! I prefer bopomofo as a transliteration to pinyin, so I programmatically added the corresponding zhuyin to the cards. If you want, I can create a PR that adds that column zhuyin to ccc.tsv.

For card fronts I prefer just the hanzi (mandarin->english) or the translation (english->mandarin), respectively, with all remaining info on the back. So the resulting cards that I currently use are

mandarin->english front:
<span lang="zh-tw" id="ddzw-hanzi">{{Hanzi}}</span>

back:

{{FrontSide}}

<hr id=answer>

<span lang="en"><span id="ddzw-zhuyin">{{Zhuyin}}</span><span id="ddzw-pinyin">{{Pinyin}}</span>{{Audio}}<br><br>{{English}}</span><br><br>
{{#Part of speech}}
<span lang="en">({{Part of speech}})</span>
{{/Part of speech}}
<br><br>
<span lang="en"><small>{{Lesson}}</small></span>

<script>
[...]
</script>

english->mandarin front:

{{English}}
<br><br>
{{#Part of speech}}
<span lang="en">({{Part of speech}})</span>
{{/Part of speech}}

back:

{{FrontSide}}

<hr id=answer>
{{Audio}}
<span lang="zh-tw" id="ddzw-hanzi">{{Hanzi}}</span>
<br>
<span lang="en" id="ddzw-zhuyin">{{Zhuyin}}</span>
<span lang="en" id="ddzw-pinyin">{{Pinyin}}</span>
<br><br>
<span lang="en"><small>{{Lesson}}</small></span>

<script>
[...]
</script>

with some styling to display: none; the pinyin. For now, I could just create the PR for the zhuyin and add it to the existing card template, without the restructuring of the card.

@jiru
Copy link
Owner

jiru commented Nov 1, 2023

Thank you for the kind words! I am glad this deck is useful to others.

Introduction of Zhuyin to the deck is welcomed, however I think it would be better to generate it from the pinyin at build time (or run time) rather than adding it to the source ccc.tsv. As far as I understand, conversion can be fully automated, which means adding it to ccc.tsv would break the principle of single source of truth.

Do you mind elaborating on how you converted the pinyin into zhuyin?

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

2 participants