Feature Request: Auto-furigana integration between BunPro and BunPro forums
[Quick note: There may actually already be some kind of feature like this (without BunPro integration, but at least a nice markup tag) available from the forum’s developer / plugin-community. I have no idea about that, but may be worth looking into first.]
I just started reading the Have you written your Japanese Sentence today? thread, and noticed a couple of things:
Observations:
- There is/was a request to allow ‘spoilers’ tags to be used in the forum – which makes sense for such a thread, since you want to be able to try to read other peoples’ sentences without ‘giving it away’ with a translation visible. Currently, it looks like most people just use the ‘Hide Details’ tag, which more or less solves that problem.
- The OP includes instructions for hand-coding furigana as ‘ruby’ text, using HTML ruby tags et al. This manual HTML coding is painful for many people, to say the least. And it’s hard to remember the correct format without looking it up somewhere.
- But including furigana completely out in the open kinda hurts the BunPro-user-experience where we routinely have some furigana shown for unknown kanji, and some hidden for known kanji.
- Unfortunately, there’s no way within the forums currently to hide furigana ruby text such as by using a ‘spoiler’ tag or a ‘hide details’ tag. Even if the ‘spoiler’ tag were enabled, I’m pretty sure it wouldn’t work within the context of HTML ruby tags. And it certainly doesn’t work with ‘hide details’.
So, feature request for the forums (for the BunPro-user-experience as a whole!):
- Augment the forums so that adding furigana to text (generally kanji, but maybe more generally as well?) is a ‘native’ feature of the BP forum. I.e. like ‘Hide Details’ or ‘Spoiler’ or ‘Build Poll’ menu options, there is a specific menu option in the forum post/reply editor, such as ‘Furigana’ or ‘Add Furigana’, or perhaps the less Japanese-specific ‘Add Ruby Text’.
- If text/kanji is currently selected, then the (internal) ruby tags will wrap around that selected text.
- The formatting text, generated by this feature, will resemble other markup tags common in these kinds of forums. For example, like this:
[furigana="かんじ"]漢字[/furigana],
or perhaps more appropriately, call the tag ‘kanji’ or maybe ‘kana’, like:
[kana="かんじ"]漢字[/kana].
- The result of such a tag would be displayed as ruby/furigana that can be clicked to show/hide it, just like in the BunPro website proper! Examples:
On: 漢字
Off: 漢字
(Hopefully can massage the styling so that it’s smaller / doesn’t add so much space between lines) - Even better, integrate this forum feature with BunPro itself, so that the user’s furigana preferences are followed: If the user has furigana turned off, don’t show it. If they have it on, then show it.
- Better still, if the selected text is actually a kanji item in BunPro (such as those that get synced with WaniKani), then automatically populate the furigana/ruby with the correct kana, like so:
[furigana]漢字[/furigana]renders as 漢字 automatically, since 漢字 is a BP kanji (I’m assuming), with the corresponding kana “かんじ” already known by the BP database. - Even better still (!), if the kanji exists in BP, and the user has preferences for that particular kanji (on or off), then such automatically-linked kanji will have their furigana/ruby on or off according to the user’s individual settings!
- Even more better still (!!), extend the single-use [furigana] tag, perhaps with an option such as [furigana auto=“on”] … [/furigana], which will process the entire contents within the tagged text, find any kanji which exist within BP’s system, and automatically add furigana/ruby to each kanji match, again following the user’s individual preferences.
With such integration in the forums, then users writing their daily sentences in the above-mentioned thread could just enclose the whole sentence in a single tag like this (assuming ‘auto=“on”’ by default):
[furigana]今最初の日本語の文章を書きました![/furigana]
And it would render as this for a complete beginner:
今最初の日本語の文章を書きました!
Or like this for someone intermediate:
今最初の日本語の文章を書きました!
(And of course, if the user clicks on one of the kanji without furigana, then it would show the hidden furigana, and also correctly update the user’s preferences for that particular kanji on the main BP site.)