[jsword-devel] BibleInfo.properties and fallback
dmsmith555 at yahoo.com
Sat Sep 30 16:14:03 MST 2006
Thanks for the info. I appreciate it.
Since you don't know how our mechanism works:
We have two different mechanisms that we use for looking up book
names. One is the population of tables, using Java's built-in locale
sensitive ResourceBundles. The other is the actual lookup against
We use the Java ResourceBundle mechanism to do read the tables for
the core mechanism. For any key of a resource in a resource bundle,
the key is first looked up in a language and country ResourceBundle,
if present. If the key is not found there (perhaps because the file
didn't exist), the lookup then is against a ResourceBundle for just
the language. And if the lookup fails then it grabs the default.,
which is English.
We also have a property file of OSIS book names. This is not
internationalized. So in that sense we have "English" defaults.
Using these we populate various lists (described below).
We use the list of full names and short names also as a display
mechanism, where a user can choose to display books by long name or
short name. And they can specify whether they appear in Title Case,
lower case or UPPER CASE. We also allow the user to specify whether
we preserve what they type in or whether we replace it with the full
or short name of the book that we match.
We have lists of full book names, short names, osis name and then
common alternatives (which also contains typical abbreviations). The
lookup is first against osis names as an exact match, then with with
the first space removed. We look at osis names first because most
lookups are programmatic and this shortens the lookup.
We then do case insensitive exact matches against short book names,
then alternate names. We find abbreviated names to be more common
than full names.
Then we look for shortest prefix , first looking at the full book
name and then the short book name. The latter is only needed when the
short book name is not a prefix of the full name.
Finally, we look for the shortest prefix, matching against alternate
So our prioritization is fixed by book order.
On Sep 30, 2006, at 2:09 PM, Troy A. Griffitts wrote:
> Just a note about how we do this in the C++ libs.
> We have 2 sections:
> 1) translation from the Long English name to the Long Locale Name
> 2) a set of prioritized abbreviations, combining English and the
> (1) is obvious.
> (2) takes a little more thought. For example, consider, below, in
> Espanol: JOHN, JUAN, and a few other 'J' Book names. In English,
> as you
> type, 'J' we prefer John above other Books, then 'U' would
> normally, in
> English, take you to Judges (it's bigger than Jude and odds are better
> you meant Judges), but since we have control over precedence, since
> we've decided to prefer John (or Juan) above Judges, we can add: JU=43
> to our list below. You might be able to get away with this by always
> combining English into your Locale, but I would bet that sometimes
> are English entries (e.g., J=43) that will give odd precedence to
> as their names diverge from the English. Though I have no idea how
> JSword works with locales; just thought I'd give a little
> background how
> we do things in C++-land.
> Manfred Bergmann wrote:
>> I would prefer the second way.
>> If there is no property file for the current locale, te default
>> (english) locale will be used anyway.
>> If it is there, the book name key will first be tested against the
>> current locale, if it does not fit, the english or the default locale
>> is used.
>> Best regards,
>> Am 30.09.2006 um 13:02 schrieb DM Smith:
>>> To have English as a fallback, we need to do one of two things:
>>> 1) the BibleInfo_de.properties is augmented with English
>>> 2) we create a mechanism to have English read in separately
>>> and also
>>> The former is the easiest wrt software. The latter is a bit harder,
>>> but represents an easier path for translators. Perhaps there is
>>> another option that I am missing.
>>> In Him,
>>> On Sep 30, 2006, at 5:06 AM, Manfred Bergmann wrote:
>>>> Hi all.
>>>> DM, you added the german translation for BibleInfo.
>>>> With this only german Bible book names are known, AFAIK.
>>>> It would however be very nice to have english (for every other
>>>> language) as fallback, means that for every other translation at
>>>> least english is also known so the user can type either english
>>>> names or his native language book names.
>>>> I have gotten used to english book names and stuff and I would not
>>>> miss it even though the application itself may be in german.
>>>> How can this be accomplished?
>>>> Best regards,
>>>> Telefonate ohne weitere Kosten vom PC zum PC: http://
>>>> jsword-devel mailing list
>>>> jsword-devel at crosswire.org
>>> jsword-devel mailing list
>>> jsword-devel at crosswire.org
>> ___________________________________________________________Der frühe
>> Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail:
>> jsword-devel mailing list
>> jsword-devel at crosswire.org
> jsword-devel mailing list
> jsword-devel at crosswire.org
More information about the jsword-devel