Skip to content
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

Added ruby character support #148

Draft
wants to merge 1 commit into
base: experimental
Choose a base branch
from

Conversation

ditmarvisser
Copy link

Status Type
❌ 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

  • I have read the CONTRIBUTING document. (This is empty?)
  • I have considered the accessibility of my changes (i.e. did I add proper content descriptions to images, or run my changes with talkback enabled?)
  • I have documented my code if needed
  • Move parsing code to utility script (if this exists)
  • Add ruby support to other area's of the app.

Resolves

resolves #147

@ditmarvisser ditmarvisser marked this pull request as draft July 22, 2023 13:08
@ditmarvisser
Copy link
Author

I have some questions related to the to do list.

  • Contributing document is empty?
  • Are there any accessibility changes I can make?
  • What are all the area's where this can be implemented? I'm thinking on the vocab overview screen, but are there any more?
  • Is there a generaly available utility script where we can put the parsing code? That way the code will not get repeated.

BTW, the link to your discord does not work.

@noctera
Copy link
Member

noctera commented Jul 23, 2023

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:

  • VocabCard (already done by you)
  • We have a library where you can see all your added vocabs, this might need the update too, otherwise you see the brackets in the preview

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

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

Successfully merging this pull request may close these issues.

2 participants