[jira] [Commented] (WW-4636) File upload error message always in default language

2016-11-22 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/WW-4636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15687941#comment-15687941
 ] 

ASF GitHub Bot commented on WW-4636:


Github user victorsosa commented on the issue:

https://github.com/apache/struts/pull/97
  
done


> File upload error message always in default language
> 
>
> Key: WW-4636
> URL: https://issues.apache.org/jira/browse/WW-4636
> Project: Struts 2
>  Issue Type: Bug
>Affects Versions: 2.3.28
>Reporter: Pierre-Yves Soblet
>Assignee: Aleksandr Mashchenko
> Fix For: 2.5.6
>
> Attachments: Struts2i18nTest.zip
>
>
> Struts 2 allows to redefine error messages when an upload fails (as 
> documented in https://cwiki.apache.org/confluence/display/WW/File+Upload).
> For instance, if I upload a file with a size greater than allowed by the 
> configuration using fileUpload interceptor and commons-fileupload dependency, 
> the following key of my resource bundle is used :
> {code}
> struts.messages.upload.error.SizeLimitExceededException=File size exceeded 
> (in i18n.properties).
> {code}
> However, when the current language is not the default one, the translated key 
> (in i18n_fr.properties for instance) is not taken into account (the default 
> language is used instead).
> The issue seems similar to WW-3177 (that was fixed in 2.3.7).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4636) File upload error message always in default language

2016-11-22 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/WW-4636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15687942#comment-15687942
 ] 

ASF GitHub Bot commented on WW-4636:


Github user victorsosa closed the pull request at:

https://github.com/apache/struts/pull/97


> File upload error message always in default language
> 
>
> Key: WW-4636
> URL: https://issues.apache.org/jira/browse/WW-4636
> Project: Struts 2
>  Issue Type: Bug
>Affects Versions: 2.3.28
>Reporter: Pierre-Yves Soblet
>Assignee: Aleksandr Mashchenko
> Fix For: 2.5.6
>
> Attachments: Struts2i18nTest.zip
>
>
> Struts 2 allows to redefine error messages when an upload fails (as 
> documented in https://cwiki.apache.org/confluence/display/WW/File+Upload).
> For instance, if I upload a file with a size greater than allowed by the 
> configuration using fileUpload interceptor and commons-fileupload dependency, 
> the following key of my resource bundle is used :
> {code}
> struts.messages.upload.error.SizeLimitExceededException=File size exceeded 
> (in i18n.properties).
> {code}
> However, when the current language is not the default one, the translated key 
> (in i18n_fr.properties for instance) is not taken into account (the default 
> language is used instead).
> The issue seems similar to WW-3177 (that was fixed in 2.3.7).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4636) File upload error message always in default language

2016-11-22 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/WW-4636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15687910#comment-15687910
 ] 

ASF GitHub Bot commented on WW-4636:


Github user aleksandr-m commented on the issue:

https://github.com/apache/struts/pull/97
  
@victorsosa, @lukaszlenart Please close this one. WW-4636 is fixed in 
https://github.com/apache/struts/pull/113.


> File upload error message always in default language
> 
>
> Key: WW-4636
> URL: https://issues.apache.org/jira/browse/WW-4636
> Project: Struts 2
>  Issue Type: Bug
>Affects Versions: 2.3.28
>Reporter: Pierre-Yves Soblet
>Assignee: Aleksandr Mashchenko
> Fix For: 2.5.6
>
> Attachments: Struts2i18nTest.zip
>
>
> Struts 2 allows to redefine error messages when an upload fails (as 
> documented in https://cwiki.apache.org/confluence/display/WW/File+Upload).
> For instance, if I upload a file with a size greater than allowed by the 
> configuration using fileUpload interceptor and commons-fileupload dependency, 
> the following key of my resource bundle is used :
> {code}
> struts.messages.upload.error.SizeLimitExceededException=File size exceeded 
> (in i18n.properties).
> {code}
> However, when the current language is not the default one, the translated key 
> (in i18n_fr.properties for instance) is not taken into account (the default 
> language is used instead).
> The issue seems similar to WW-3177 (that was fixed in 2.3.7).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4636) File upload error message always in default language

