[OPEN-ILS-DEV] 1.4 release: switching locales in the OPAC and staff client

Mike Rylander mrylander at gmail.com
Sat Jul 26 09:57:16 EDT 2008


On Tue, Jul 22, 2008 at 5:35 PM, Mike Rylander <mrylander at gmail.com> wrote:
> On Tue, Jul 22, 2008 at 2:40 PM, Dan Scott <denials at gmail.com> wrote:
>> Hi Mike:
>>
>> The database location is good. Is there any reason you chose to go
>> with the "ll_ll" form for language/region in the code field, rather
>> than the "ll-LL" form currently used for translations? The latter form
>> is also used by Dojo, which would be handy for locazing dates, times,
>> and currencies.
>
> The ll_ll form is simply normalized to avoid any case-based confusion.
>  I'll have to look through the code to make sure there are no
> assumptions of _ instead of -, but we can change to '-' notation.  If
> we provide (which we will) an interface for creating supported
> locales, then I suppose I could drop the case folding as well.
>
> I normalize to "lower and  _" in the core i18n stored proc and the
> split on _ to find generalizations, but I can remove the normalization
> if we can accept the constraint (human-imposed) of "don't shoot
> yourself in the foot -- use exact matches for local strings" ... which
> I suppose we can. :)

After supposing for a few days, here are 2 patches which remove the
normalization (there was less than I thought) sprinkled throughout the
code.  No more lowercasing, but we do change '_' to '-' in the core
stored procedure that does the translated value lookup.

With these patches in place (they're not yet), it's required that ALL
locales be assembled in the ll-LL format (that's not strictly true ...
there's just no fudge factor in locale case anymore). Eyeballs
apreciated, since they touch python and java in addition to "my"
areas.

-- 
Mike Rylander
 | VP, Research and Design
 | Equinox Software, Inc. / The Evergreen Experts
 | phone: 1-877-OPEN-ILS (673-6457)
 | email: miker at esilibrary.com
 | web: http://www.esilibrary.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openils.locale.patch
Type: text/x-diff
Size: 5485 bytes
Desc: not available
Url : http://list.georgialibraries.org/pipermail/open-ils-dev/attachments/20080726/58634d78/openils.locale.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: opensrf.locale.patch
Type: text/x-diff
Size: 1460 bytes
Desc: not available
Url : http://list.georgialibraries.org/pipermail/open-ils-dev/attachments/20080726/58634d78/opensrf.locale.bin


More information about the Open-ils-dev mailing list