Tykok/cedict-chinese-transformation

Fix: some of the dictionary entries are malformed, only having first character's pinyin

Closed this issue ยท 1 comments

OS ๐Ÿ”Ž

Mac

Node Version ๐Ÿ“ฆ

v19.9.0

Npm or Yarn Version ๐Ÿ“ฆ

pnpm 8.10.5

Severity / Criticality of the bug(s) ๐Ÿ‘€

High

What happened โ“

I noticed this bug when calling getByTraditional, and reading the pinyin output. When getting the pinyin output, only the first character in a multi-character phrase will have its pinyin returned. This does not appear to be an issue with parsing the response, but with the dictionary itself. Here is an example entry from cedict.json

{
"traditional":"ๅ‚ๆ™š",
"simplified":"ๅ‚ๆ™š",
"pinyin":"bang4",
"english":["in the evening","when night falls","towards evening","at night fall","at dusk"]
}

There are many such entries.

Relevant log output ๐Ÿ“’

No response

Steps to reproduce the bug โžฟ

No response

Contact Details ๐Ÿ“ซ

dan@dngl.cc

Code of Conduct

  • I agree to follow this project's Code of Conduct

Sorry, I didn't really take the time to correct this error. Thanks for this ticket ๐Ÿ™Œ๐Ÿฝ