[jsword-devel] [sword-devel] Japanese Bibles in Beta and some other stuff

Peter von Kaehne refdoc at gmx.net
Sun Aug 20 14:16:15 MST 2017

On Sun, 2017-08-20 at 13:01 -0400, DM Smith wrote:
> My response on JSword-devel mailing list:
> JSword has no support for ruby markup. I haven’t looked at it for
> years, but from what I remember, it was experimental, using OSIS in a
> non-standard way.

As you have found out by now, acc subsequent posts, the OSIS is
completely standard using a "gloss" attribute. The only experimental
part was the (x)html rendering using the ruby tag which for a long time
remained unsupported in rendering engines and remains apparently
difficult in Bibledesktops' enginge. As such the ruby tag and its
subordinate tags are part of xhtml, but most browsers were slow in
picking up on it. 

This is the code from osisxhtml.cpp doing the transformation:

    if ((attrib = tag.getAttribute("gloss"))) {
                                        // I'm sure this is not the
cleanest way to do it, but it gets the job done
                                        // for rendering ruby chars
properly ^_^
                                        buf -= lastText.length();

                                        outText("<ruby><rb>", buf, u);
                                        outText(lastText, buf, u);
buf, u);
                                        val = strchr(attrib, ':');
                                        val = (val) ? (val + 1) :
                                        outText(val, buf, u);
", buf, u);

Wrt desirability - the background is the odd nature of Japanese (and to
 some extent Korean) writing systems:

Japanese uses two syllabic scripts, Hiragana and Katagana which each in
principle can express the full gammut of the languages, but for
historical etc reasons every so often Chinese ideographs get thrown in
(Kanji script, essentially traditional, not simplified Chinese). These
characters express a complete word and have a Japanese pronounciation -
but you would need to know the pronounciation and meaning by heart as
there is nothing in the character which gives it away. So for the less
educated the Kanji script sign thrown into the stream of syllabics are
insurmountable obstacles. A well educated Japanese will have no
difficulty reading a text, even with many Kanji signs, but some less
might stumble and stall. So for that purpose many educational texts and
certainly Bibles are using glosses in syllabics to overcome that

So, in summary, our Japanese modules are currently absolutely fine and
perfectly well useful for anyone with high school or better education,
but will fail to reach less educated people. I would consider this a
bug and would like to see it resolved. 

I would think the best solution in the interim is to make it toggled in
the engine and if it is impossible to display on a particular engine
keep it switched off and do not expose the functionality to users. If
it renders fine everywhere then we need a new debate. 

As such of course the OSIS and increasingly the related XHTML is
absolutely standard (and not even specific to Japanese) and could also
be used just fine for e.g. interlinear texts or other more complicated
display functionality


More information about the jsword-devel mailing list