2016-11-07 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/WW-4636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15645266#comment-15645266
 ] 

Hudson commented on WW-4636:


SUCCESS: Integrated in Jenkins build Struts-JDK7-master #546 (See 
[https://builds.apache.org/job/Struts-JDK7-master/546/])
WW-4636 - File upload error message always in default language (amashchenko: 
rev 835cc7cd096ba274ffd71e54115dbefc63cadffd)
* (edit) 
core/src/main/java/org/apache/struts2/dispatcher/multipart/JakartaStreamMultiPartRequest.java
* (edit) 
core/src/main/java/org/apache/struts2/dispatcher/multipart/MultiPartRequest.java
* (edit) 
core/src/main/java/org/apache/struts2/dispatcher/multipart/MultiPartRequestWrapper.java
* (edit) 
plugins/pell-multipart/src/main/java/org/apache/struts2/dispatcher/multipart/PellMultiPartRequest.java
* (edit) 
core/src/main/java/org/apache/struts2/interceptor/FileUploadInterceptor.java
* (edit) 
core/src/test/java/org/apache/struts2/interceptor/FileUploadInterceptorTest.java
* (edit) 
core/src/main/java/org/apache/struts2/dispatcher/multipart/JakartaMultiPartRequest.java
* (add) core/src/main/java/org/apache/struts2/dispatcher/LocalizedMessage.java
WW-4636 - File upload error message always in default language (lukaszlenart: 
rev 33ac7ac49aabfcf792d38fa44d271a93433ffe56)
* (edit) 
core/src/main/java/org/apache/struts2/dispatcher/multipart/JakartaStreamMultiPartRequest.java
* (edit) 
plugins/pell-multipart/src/main/java/org/apache/struts2/dispatcher/multipart/PellMultiPartRequest.java
* (edit) 
core/src/main/java/org/apache/struts2/dispatcher/multipart/MultiPartRequest.java
* (edit) 
core/src/test/java/org/apache/struts2/interceptor/FileUploadInterceptorTest.java
* (add) core/src/main/java/org/apache/struts2/dispatcher/LocalizedMessage.java
* (edit) 
core/src/main/java/org/apache/struts2/dispatcher/multipart/JakartaMultiPartRequest.java
* (edit) 
core/src/main/java/org/apache/struts2/interceptor/FileUploadInterceptor.java
* (edit) 
core/src/main/java/org/apache/struts2/dispatcher/multipart/MultiPartRequestWrapper.java


> File upload error message always in default language
> 
>
> Key: WW-4636
> URL: https://issues.apache.org/jira/browse/WW-4636
> Project: Struts 2
>  Issue Type: Bug
>Affects Versions: 2.3.28
>Reporter: Pierre-Yves Soblet
>Assignee: Aleksandr Mashchenko
> Fix For: 2.5.6
>
> Attachments: Struts2i18nTest.zip
>
>
> Struts 2 allows to redefine error messages when an upload fails (as 
> documented in https://cwiki.apache.org/confluence/display/WW/File+Upload).
> For instance, if I upload a file with a size greater than allowed by the 
> configuration using fileUpload interceptor and commons-fileupload dependency, 
> the following key of my resource bundle is used :
> {code}
> struts.messages.upload.error.SizeLimitExceededException=File size exceeded 
> (in i18n.properties).
> {code}
> However, when the current language is not the default one, the translated key 
> (in i18n_fr.properties for instance) is not taken into account (the default 
> language is used instead).
> The issue seems similar to WW-3177 (that was fixed in 2.3.7).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4636) File upload error message always in default language

2016-11-07 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/WW-4636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15645122#comment-15645122
 ] 

ASF subversion and git services commented on WW-4636:
-

