[bt-devel] BibleTime 1.7 could display multiple lemmas properly, 2.0alpha2 cannot

Tom Cornell tom.cornell at gmail.com
Sat Mar 21 15:31:25 MST 2009


2009/3/21 Tom Cornell <tom.cornell at gmail.com>:
> I've checked this with a module of my own, and also with the Tisch
> module (version 2.5) which has multiple lemmas.
> Running mod2osis on Tisch shows
>
> <w lemma="strong:G976 lemma.Strong:βίβλος lemma.ANLEX:βίβλος"
> morph="robinson:N-NSF">Βίβλος</w>
>
> for example.
>
> In BT 1.7 all the lemma components show up in the mag window, as well
> as the dictionary entry in Strong's being displayed for the
> "strong:..." component.
>
> In BT 2.0alpha2, it looks like only the first component
> ("strong:G976") is processed: it shows up, with dictionary entry, but
> none of the other lemmas show up.

Okay, I now see what is happening, and can propose a fix.

The '|' character is used as a separator both between <w>-tag attributes
and between components of those attributes. So, for example, the timeOutEvent(),
which triggers displaying stuff in the mag (in 2.0, apparently not in
1.7?), will get
the following string as its argument:

  lemma=G746|ἀρχή|ἀρχή|morph=Robinson:N-NSF|

It is now impossible to split this into the relevant pieces just using
QString.split('|').

Two distinct characters are needed, in order to reflect different
depths of embedding
in this structure.

I modified bt_osishtml.cpp to insert ' ' (space) instead of '|'
between components
of the lemma attribute (around line 132),
and modified CInfoDisplay::decodeStrongs() to split on " ", instead of "|".
BtHtmlJsObject::timeOutEvent() still splits on "|", which remains as the divider
between the lemma and morph attributes.

So timeOutEvent is getting

  lemma=G746 ἀρχή ἀρχή|morph=Robinson:N-NSF|

and splitting it into

  lemma=G746 ἀρχή ἀρχή
  morph=Robinson:N-NSF

and then decodeStrongs() is getting

  G746 ἀρχή ἀρχή

and splitting it into the obvious three parts.

With the result that the Mag now looks pretty much like it did in 1.7,
for modules like
Tisch, with multiple lemma entries.

-Tom Cornell



More information about the bt-devel mailing list