[seam-issues] [JBoss JIRA] Commented: (SEAMINTL-4) Named parameters in localized messages

John Ament (JIRA) jira-events at lists.jboss.org
Sat Aug 21 21:24:11 EDT 2010


    [ https://jira.jboss.org/browse/SEAMINTL-4?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12546332#action_12546332 ] 

John Ament commented on SEAMINTL-4:
-----------------------------------

What if you provide a Map<String,Object> where {0:someParam} tries if (inMap.containsKey("someParam")) return inMap.get("someParam"); else method arg after map.. ?

> Named parameters in localized messages
> --------------------------------------
>
>                 Key: SEAMINTL-4
>                 URL: https://jira.jboss.org/browse/SEAMINTL-4
>             Project: Seam i18n
>          Issue Type: Feature Request
>          Components: Messages
>            Reporter: Aslak Knutsen
>            Priority: Minor
>
> When coming back to localized message files after being away for a while, it's always a problem to remember what object/value parameter {2} is suppose to be. At this point you have to find the specific message location in the source code and read through the code to figure out what's actually being passed in.
> It's also hard to send the file over to someone for translation, because they most likely also need an explanation of what {2} is. 
> It would be nice to be able to use named parameters, but with Java(< 7) that is a bit of a pain to code.
> Would it be possible with some middle ground;
> e.g. A name/alias in the message file that is ignored by the parser, but there just for documentation. 
> (Maybe even function as a named parameter when Java 7 comes out?)
> "Welcome {0:firstName} {1:lastName}!"

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the seam-issues mailing list