[sword-devel] suggestion for locales /abbrevs

Chris Little chrislit at crosswire.org
Fri May 7 11:37:53 MST 2004


Daniel Glassey wrote:

> On Wed, 2004-05-05 at 19:33, Chris Little wrote:
> 
>>Daniel Glassey wrote:
> 
> 
>>>The locales current map abbreviations to book numbers but this is
>>>potentially buggy as it is an effort to check if the number is the book
>>>that you think it is. What I'm suggesting is to use upper case OSIS id
>>>book names instead of book numbers. VerseKey2 will have a static
>>>function getOSISBookNum so that SWLocale can map these to book numbers
>>>(this will need to be implemented for VerseKey as well).
>>
>>Why upper case OSIS book abbreviations rather than mixed?  XML is case 
>>sensitive, so the book abbreviations are case sensitive, so it's 
>>POSSIBLE that a "GEN" book could be allocated in addition to "Gen". 
>>Yes, I know we would almost certainly never ever ever do this, but... 
>>what if.  It's mostly academic, but is there really any need to case 
>>fold here?
>>
>>
>>>Does this make sense? I know it will be work to change all the locales,
>>>but imho it will be easier than trying to get the number changes right.
>>
>>It's entirely sensible to me, will decrease the potential for human 
>>error in creating new localizations, and it should be really trivial to 
>>update old locales to the new format.
> 
> 
> Right, I've committed this - if you define NONNUMERICLOCALETHING then
> SWLocale will use the new function VerseKey::getOSISBookNum to get the
> book number from the book abbreviation in the locale file rather than
> reading the number from the locale file.
> 
> It would be great if someone could write a script to do the changes for
> existing locales.

If no one else gets to it before me, I'll do this roughly next Wednesday 
(two more days of class in the semester).

--Chris



More information about the sword-devel mailing list