johnfactotum / quick-lookup

Simple GTK dictionary application powered by Wiktionary
GNU General Public License v3.0
94 stars 8 forks source link

Display furigana to words in kanji #13

Closed Kohoshi12 closed 3 years ago

Kohoshi12 commented 3 years ago

The wikitionary source commonly show the furigana of the kanji, but the program does not show it.

johnfactotum commented 3 years ago

This is a limitation of the current Wiktionary API.

For example, if you go to https://en.wiktionary.org/api/rest_v1/page/definition/%E8%84%82%E9%B0%AD, you'd see that the response contains no furigana or romaji even though they are present in the Wiktionary page: https://en.wiktionary.org/wiki/%E8%84%82%E9%B0%AD.

It would certainly be possible to add them if we parse Wiktionary pages ourselves, but I've decided long ago that it seems much simpler and more reliable to use the official API. Plus if bugs like these are fixed for the API, it would benefit everyone, not just users of this application.

johnfactotum commented 3 years ago

Also note that, for some reason, the Wiktionary API is currently bugged for queries of single kanji characters, meaning that the API is not currently very usable for the CJK languages. That didn't used to happen when I used to manually parse Wiktionary pages, so it's another thing that I noticed when I began using the REST API. Also, the API does not support pronunciations (in IPA), which is another bummer...