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

furigana-plain versions of handlebars #1596

Open
YonKuma opened this issue Nov 22, 2024 · 5 comments
Open

furigana-plain versions of handlebars #1596

YonKuma opened this issue Nov 22, 2024 · 5 comments
Labels
area/anki The issue or PR is related to Anki integration kind/enhancement The issue or PR is a new feature or request

Comments

@YonKuma
Copy link

YonKuma commented Nov 22, 2024

There are a couple Japanese card types right now that use a Sentence Furigana field that consists of the sentence with a bolded target word and Anki-style bracketed furigana (eg 今[いま]). Currently, those cards rely on Anki add-ons to accomplish this, but it would be nice if there were a way to generate this content natively from Yomitan, especially for users on devices that don't support add-ons.

I'm proposing the following handlebars:

  • {sentence-furigana-plain}
  • {cloze-prefix-furigana-plain}
  • {cloze-body-furigana-plain}
  • {cloze-suffix-furigana-plain}

They would function the same as their current cloze handlebars equivalent, but with added Anki-style furigana.

@YonKuma YonKuma added the kind/enhancement The issue or PR is a new feature or request label Nov 22, 2024
@Kuuuube Kuuuube changed the title furigana-plain versions of cloze handlebars furigana-plain versions of handlebars Nov 25, 2024
@Kuuuube Kuuuube added the area/anki The issue or PR is related to Anki integration label Nov 25, 2024
@ElaineGilstrom
Copy link

I got tired of not having this feature, so I started working on a fork to implement it. I'm at a bit of a crossroads with the implementation now though. I have the option to either implement it with my original idea of having a setting to change the encoding, or I can implement it using the handles suggested here.

I haven't looked into how the code base handles settings already, so I have no idea how easy or hard my idea will be to implement, but the idea of just making separate handles seems like it would be easy enough to add. The main reservation I have with using handles over a separate setting is I'd imagine having a (for example) {furigiana-sentence} and {sentence-furigana-plain} tag with nothing to clarify what the first is would be confusing. Adding something like -html onto the ends of the existing ones would harm backwards compatibility, and that is the main reason I am less on board with that approach.

For now I'll just make it so the fork I'm working on defaults to the plain encoding.

@Kuuuube
Copy link
Member

Kuuuube commented Jan 17, 2025

I looked at this a bit back and the whole furigana part of the handlebars should probably be rewritten in js. It's a mess.

@ElaineGilstrom
Copy link

ElaineGilstrom commented Jan 17, 2025 via email

@elemn
Copy link

elemn commented Feb 16, 2025

Also interested in this, sentence-furigana is difficult to edit. I believe I'm using AJT Japanese for the functionality currently.

@ElaineGilstrom
Copy link

ElaineGilstrom commented Feb 16, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/anki The issue or PR is related to Anki integration kind/enhancement The issue or PR is a new feature or request
Projects
None yet
Development

No branches or pull requests

4 participants