Commit 70400f4a037784719d4b7da341df7efb6353dcf2 in struts's branch 
refs/heads/master from [~lukaszlenart]
[ https://git-wip-us.apache.org/repos/asf?p=struts.git;h=70400f4 ]

WW-4636 Fixes problem with File upload error message are always in default 
language


> File upload error message always in default language
> 
>
> Key: WW-4636
> URL: https://issues.apache.org/jira/browse/WW-4636
> Project: Struts 2
>  Issue Type: Bug
>Affects Versions: 2.3.28
>Reporter: Pierre-Yves Soblet
>Assignee: Aleksandr Mashchenko
> Fix For: 2.5.6
>
> Attachments: Struts2i18nTest.zip
>
>
> Struts 2 allows to redefine error messages when an upload fails (as 
> documented in https://cwiki.apache.org/confluence/display/WW/File+Upload).
> For instance, if I upload a file with a size greater than allowed by the 
> configuration using fileUpload interceptor and commons-fileupload dependency, 
> the following key of my resource bundle is used :
> {code}
> struts.messages.upload.error.SizeLimitExceededException=File size exceeded 
> (in i18n.properties).
> {code}
> However, when the current language is not the default one, the translated key 
> (in i18n_fr.properties for instance) is not taken into account (the default 
> language is used instead).
> The issue seems similar to WW-3177 (that was fixed in 2.3.7).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4636) File upload error message always in default language

2016-11-07 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/WW-4636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15645120#comment-15645120
 ] 

ASF subversion and git services commented on WW-4636:
-

Commit 835cc7cd096ba274ffd71e54115dbefc63cadffd in struts's branch 
refs/heads/master from [~aleksandr-m]
[ https://git-wip-us.apache.org/repos/asf?p=struts.git;h=835cc7c ]

WW-4636 - File upload error message always in default language


> File upload error message always in default language
> 
>
> Key: WW-4636
> URL: https://issues.apache.org/jira/browse/WW-4636
> Project: Struts 2
>  Issue Type: Bug
>Affects Versions: 2.3.28
>Reporter: Pierre-Yves Soblet
>Assignee: Aleksandr Mashchenko
> Fix For: 2.5.6
>
> Attachments: Struts2i18nTest.zip
>
>
> Struts 2 allows to redefine error messages when an upload fails (as 
> documented in https://cwiki.apache.org/confluence/display/WW/File+Upload).
> For instance, if I upload a file with a size greater than allowed by the 
> configuration using fileUpload interceptor and commons-fileupload dependency, 
> the following key of my resource bundle is used :
> {code}
> struts.messages.upload.error.SizeLimitExceededException=File size exceeded 
> (in i18n.properties).
> {code}
> However, when the current language is not the default one, the translated key 
> (in i18n_fr.properties for instance) is not taken into account (the default 
> language is used instead).
> The issue seems similar to WW-3177 (that was fixed in 2.3.7).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4636) File upload error message always in default language

2016-11-07 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/WW-4636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15645124#comment-15645124
 ] 

ASF GitHub Bot commented on WW-4636:


Github user asfgit closed the pull request at:

https://github.com/apache/struts/pull/113


> File upload error message always in default language
> 
>
> Key: WW-4636
> URL: https://issues.apache.org/jira/browse/WW-4636
> Project: Struts 2
>  Issue Type: Bug
>Affects Versions: 2.3.28
>Reporter: Pierre-Yves Soblet
>Assignee: Aleksandr Mashchenko
> Fix For: 2.5.6
>
> Attachments: Struts2i18nTest.zip
>
>
> Struts 2 allows to redefine error messages when an upload fails (as 
> documented in https://cwiki.apache.org/confluence/display/WW/File+Upload).
> For instance, if I upload a file with a size greater than allowed by the 
> configuration using fileUpload interceptor and commons-fileupload dependency, 
> the following key of my resource bundle is used :
> {code}
> struts.messages.upload.error.SizeLimitExceededException=File size exceeded 
> (in i18n.properties).
> {code}
> However, when the current language is not the default one, the translated key 
> (in i18n_fr.properties for instance) is not taken into account (the default 
> language is used instead).
> The issue seems similar to WW-3177 (that was fixed in 2.3.7).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4636) File upload error message always in default language

2016-11-07 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/WW-4636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15645111#comment-15645111
 ] 

ASF subversion and git services commented on WW-4636:
-

