Gustaf-C / anki-chinese-support-3

Anki add-on providing support for Chinese study
https://ankiweb.net/shared/info/1752008591
GNU General Public License v3.0
26 stars 7 forks source link

Wrong pinyin tone for uppercase syllables #81

Open chengmingjms opened 1 week ago

chengmingjms commented 1 week ago

Describe the bug If pinyin syllables start with an uppercase letter, they will get assigned tone5 in the transcription.

(As a side note, I am also aware of a separate pinyin-related bug, but unable to reproduce it right now: sometimes an n will switch syllables. This has happened a few times already but I can't remember the words anymore - either it was "wan an" becoming "wa nan" or "zuo nan" becoming "zuon an". Will let you know next time I come across it!)

To Reproduce Steps to reproduce the behavior:

  1. Click on "Add" in Anki
  2. Enter pinyin for a new card that has at least one syllable starting with an uppercase character, e.g. Jiǎng Jiè shí (I believe the main field may need to be populated as well for the tone ascription to trigger)
  3. No need to add the card, just check the automatically added tags in the pinyin field's code view - Jiang and Jie will be tone5, shi will be the correct tone2.

Expected behavior Uppercase syllables should be treated the same as lowercase

Specs (please complete the following information):

Gustaf-C commented 1 week ago

The pinyin bug might be related to #56

chengmingjms commented 1 week ago

The pinyin bug might be related to #56

Ah yes, that is probably it!