openbibleinfo / Bible-Passage-Reference-Parser

Coffeescript to identify and understand Bible references like "John 3:16."
223 stars 65 forks source link

versification_system() and translation_info() should lower case the translation #27

Open curiousdannii opened 8 years ago

curiousdannii commented 8 years ago

I've got caught out by not realising that versification_system() and translation_info() require a lower cased translation. I can't think of any downsides to them calling toLowerCase() on what is passed to them.

Also, if a versification system isn't recognised, passing it to versification_system() will keep the old versification system rather than resetting it to 'default'. Perhaps it could have a second option which would specify whether to leave the versification system as it is, or whether to reset it? We could check whether translations are supported when we call versification_system(), but that may result in a lot of duplicated code, whereas adding an option to the function means it would be self contained.