[jsword-devel] Updated Indonesian Locale for JSword and BibleDesktop

Tonny Kohar tonny.kohar at gmail.com
Fri Aug 29 03:19:14 MST 2008


Hi,

On Fri, Aug 29, 2008 at 4:09 PM, Tonny Kohar <tonny.kohar at gmail.com> wrote:
> HI,
>
> On Fri, Aug 29, 2008 at 3:24 PM, Tonny Kohar <tonny.kohar at gmail.com> wrote:
>> Hi,
>>
>> On Fri, Aug 29, 2008 at 10:42 AM, Tonny Kohar <tonny.kohar at gmail.com> wrote:
>>> Hi,
>>>
>>>> The problem with the '-' is a design flaw in both SWORD and JSword. It
>>>> needs to be fixed. It is not all that easy given how the code is
>>>> written. But it is becoming more important.
>>>>
>>>> There is another problem regarding non-English Bible book names. JSword
>>>> does not handle them well on input for a lookup. This too needs to be fixed.
>>>>
>>>> I'll see what I can do about these, but anyone that can take a look at
>>>> it and figure it out would be greatly appreciated.
>>>>
>>>
>>> I will try to look at it and maybe could come out with something, is
>>> there specific package (org.crosswire.xxx) or class implementation
>>> that I need to pay attention to ?
>>
>> I am still looking through org.crosswire.jsword.versification.* and
>> org.crosswire.jsword.passage.*, it seem ok, it deal with number for
>> book, chapter,verse), so it should not be a problem for locale, but I
>> haven't dig deep enough.
>>
>
> I found it, it is in the org.crosswire.jsword.passage.VerseRangeFactory
> public static VerseRange fromString(String original, VerseRange basis)
>
> It is because the delimeter is hardcoded using
> VerseRange.RANGE_ALLOWED_DELIMS which is "-" currently.
> So somehow jsword need to have public API that allow to change the
> final static RANGE_ALLOWED_DELIMS using user preferences/locale
> specific. In there I also found RANGE_PREF_DELIM which seem it is not
> used, maybe this can be used for this purpose.
>

After some thought, it could be implemented at least in 2 ways:
- use locale specific verse range delimeter defined in versification
along with BibleNames or other place.
  For indonesian locale is simple, it is based on latin char a-z 0-9,
so dash "-" would be fine, I do not know about other locale like
persian, chinese, vietnam, etc, How they defined a range delimeter ?
- allow the user to change the verse range delimiter in the
preferences/option dialog.

Cheers
Tonny Kohar


>> Another note:
>> - Is it possible to give the following consistent API especially for the null.
>> org.crosswire.jsword.passage.KeyUtil
>> *public static Verse getVerse(Key key)
>>  this part will return funny things (undefined) if the key is null
>> *public static Passage getPassage(Key key)
>>  this part will return null, if the key is null
>> so it is possible for the above to methods to have consistent api ? I
>> think adding null key check for getVerse similar to getPassage in the
>> first line.
>>
>


-- 
Alkitab Bible Study
imagine, design, create ...
http://www.kiyut.com



More information about the jsword-devel mailing list