Commit 33ac7ac49aabfcf792d38fa44d271a93433ffe56 in struts's branch 
refs/heads/master from [~aleksandr-m]
[ https://git-wip-us.apache.org/repos/asf?p=struts.git;h=33ac7ac ]

WW-4636 - File upload error message always in default language


> File upload error message always in default language
> 
>
> Key: WW-4636
> URL: https://issues.apache.org/jira/browse/WW-4636
> Project: Struts 2
>  Issue Type: Bug
>Affects Versions: 2.3.28
>Reporter: Pierre-Yves Soblet
>Assignee: Aleksandr Mashchenko
> Fix For: 2.5.6
>
> Attachments: Struts2i18nTest.zip
>
>
> Struts 2 allows to redefine error messages when an upload fails (as 
> documented in https://cwiki.apache.org/confluence/display/WW/File+Upload).
> For instance, if I upload a file with a size greater than allowed by the 
> configuration using fileUpload interceptor and commons-fileupload dependency, 
> the following key of my resource bundle is used :
> {code}
> struts.messages.upload.error.SizeLimitExceededException=File size exceeded 
> (in i18n.properties).
> {code}
> However, when the current language is not the default one, the translated key 
> (in i18n_fr.properties for instance) is not taken into account (the default 
> language is used instead).
> The issue seems similar to WW-3177 (that was fixed in 2.3.7).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4636) File upload error message always in default language

2016-10-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/WW-4636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15581754#comment-15581754
 ] 

ASF GitHub Bot commented on WW-4636:


Github user aleksandr-m commented on the issue:

https://github.com/apache/struts/pull/113
  
Yep, we can close #97.


> File upload error message always in default language
> 
>
> Key: WW-4636
> URL: https://issues.apache.org/jira/browse/WW-4636
> Project: Struts 2
>  Issue Type: Bug
>Affects Versions: 2.3.28
>Reporter: Pierre-Yves Soblet
>Assignee: Aleksandr Mashchenko
> Fix For: 2.3.x, 2.5.x
>
> Attachments: Struts2i18nTest.zip
>
>
> Struts 2 allows to redefine error messages when an upload fails (as 
> documented in https://cwiki.apache.org/confluence/display/WW/File+Upload).
> For instance, if I upload a file with a size greater than allowed by the 
> configuration using fileUpload interceptor and commons-fileupload dependency, 
> the following key of my resource bundle is used :
> {code}
> struts.messages.upload.error.SizeLimitExceededException=File size exceeded 
> (in i18n.properties).
> {code}
> However, when the current language is not the default one, the translated key 
> (in i18n_fr.properties for instance) is not taken into account (the default 
> language is used instead).
> The issue seems similar to WW-3177 (that was fixed in 2.3.7).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4636) File upload error message always in default language

2016-10-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/WW-4636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15581581#comment-15581581
 ] 

ASF GitHub Bot commented on WW-4636:


Github user cnenning commented on the issue:

https://github.com/apache/struts/pull/113
  
:+1: 

That means #97 can be closed?


> File upload error message always in default language
> 
>
> Key: WW-4636
> URL: https://issues.apache.org/jira/browse/WW-4636
> Project: Struts 2
>  Issue Type: Bug
>Affects Versions: 2.3.28
>Reporter: Pierre-Yves Soblet
>Assignee: Aleksandr Mashchenko
> Fix For: 2.3.x, 2.5.x
>
> Attachments: Struts2i18nTest.zip
>
>
> Struts 2 allows to redefine error messages when an upload fails (as 
> documented in https://cwiki.apache.org/confluence/display/WW/File+Upload).
> For instance, if I upload a file with a size greater than allowed by the 
> configuration using fileUpload interceptor and commons-fileupload dependency, 
> the following key of my resource bundle is used :
> {code}
> struts.messages.upload.error.SizeLimitExceededException=File size exceeded 
> (in i18n.properties).
> {code}
> However, when the current language is not the default one, the translated key 
> (in i18n_fr.properties for instance) is not taken into account (the default 
> language is used instead).
> The issue seems similar to WW-3177 (that was fixed in 2.3.7).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4636) File upload error message always in default language

