[Portfolio] Message bundle calls in jsps w/ parameters
Noah Botimer
botimer at umich.edu
Mon Apr 15 13:26:54 PDT 2013
Hi, Damien.
Unfortunately, the change from fmt:message to c:out was a somewhat quick/ugly fix to a locale problem (as you've found). With the fixes in r98430/r98431, the locale should be set throughout, making fmt:message work properly, which is the "right" way to manage strings with parameters.
https://jira.sakaiproject.org/browse/SAK-19184?focusedCommentId=138697&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-138697
If you look at SAK-20630 / r98451, you will see that a fair bit of reversion was done to clean up some of the lost formatting bits, but we didn't go back through and pick up everything because there was such a long time between the initial change and the "real" fix -- and the translators had already calibrated on the less flexible strings.
Basically, feel free to patch things back to fmt:message and test them, but they should only go into trunk, so people have time to verify/translate.
Thanks,
-Noah
On Apr 15, 2013, at 4:14 PM, Sobieralski, Damian Michael wrote:
> I’m doing some customization work for our instance of osp and I have a question.
>
> I am trying to use a message bundle value with parameters sent in. The {0} and {1} stuff. This is in a jsp file. I notice that in 2.7 version of osp that the following is used:
>
> <div class="alertMessage">
> <fmt:message key="text_AreYouSureRemove">
> <fmt:param value="${label}"/>
> <fmt:param value="${displayText}"/>
> </fmt:message>
> </div>
>
> But in 2.9 it is:
>
> <div class="alertMessage">
> <c:out value="${msgs.text_AreYouSureRemove}"/>
> </div>
>
> It looks like throughout osp there was a move from using <fmt:message to <c:out. After some detective work I *think*that this might have happened during some i18 work in:
>
> https://jira.sakaiproject.org/browse/SAK-14401
>
> and
>
> https://jira.sakaiproject.org/browse/SAK-19184
>
>
> Does <c:out… support parameters being sent in like <fmt:message had <fmt:param? I need to make some changes in our local code because I need to send in some string parameters. However, since I noticed this <fmt:message to <c:out change I want to make sure that I am calling it correctly. The only way that I know how to do it is with <fmt:message and <fmt:parms. But I am willing to learn if someone has a way to do it with <c:out.
>
> Thank you, in advance, for any guidance that you can send this way.
>
> - Damian
>
>
> _______________________________________________
> portfolio mailing list
> portfolio at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/portfolio
>
> TO UNSUBSCRIBE: send email to portfolio-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/portfolio/attachments/20130415/c3667ff7/attachment.html
More information about the portfolio
mailing list