You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Christopher Schultz (JIRA)" <de...@velocity.apache.org> on 2007/01/25 05:48:49 UTC

[jira] Created: (VELTOOLS-75) Add MessageTool.get method that accepts an explicit Locale

Add MessageTool.get method that accepts an explicit Locale
----------------------------------------------------------

                 Key: VELTOOLS-75
                 URL: https://issues.apache.org/jira/browse/VELTOOLS-75
             Project: Velocity Tools
          Issue Type: Improvement
          Components: VelocityStruts
            Reporter: Christopher Schultz
            Priority: Trivial


Perhaps this does not come up very often, but sometimes you want to display a message in a language that is not the current user's current locale.

For instance, we are adding multi-language capability to our product, and I want to be able to display a list of languages for which the text "Switch to [language]" is displayed in the target language, not the user's current language (because if they can't read English, it's going to be hard for them to read "Switch to Your Language".

I propose the addition of a getMessage method that allows you to explicitly indicate the locale to use.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org


[jira] Commented: (VELTOOLS-75) Add MessageTool.get method that accepts an explicit Locale

Posted by "Christopher Schultz (JIRA)" <de...@velocity.apache.org>.
    [ https://issues.apache.org/jira/browse/VELTOOLS-75?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12474896 ] 

Christopher Schultz commented on VELTOOLS-75:
---------------------------------------------

Apologies for the System.out.println still in there. I was trying to figure out why my get method wasn't being called (List version is called instead) and completely forgot after fixing it and verifying that it worked properly.

My diff was against the revision contained in the 1.3 release. I used that revision as the base since I want to use official releases (plus my own patches) in my own software. The revision number that the patch matched should have been present in the diff. Also, the original patch was against the same revision, and a newer revision was not available until after that first patch.

Given that patches will not always be applied immediately, what is the best policy for their base revisions? For instance, if the same patch had been submitted before 2007-02-15, would you have the same objection?


> Add MessageTool.get method that accepts an explicit Locale
> ----------------------------------------------------------
>
>                 Key: VELTOOLS-75
>                 URL: https://issues.apache.org/jira/browse/VELTOOLS-75
>             Project: Velocity Tools
>          Issue Type: Improvement
>          Components: VelocityStruts
>            Reporter: Christopher Schultz
>            Priority: Trivial
>             Fix For: 1.4, 1.x, 2.0
>
>         Attachments: VELTOOLS-75.diff, VELTOOLS-75a.diff
>
>
> Perhaps this does not come up very often, but sometimes you want to display a message in a language that is not the current user's current locale.
> For instance, we are adding multi-language capability to our product, and I want to be able to display a list of languages for which the text "Switch to [language]" is displayed in the target language, not the user's current language (because if they can't read English, it's going to be hard for them to read "Switch to Your Language".
> I propose the addition of a getMessage method that allows you to explicitly indicate the locale to use.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org


[jira] Commented: (VELTOOLS-75) Add MessageTool.get method that accepts an explicit Locale

Posted by "Nathan Bubna (JIRA)" <de...@velocity.apache.org>.
    [ https://issues.apache.org/jira/browse/VELTOOLS-75?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12474899 ] 

Nathan Bubna commented on VELTOOLS-75:
--------------------------------------

My advice would be to always patch against the branch/tag/trunk that you want the fix to go into.  So, if you want the patch to go into the 1.3.x family, that's fine.  Just make some note about it in the comments, so we know.  I can't remember which revision numbers go with which versions. :)  Of course, i (or another committer) may choose to apply the patch (or the spirit of it) to another branch instead, but it helps to know where the patch was meant to go.

My favorite patches are, of course, those that are against the current trunk.  But that's because i'm lazy and that's the easiest thing for me to use. :)

And to be honest, i probably wouldn't have said anything but thanks if it weren't for the Sysout line.  that's what tipped me off that you didn't really look over the patch. ;-)

