[jsword-devel] Normalizing Bible names

Chris Burrell chris at burrell.me.uk
Wed Feb 6 12:21:30 MST 2013


Hello

I have an issue with the normalizing which is supposed to fallback to
English as I understand it. Unfortunately, when I give Romans from a
Russian Locale, I'm getting an IllegalArgument exception, because it's
resolving to Tobias, which isn't in the KJV system

Here are my values when entering BookName#match(String normalizedName).

longName "" (id=302)
normalizedLongName "" (id=302)
normalizedShortName "" (id=302)
shortName "" (id=302)
normalizedName "romans" (id=298)


As you can see the issue is with the line:

        if (normalizedShortName.startsWith(normalizedName) ||
normalizedName.startsWith(normalizedShortName)) {
            return true;
        }
which then matches the second part.

The reason for this is that Tobias is a blank field in the BibleNames. As a
result, we fall in and match it.

My suggested fix to this, would be to start by removing all blank Bible
names from the language files. Alternatively, which would be less work, we
could check that the normalized names are not blank!

Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/jsword-devel/attachments/20130206/535a79d7/attachment.html>


More information about the jsword-devel mailing list