[Building Sakai] change lenguage in evalsystem
Miriam esteve
miesvesakai at gmail.com
Tue Mar 30 23:50:01 PDT 2010
Hi all!
The problem with the change of lenguage doesn't exist, I change to English
US, and I have only English GB, so, there isn't a problem.
Anyway I have fixed some errors related I18n in Evalsys. I just create a
JIRA issue solving this bugs. (EVALSYS-882)
Hope it help!
Thanks all.
Cheers.
2010/3/30 Jean-Francois Leveque <jean-francois.leveque at upmc.fr>
> Hi Miriam,
>
> Did you create an issue in JIRA?
>
> Cheers
> Jean-Francois
>
> Miriam esteve a écrit :
>
>>
>>
>> Hi,
>>
>>
>> Thank you very much for your help Mike.
>>
>>
>> I know about the Spanish properties file because my company is who
>> translated it.
>>
>>
>> My problem is that I need to display a parameterized message to the user.
>> To do that, I’ve modified
>> "evaluation\impl\src\java\org\sakaiproject\evaluation\logic\EvalAuthoringServiceImpl.java"
>>
>> I add to take the exception in correct way in any lenguage.
>>
>>
>> .....
>>
>>
>> public void saveTemplate(EvalTemplate template, String userId) {
>> log.debug("template: " + template.getTitle() + ", userId: " +
>> userId);
>> boolean newTemplate = false;
>>
>> // set the date modified
>> template.setLastModified( new Date() );
>>
>> // check for required fields first
>> if (EvalUtils.isBlank(template.getTitle())) {
>>
>>
>> * ResourceLoader rb = new
>> ResourceLoader(”org.sakaiproject.evaluation.tool.bundle.messages”);*
>>
>> * String message =
>> rb.getFormattedMessage(“general.blank.required.field.user.message”, new
>> Object[]{rb.getString(title)});*
>>
>> * throw new BlankRequiredFieldException(message);*
>>
>> .....
>>
>>
>> and have added the following constructor to BlankRequiredFieldException
>>
>>
>> public BlankRequiredFieldException(String message) {
>>
>> super(message);
>>
>> }
>>
>>
>> But this is what I get:
>>
>> WARN: bundle 'messages' missing key: 'title' from:
>> org.sakaiproject.util.ResourceLoader.loadBundle(ResourceLoader.java:433)
>> (2010-03-29 16:31:55,591
>> http-8081-Processor23_org.sakaiproject.util.ResourceLoader)
>> WARN: bundle 'messages' missing key:
>> 'general.blank.required.field.user.message' from:
>> org.sakaiproject.util.ResourceLoader.loadBundle(ResourceLoader.java:433)
>> (2010-03-29 16:31:55,592
>> http-8081-Processor23_org.sakaiproject.util.ResourceLoader)
>>
>>
>> I also have added title to messages.properties and have checked that
>> general.blank.required.field.user.message exists.
>>
>>
>> BTW, if I change user language preferences from Spanish to English, for
>> example, evaluation tool remains in Spanish instead of changing user
>> messages to English. Do you think this could be an i18n bug? Should I open a
>> JIRA issue with this? We would like to put this tool into production but
>> it’s mandatory for us to have this solved first. Any idea?
>>
>>
>> Thank you very much in advance.
>>
>>
>> 2010/3/29 Mike Ozornin <mike.ozornin at gmail.com <mailto:
>> mike.ozornin at gmail.com>>
>>
>>
>> Hello, Miriam.
>>
>> It looks like that the version of EvalSys you are using doesn't have
>> spain localization:
>> Last tag 1.2.1 doesn't have localization:
>>
>> https://source.sakaiproject.org/contrib/evaluation/tags/1.2.1/tool/src/java/org/sakaiproject/evaluation/tool/bundle/
>>
>> But trunk version is spain-localized
>> (
>> https://source.sakaiproject.org/contrib/evaluation/trunk/tool/src/java/org/sakaiproject/evaluation/tool/bundle/
>> ).
>> You can take properties file from it and put into your sources
>> (rebuild and redeploy).
>>
>> On Mon, Mar 29, 2010 at 9:09 PM, Miriam esteve
>> <miesvesakai at gmail.com <mailto:miesvesakai at gmail.com>> wrote:
>>
>> Hi to all!
>> I have a problem, when I change the lenguage of the user
>> preferences, the tool evalsystem don't changes the lenguage.
>> Someone has the same problem??
>> Thank you very much.
>>
>> --
>> Miriam Esteve Velázquez
>> Analista-Programadora
>> miriam.esteve at setival.com <mailto:miriam.esteve at setival.com>
>> miesvesakai at gmail.com <mailto:miesvesakai at gmail.com>
>> 902 05 06 02
>> www.samoo.es <http://www.samoo.es>
>>
>>
>> --
>>
>> Miriam Esteve Velázquez
>> Analista-Programadora
>> miriam.esteve at setival.com <mailto:miriam.esteve at setival.com>
>> miesvesakai at gmail.com <mailto:miesvesakai at gmail.com>
>> 902 05 06 02
>> www.samoo.es <http://www.samoo.es>
>>
>
--
Miriam Esteve Velázquez
Analista-Programadora
miriam.esteve at setival.com
miesvesakai at gmail.com
902 05 06 02
www.samoo.es
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20100331/9d1a75d5/attachment.html
More information about the sakai-dev
mailing list