oh, and of course, it is always very appreciated if the patches conform to the code style of the project.  for us that mostly means braces on their own lines and 4 spaces instead of tab characters. :)

> Add MessageTool.get method that accepts an explicit Locale
> ----------------------------------------------------------
>
>                 Key: VELTOOLS-75
>                 URL: https://issues.apache.org/jira/browse/VELTOOLS-75
>             Project: Velocity Tools
>          Issue Type: Improvement
>          Components: VelocityStruts
>            Reporter: Christopher Schultz
>            Priority: Trivial
>             Fix For: 1.4, 1.x, 2.0
>
>         Attachments: VELTOOLS-75.diff, VELTOOLS-75a.diff
>
>
> Perhaps this does not come up very often, but sometimes you want to display a message in a language that is not the current user's current locale.
> For instance, we are adding multi-language capability to our product, and I want to be able to display a list of languages for which the text "Switch to [language]" is displayed in the target language, not the user's current language (because if they can't read English, it's going to be hard for them to read "Switch to Your Language".
> I propose the addition of a getMessage method that allows you to explicitly indicate the locale to use.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org


[jira] Updated: (VELTOOLS-75) Add MessageTool.get method that accepts an explicit Locale

Posted by "Christopher Schultz (JIRA)" <de...@velocity.apache.org>.
     [ https://issues.apache.org/jira/browse/VELTOOLS-75?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christopher Schultz updated VELTOOLS-75:
----------------------------------------

    Attachment: VELTOOLS-75a.diff

More complete patch which includes a get(..) method that takes a List as well as the one that takes an object array.


> Add MessageTool.get method that accepts an explicit Locale
> ----------------------------------------------------------
>
>                 Key: VELTOOLS-75
>                 URL: https://issues.apache.org/jira/browse/VELTOOLS-75
>             Project: Velocity Tools
>          Issue Type: Improvement
>          Components: VelocityStruts
>            Reporter: Christopher Schultz
>            Priority: Trivial
>             Fix For: 1.x, 2.0
>
>         Attachments: VELTOOLS-75.diff, VELTOOLS-75a.diff
>
>
> Perhaps this does not come up very often, but sometimes you want to display a message in a language that is not the current user's current locale.
> For instance, we are adding multi-language capability to our product, and I want to be able to display a list of languages for which the text "Switch to [language]" is displayed in the target language, not the user's current language (because if they can't read English, it's going to be hard for them to read "Switch to Your Language".
> I propose the addition of a getMessage method that allows you to explicitly indicate the locale to use.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org


[jira] Updated: (VELTOOLS-75) Add MessageTool.get method that accepts an explicit Locale

Posted by "Nathan Bubna (JIRA)" <de...@velocity.apache.org>.
     [ https://issues.apache.org/jira/browse/VELTOOLS-75?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nathan Bubna updated VELTOOLS-75:
---------------------------------

    Fix Version/s: 2.0
                   1.x

> Add MessageTool.get method that accepts an explicit Locale
> ----------------------------------------------------------
>
>                 Key: VELTOOLS-75
>                 URL: https://issues.apache.org/jira/browse/VELTOOLS-75
>             Project: Velocity Tools
>          Issue Type: Improvement
>          Components: VelocityStruts
>            Reporter: Christopher Schultz
>            Priority: Trivial
>             Fix For: 1.x, 2.0
>
>         Attachments: VELTOOLS-75.diff
>
>
> Perhaps this does not come up very often, but sometimes you want to display a message in a language that is not the current user's current locale.
> For instance, we are adding multi-language capability to our product, and I want to be able to display a list of languages for which the text "Switch to [language]" is displayed in the target language, not the user's current language (because if they can't read English, it's going to be hard for them to read "Switch to Your Language".
> I propose the addition of a getMessage method that allows you to explicitly indicate the locale to use.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org


[jira] Closed: (VELTOOLS-75) Add MessageTool.get method that accepts an explicit Locale

Posted by "Christopher Schultz (JIRA)" <de...@velocity.apache.org>.
     [ https://issues.apache.org/jira/browse/VELTOOLS-75?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christopher Schultz closed VELTOOLS-75.
---------------------------------------


Fix verified.

> Add MessageTool.get method that accepts an explicit Locale
> ----------------------------------------------------------
>
>                 Key: VELTOOLS-75
>                 URL: https://issues.apache.org/jira/browse/VELTOOLS-75
>             Project: Velocity Tools
>          Issue Type: Improvement
>          Components: VelocityStruts
>            Reporter: Christopher Schultz
>            Priority: Trivial
>             Fix For: 1.4, 1.x, 2.0
>
>         Attachments: VELTOOLS-75.diff, VELTOOLS-75a.diff
>
>
> Perhaps this does not come up very often, but sometimes you want to display a message in a language that is not the current user's current locale.
> For instance, we are adding multi-language capability to our product, and I want to be able to display a list of languages for which the text "Switch to [language]" is displayed in the target language, not the user's current language (because if they can't read English, it's going to be hard for them to read "Switch to Your Language".
> I propose the addition of a getMessage method that allows you to explicitly indicate the locale to use.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org


[jira] Resolved: (VELTOOLS-75) Add MessageTool.get method that accepts an explicit Locale

Posted by "Nathan Bubna (JIRA)" <de...@velocity.apache.org>.
     [ https://issues.apache.org/jira/browse/VELTOOLS-75?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nathan Bubna resolved VELTOOLS-75.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 1.4

The valid portions of the patch were committed in revision 510272, with the tabs converted to spaces.

Double check your patches, Christopher, that one was not diffed against the latest version of MessageTool and included a System.out.println().  :)

Thanks though!  I really appreciate all your continued help with the Struts tools!

> Add MessageTool.get method that accepts an explicit Locale
> ----------------------------------------------------------
>
>                 Key: VELTOOLS-75
>                 URL: https://issues.apache.org/jira/browse/VELTOOLS-75
>             Project: Velocity Tools
>          Issue Type: Improvement
>          Components: VelocityStruts
>            Reporter: Christopher Schultz
>            Priority: Trivial
>             Fix For: 1.4, 1.x, 2.0
>
>         Attachments: VELTOOLS-75.diff, VELTOOLS-75a.diff
>
>
> Perhaps this does not come up very often, but sometimes you want to display a message in a language that is not the current user's current locale.
> For instance, we are adding multi-language capability to our product, and I want to be able to display a list of languages for which the text "Switch to [language]" is displayed in the target language, not the user's current language (because if they can't read English, it's going to be hard for them to read "Switch to Your Language".
> I propose the addition of a getMessage method that allows you to explicitly indicate the locale to use.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org


[jira] Updated: (VELTOOLS-75) Add MessageTool.get method that accepts an explicit Locale

Posted by "Christopher Schultz (JIRA)" <de...@velocity.apache.org>.
     [ https://issues.apache.org/jira/browse/VELTOOLS-75?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christopher Schultz updated VELTOOLS-75:
----------------------------------------

    Attachment: VELTOOLS-75.diff

Attachment to includes the enhancement.


> Add MessageTool.get method that accepts an explicit Locale
> ----------------------------------------------------------
>
>                 Key: VELTOOLS-75
>                 URL: https://issues.apache.org/jira/browse/VELTOOLS-75
>             Project: Velocity Tools
>          Issue Type: Improvement
>          Components: VelocityStruts
>            Reporter: Christopher Schultz
>            Priority: Trivial
>         Attachments: VELTOOLS-75.diff
>
>
> Perhaps this does not come up very often, but sometimes you want to display a message in a language that is not the current user's current locale.
> For instance, we are adding multi-language capability to our product, and I want to be able to display a list of languages for which the text "Switch to [language]" is displayed in the target language, not the user's current language (because if they can't read English, it's going to be hard for them to read "Switch to Your Language".
> I propose the addition of a getMessage method that allows you to explicitly indicate the locale to use.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org