[WG: I18N & L10N] [Building Sakai] i18n strings merged with java code instead of using ResourceLoader.getFormattedMessage()

Anthony Whyte arwhyte at umich.edu
Thu Dec 2 14:31:38 PST 2010


The grep I did hit all indies.  Looking back over the *.txt I sent you no indies are listed so the specific i18n string concatenation issue described below is a non-indie phenomenon.

For a list of indies in trunk see the indies section http://confluence.sakaiproject.org/display/REL/sakai-2.8.0-b01 and then add hybrid to the list.

Cheers,

Anth


On Dec 2, 2010, at 3:53 PM, DAVID ROLDAN MARTINEZ wrote:

> Anth,
> 
> This is exactly what I did but I've only sent the filtered version. Not all addAlert(sstate, rb.getString("xxxx") should be changed: only the ones that use concatenations. These are the ones I've JIRA'ed and sent to the lists..
> However, my search doesn't include indie projects. However, if any indie project tool leader wants to fix i18n issues, please, sending me an email and we'll do it together. No problem.
> 
> Cheers,
>     David
> ________________________________________
> De: Anthony Whyte [arwhyte at umich.edu]
> Enviado el: jueves, 02 de diciembre de 2010 20:08
> Para: Jim Eng
> CC: DAVID ROLDAN MARTINEZ; i18n at collab.sakaiproject.org; sakai-dev at collab.sakaiproject.org
> Asunto: Re: [Building Sakai] i18n strings merged with java code instead of using ResourceLoader.getFormattedMessage()
> 
> I did quick and dirty search leaving it to David to parse the results.  My main concern was that his search did not encompass the indies.
> 
> Anth
> 
> On Dec 2, 2010, at 2:00 PM, Jim Eng wrote:
> 
>> Is that actually the pattern David is talking about?  I thought it was the use of a string retrieved from a resource bundle (which might be named "rb" or something else) and then either appending that to another string or appending a string to it. This could be done by concatenation (using the '+' operator) or by appending the elements to a StringBuilder.
>> 
>> The fact that one or more strings is retrieved from a resource bundle suggests that the full string is going to be displayed to users.  The fact that concatenation is used on that string guarantees that the string will be incorrect for some locales.
>> 
>> Jim
>> 
>> 
>> On Dec 2, 2010, at 1:42 PM, Anthony Whyte wrote:
>> 
>>> I grep'd all of trunk (including all indies) after an svn update and I've found many more references to addAlert(state, rb.getString('somehardcodedstring') than what you found earlier.  See *.txt attached.  I've made no attempt to examine the allegedly offending lines that have been returned -- I'll leave that to you to review and Jira as appropriate.
>>> 
>>> find . -type f -name '*.java' | xargs grep -i 'addAlert(state, rb.getString(' | cat > /Users/arwhyte/Desktop/sakai-i18n-fix.txt
>>> 
>>> <sakai-i18n-fix.txt>
>>> 
>>> Cheers,
>>> 
>>> Anth
>>> 
>>> 
>>> 
>>> On Dec 2, 2010, at 10:41 AM, DAVID ROLDAN MARTINEZ wrote:
>>> 
>>>> Done: http://jira.sakaiproject.org/browse/SAK-19627
>>>> 
>>>> Do you want me to help? Just let me know.
>>>> 
>>>> David
>>>> 
>>>> -----Mensaje original-----
>>>> De: Zach A. Thomas [mailto:zach at aeroplanesoftware.com]
>>>> Enviado el: jueves, 02 de diciembre de 2010 16:35
>>>> Para: DAVID ROLDAN MARTINEZ
>>>> CC: sakai-dev at collab.sakaiproject.org; i18n at collab.sakaiproject.org
>>>> Asunto: Re: [Building Sakai] i18n strings merged with java code instead of using ResourceLoader.getFormattedMessage()
>>>> 
>>>> Hi, David. I fixed a chunk of the ones in content yesterday as part of SAK-19012.
>>>> 
>>>> Since I have commit on the content module, I can fix the rest of the content ones. Could you create a JIRA for this and assign it to me?
>>>> 
>>>> many thanks,
>>>> Zach
>>>> On Dec 2, 2010, at 3:28 AM, DAVID ROLDAN MARTINEZ wrote:
>>>> 
>>>>> Hi all,
>>>>> 
>>>>>   I've found too much i18n strings merged with java code instead of using ResourceLoader.getFormattedMessage(). As you can see athttp://confluence.sakaiproject.org/display/I18N/Best+Practices+for+In, this is not a good practice and has to be avoided.
>>>>> 
>>>>>   I would be very pleased to help tool leaders/developers to fix it. Here you have the tools that need an i18n review, as soon as possible. During next few days I'll be working on this and fix it in trunk. I would appreciate any volunteer to help me.
>>>> 
>>>> _______________________________________________
>>>> sakai-dev mailing list
>>>> sakai-dev at collab.sakaiproject.org
>>>> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>>>> 
>>>> TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"
>>>> 
>>>> 
>>> 
>>> _______________________________________________
>>> sakai-dev mailing list
>>> sakai-dev at collab.sakaiproject.org
>>> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>>> 
>>> TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"
>> 
>> 
>> 
> 
> 
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3829 bytes
Desc: not available
Url : http://collab.sakaiproject.org/pipermail/i18n/attachments/20101202/fbb8992f/attachment.bin 


More information about the i18n mailing list