vocascan / vocascan-frontend

A highly configurable vocabulary trainer
https://vocascan.com
Apache License 2.0
30 stars 8 forks source link

Added ruby character support #148

Open ditmarvisser opened 1 year ago

ditmarvisser commented 1 year ago
Status Type
:x: Hold Feature

Description

In asian scripts like Japanese or Chinese there is a concept of Ruby Characters, annotative characters which accompany complex characters. In Japanese these are known as Furigana, and in Chinese as Bopomofo.

Vocascan could benefit from displaying these characters in the right way. Modern browsers all support Ruby Characters, and if they don't there is a fallback available.

The Ruby Characters need to be entered in the database in a standard format. Use [] to enclose the base characters, and {} to encase the Ruby characters. This is then parsed to create the appropriate HTML tags.

[漢字]{かんじ} will become 漢字かんじ

Screenshots / GIFs (if appropriate):

I have made the functionality already for the Vocab Cards. image

Entering the syntax in the edit vocab screen. image

Checklist

Resolves

resolves #147

ditmarvisser commented 1 year ago

I have some questions related to the to do list.

BTW, the link to your discord does not work.

noctera commented 1 year ago

Hi @ditmarvisser, thanks for your pull request.

For the checkboxes, no worries just tick them, if there is anything missing we will let you know. Seems like don't have a proper contribution guideline, that's why the CONTRIBUTION file is empty. The only this you have to watch out are the translations, but as it seems you haven't changed anything there anyways.

this is the utility file, where you can outsource the function to make it available everywhere in the project

The following areas might need that implementation:

sorry for the broken Discord link, in the documentation they fall back to discord.vocascan.com, but as we made a provider change for the domain earlier, who doesn't support the routing to other domains, this is not working anymore. The links haven't been updated yet. Here is a new one: https://discord.gg/xUfwZnh6BW