2016-10-16 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/WW-4636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15579881#comment-15579881
 ] 

ASF GitHub Bot commented on WW-4636:


Github user lukaszlenart commented on the issue:

https://github.com/apache/struts/pull/113
  
Looks good to me, if no objections I'm going to merge it. Thanks, great 
work!


> File upload error message always in default language
> 
>
> Key: WW-4636
> URL: https://issues.apache.org/jira/browse/WW-4636
> Project: Struts 2
>  Issue Type: Bug
>Affects Versions: 2.3.28
>Reporter: Pierre-Yves Soblet
>Assignee: Aleksandr Mashchenko
> Fix For: 2.3.x, 2.5.x
>
> Attachments: Struts2i18nTest.zip
>
>
> Struts 2 allows to redefine error messages when an upload fails (as 
> documented in https://cwiki.apache.org/confluence/display/WW/File+Upload).
> For instance, if I upload a file with a size greater than allowed by the 
> configuration using fileUpload interceptor and commons-fileupload dependency, 
> the following key of my resource bundle is used :
> {code}
> struts.messages.upload.error.SizeLimitExceededException=File size exceeded 
> (in i18n.properties).
> {code}
> However, when the current language is not the default one, the translated key 
> (in i18n_fr.properties for instance) is not taken into account (the default 
> language is used instead).
> The issue seems similar to WW-3177 (that was fixed in 2.3.7).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4636) File upload error message always in default language

2016-10-15 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/WW-4636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15578016#comment-15578016
 ] 

ASF GitHub Bot commented on WW-4636:


GitHub user aleksandr-m opened a pull request:

https://github.com/apache/struts/pull/113

WW-4636 - File upload error message always in default language

Please review.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/aleksandr-m/struts feature/WW-4636

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/struts/pull/113.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #113


commit 835cc7cd096ba274ffd71e54115dbefc63cadffd
Author: Aleksandr Mashchenko 
Date:   2016-10-15T12:25:14Z

WW-4636 - File upload error message always in default language




> File upload error message always in default language
> 
>
> Key: WW-4636
> URL: https://issues.apache.org/jira/browse/WW-4636
> Project: Struts 2
>  Issue Type: Bug
>Affects Versions: 2.3.28
>Reporter: Pierre-Yves Soblet
>Assignee: Aleksandr Mashchenko
> Fix For: 2.3.x, 2.5.x
>
> Attachments: Struts2i18nTest.zip
>
>
> Struts 2 allows to redefine error messages when an upload fails (as 
> documented in https://cwiki.apache.org/confluence/display/WW/File+Upload).
> For instance, if I upload a file with a size greater than allowed by the 
> configuration using fileUpload interceptor and commons-fileupload dependency, 
> the following key of my resource bundle is used :
> {code}
> struts.messages.upload.error.SizeLimitExceededException=File size exceeded 
> (in i18n.properties).
> {code}
> However, when the current language is not the default one, the translated key 
> (in i18n_fr.properties for instance) is not taken into account (the default 
> language is used instead).
> The issue seems similar to WW-3177 (that was fixed in 2.3.7).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4636) File upload error message always in default language

2016-05-25 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/WW-4636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15300423#comment-15300423
 ] 

ASF GitHub Bot commented on WW-4636:


Github user victorsosa commented on the pull request:

https://github.com/apache/struts/pull/97#issuecomment-221640016
  
@aleksandr-m  It is set to English in here: 
https://github.com/apache/struts/blob/master/core/src/main/java/org/apache/struts2/dispatcher/multipart/JakartaMultiPartRequest.java#L62

get locale from the action context instead of request?... I will check that


