[sword-devel] Croatian locale (hr-utf8.conf)

Nic Carter niccarter at mac.com
Thu May 20 02:24:40 MST 2010

Hi all,

Spent some time this afternoon tracking down a bug that seems to only happen when the user has their device set to Croatian.  I finally ended up writing an email to the list, but then after writing it, had another idea.  Turns out my final idea was correct:  our Croatian locale (hr-utf8.conf) is incomplete (and had some typos).  This meant that one of my users could pretty much only read Revelation, and while it's a good book, they'd like to be able to read other parts of the Bible, too!  ;)

Anyway, I have included my original email, below, but I have also attached the updated locale.  If someone would check it into SVN, that'd be great.  :)

Thanks, ybic
	nic...  :)

Nic Carter
PocketSword Developer - an iPhone Bible Study app
www: http://crosswire.org/pocketsword
iTunes: http://itunes.apple.com/app/Pocketsword/id341046078
Twitter: http://twitter.com/pocketsword

-------------- next part --------------
A non-text attachment was scrubbed...
Name: hr-utf8.conf
Type: application/octet-stream
Size: 5930 bytes
Desc: not available
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20100520/a05d6722/attachment.obj>
-------------- next part --------------

Hi gang,

I'm trying to track down a bug in PocketSword/SWORD which seems to only occur when the user is using the Croatian locale.  So I was wondering if someone could confirm that it works fine on other platforms before I start going insane at not being able to find it.

I have tested with French & Traditional Chinese (plus other UTF-8 language locales) and it all seems to work fine, but when I switch to Croatian (hr-utf8.conf), I can only ever get Revelation to appear.

Digging deeper, I find that when I get to line 848 of versekey.cpp (VerseKey::ParseVerseList(...)), we call getBookAbbrev(book) and that returns -1...  I have double checked and I believe that this should be returning a valid result (does with French), but when I try to navigate to any book other than Revelation (and by 'Revelation' I mean 'Otkrivenje'), it still ends up at Revelation due to always returning -1 here.

So, I'm not too sure how a locale needs to be formatted, but my uneducated glances make me think it is correct?  Yes, I have verified that I am loading the locale (my Book selector is localised into Croatian which is due to hr-utf8.conf), but I'm hoping there's an error in the abbreviations in that locale which is causing this issue I'm encountering?

If you need more info, I can copy and paste more of my code, but first I'm hoping someone can confirm whether this bug is in the locale or SWORD before we pick at more of the PocketSword src (given that the same code works for every other locale I have tried).

Thanks heaps, ybic
	nic...  :)

More information about the sword-devel mailing list