[cle-release-team] i18n locales defaults handling

Aaron Zeckoski azeckoski at unicon.net
Mon Mar 25 10:40:23 PDT 2013


Related to the previous discussion on the CLE team call, it looks like
the i18n locales are being loaded in multiple places throughout the
code. This is dangerous because there is post processing that happens
for the locales (especially related to the "locales.more" for
debugging and removing duplicates and trimming spaces from the comma
delimited list.
This is now handled quite well in the place where user prefs are
handled but handled inconsistently in help and siteaction.
-------
Looks like we have 3 places in the code that duplicate some of the
code which pulls the languages (inconsistently I notice):
help/help-component/src/java/org/sakaiproject/component/app/help/HelpManagerImpl.java:936
site-manage/site-manage-tool/tool/src/java/org/sakaiproject/site/tool/SiteAction.java:13473

I fixed the one here but the other ones do not affect the prefs so
therefore they were not found and adjusted:
user/user-tool-prefs/tool/src/java/org/sakaiproject/user/tool/UserPrefsTool.java

Looks like the real solution here is going to be to make an actual
utility method somewhere (probably in the SCS or something like that)
to do special handling of the i18n strings.
----------

So I think we need to put this logic somewhere. I am open to
suggestions though I am leaning towards something like kernel utils or
maybe as part of the SCS. It can still be overridden by anyone who
wants to set the locales value themselves but given the post
processing that happens on the locales list I think we need to
centralize it.

-AZ


-- 
Aaron Zeckoski - Software Architect - http://tinyurl.com/azprofile



More information about the cle-release-team mailing list