> File upload error message always in default language
> 
>
> Key: WW-4636
> URL: https://issues.apache.org/jira/browse/WW-4636
> Project: Struts 2
>  Issue Type: Bug
>Affects Versions: 2.3.28
>Reporter: Pierre-Yves Soblet
> Fix For: 2.3.29
>
> Attachments: Struts2i18nTest.zip
>
>
> Struts 2 allows to redefine error messages when an upload fails (as 
> documented in https://cwiki.apache.org/confluence/display/WW/File+Upload).
> For instance, if I upload a file with a size greater than allowed by the 
> configuration using fileUpload interceptor and commons-fileupload dependency, 
> the following key of my resource bundle is used :
> {code}
> struts.messages.upload.error.SizeLimitExceededException=File size exceeded 
> (in i18n.properties).
> {code}
> However, when the current language is not the default one, the translated key 
> (in i18n_fr.properties for instance) is not taken into account (the default 
> language is used instead).
> The issue seems similar to WW-3177 (that was fixed in 2.3.7).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4636) File upload error message always in default language

2016-05-25 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/WW-4636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15300324#comment-15300324
 ] 

ASF GitHub Bot commented on WW-4636:


Github user aleksandr-m commented on the pull request:

https://github.com/apache/struts/pull/97#issuecomment-221628543
  
First of all, there is [some 
chance](https://github.com/apache/struts/blob/master/core/src/main/java/org/apache/struts2/dispatcher/multipart/JakartaMultiPartRequest.java#L71)
 that `defaultLocale` isn't set to English.

Can we get locale from the action context instead of request?


> File upload error message always in default language
> 
>
> Key: WW-4636
> URL: https://issues.apache.org/jira/browse/WW-4636
> Project: Struts 2
>  Issue Type: Bug
>Affects Versions: 2.3.28
>Reporter: Pierre-Yves Soblet
> Fix For: 2.3.29
>
> Attachments: Struts2i18nTest.zip
>
>
> Struts 2 allows to redefine error messages when an upload fails (as 
> documented in https://cwiki.apache.org/confluence/display/WW/File+Upload).
> For instance, if I upload a file with a size greater than allowed by the 
> configuration using fileUpload interceptor and commons-fileupload dependency, 
> the following key of my resource bundle is used :
> {code}
> struts.messages.upload.error.SizeLimitExceededException=File size exceeded 
> (in i18n.properties).
> {code}
> However, when the current language is not the default one, the translated key 
> (in i18n_fr.properties for instance) is not taken into account (the default 
> language is used instead).
> The issue seems similar to WW-3177 (that was fixed in 2.3.7).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WW-4636) File upload error message always in default language

2016-05-25 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/WW-4636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15299971#comment-15299971
 ] 

ASF GitHub Bot commented on WW-4636:


GitHub user victorsosa opened a pull request:

https://github.com/apache/struts/pull/97

WW-4636 File upload error message always in default language

File upload error message always in default English language.

Content negotiation is a mechanism defined in the HTTP specification is
used in the code; now using the 'Accept-Language: us' in the request the 
language is choose.

The bug was that it was always using the English language for the
message.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/victorsosa/struts WW-4636

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/struts/pull/97.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #97


commit da8b13a87ef0d6af54a8cabbc62d54fbca67f683
Author: victor sosa 
Date:   2016-03-03T18:16:11Z

Merge pull request #8 from apache/master

update pull

commit a5d716393999110b3701563479a96e83136a8b97
Author: victor sosa 
Date:   2016-03-03T18:41:11Z

Merge pull request #9 from victorsosa/easymock_update

Easymock update

commit 6bb1ec67ad539d4bf6850f8314ef521e06b8295e
Author: victor sosa 
Date:   2016-03-04T22:07:16Z

Merge pull request #10 from apache/master

pull update

commit 379b75292e6d084dc881e71f0a826c45934d9df8
Author: victor sosa 
Date:   2016-03-27T18:43:40Z

Merge pull request #11 from apache/master

update pull

commit 47cf4ff84b07523cca2e1c5571742368c5cb5556
Author: victor sosa 
Date:   2016-04-20T18:58:32Z

Merge pull request #13 from apache/master

update pull

commit ca74ac36fc7eb60e41eeaa8a539771169f900dd6
Author: victor sosa 
Date:   2016-05-04T14:47:57Z

Merge pull request #14 from apache/master

update pull

commit 6b360108e57b8986c6409b26cba9b3cd4f16a603
Author: victorsosa 
Date:   2016-05-17T12:37:13Z

WW-4634

commit b4facc8e0674851be581dc74cc262f275734a180
Author: victor sosa 
Date:   2016-05-17T12:39:51Z

Merge pull request #15 from apache/master

update pull

commit f9e4a5e676c2fde1603aa0809cb44c71d2e7a122
Author: victorsosa 
Date:   2016-05-17T12:50:50Z

Merge branch 'master' of github.com:victorsosa/struts

commit ffdacf1b60b8bf1df54af004a5fd84752eb522b4
Author: victorsosa 
Date:   2016-05-17T13:00:33Z

WW-4634

commit b3507834016946a5d2206ac2c51d865199918a68
Author: victorsosa 
Date:   2016-05-25T12:02:05Z

WW-4636

File upload error message always in default language

Content negotiation is a mechanism defined in the HTTP specification is
used; now using the 'Accept-Language: us' in the request the language
choose.

The bug was that it was always using the English language for the
message.

commit 81ff4ae6cdd03f77439ddd9be35f4fe6130aa0e4
Author: Victor Sosa 
Date:   2016-05-25T12:23:18Z

rollback

commit 2272623fd82fe61c4c662c5f81af45ff2e1c882f
Author: victorsosa 
Date:   2016-05-25T12:27:18Z

Merge branch 'WW-4636' of github.com:victorsosa/struts into WW-4636

commit dcb8ac72e4491e878efecad662b3430e42446c80
Author: victor sosa 
Date:   2016-05-25T12:30:33Z

Update styles.css




> File upload error message always in default language
> 
>
> Key: WW-4636
> URL: https://issues.apache.org/jira/browse/WW-4636
> Project: Struts 2
>  Issue Type: Bug
>Affects Versions: 2.3.28
>Reporter: Pierre-Yves Soblet
> Fix For: 2.3.29
>
> Attachments: Struts2i18nTest.zip
>
>
> Struts 2 allows to redefine error messages when an upload fails (as 
> documented in https://cwiki.apache.org/confluence/display/WW/File+Upload).
> For instance, if I upload a file with a size greater than allowed by the 
> configuration using fileUpload interceptor and commons-fileupload dependency, 
> the following key of my resource bundle is used :
> {code}
> struts.messages.upload.error.SizeLimitExceededException=File size exceeded 
> (in i18n.properties).
> {code}
> However, when the current language is not the default one, the translated key 
> (in i18n_fr.properties 

[jira] [Commented] (WW-4636) File upload error message always in default language

2016-05-25 Thread victorsosa (JIRA)

[ 
https://issues.apache.org/jira/browse/WW-4636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15299950#comment-15299950
 ] 

victorsosa commented on WW-4636:


the bug right now, it is always using the English  language. Inserting the 
*Accept-Language: en-US* in the request.

Now it will use the [Content 
negotiation|https://en.wikipedia.org/wiki/Content_negotiation] to determine 
which language to use, as it suppose to.

Base on: https://en.wikipedia.org/wiki/Content_negotiation

> File upload error message always in default language
> 
>
> Key: WW-4636
> URL: https://issues.apache.org/jira/browse/WW-4636
> Project: Struts 2
>  Issue Type: Bug
>Affects Versions: 2.3.28
>Reporter: Pierre-Yves Soblet
> Fix For: 2.3.29
>
> Attachments: Struts2i18nTest.zip
>
>
> Struts 2 allows to redefine error messages when an upload fails (as 
> documented in https://cwiki.apache.org/confluence/display/WW/File+Upload).
> For instance, if I upload a file with a size greater than allowed by the 
> configuration using fileUpload interceptor and commons-fileupload dependency, 
> the following key of my resource bundle is used :
> {code}
> struts.messages.upload.error.SizeLimitExceededException=File size exceeded 
> (in i18n.properties).
> {code}
> However, when the current language is not the default one, the translated key 
> (in i18n_fr.properties for instance) is not taken into account (the default 
> language is used instead).
> The issue seems similar to WW-3177 (that was fixed in 2.3.7).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)