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

Lukasz Lenart edited comment on WW-4389 at 8/21/14 1:36 PM:
------------------------------------------------------------

Oh, I see!

My first suggestion is wrong though. {{\{3\}}} is actually the uploaded file's 
limit - see FileUploadInterceptor:353:

{code:java}
String errMsg = getTextMessage(action, "struts.messages.error.file.too.large", 
new String[]{inputName, filename, file.getName(), "" + file.length()});
{code}

Since we're discussing this, I would also suggest that maximumSize is added to 
that array and that the default message displays it - for the end user it's 
much more useful to know what the program's limit is (because he cannot guess 
it) than to display the uploaded file's size (he probably knows what his file's 
size is).


was (Author: wild_oscar):
Oh, I see!

My first suggestion is wrong though. {{ {3 }} is actually the uploaded file's 
limit - see FileUploadInterceptor:353:

{{
String errMsg = getTextMessage(action, "struts.messages.error.file.too.large", 
new String[]{inputName, filename, file.getName(), "" + file.length()});
}}

Since we're discussing this, I would also suggest that maximumSize is added to 
that array and that the default message displays it - for the end user it's 
much more useful to know what the program's limit is (because he cannot guess 
it) than to display the uploaded file's size (he probably knows what his file's 
size is).

> Typo in key struts.messages.error.file.too.large
> ------------------------------------------------
>
>                 Key: WW-4389
>                 URL: https://issues.apache.org/jira/browse/WW-4389
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Core Interceptors
>    Affects Versions: 2.3.15.3
>            Reporter: Miguel Almeida
>            Priority: Minor
>             Fix For: 2.3.18
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> There's a typo in the english key:
> {noformat}
> struts.messages.error.file.too.large=The file is to large to be uploaded: {0} 
> "{1}" "{2}" {3}
> {noformat}
> Should be "too large". 
> While we're at it, the resulting message is not very user friendly: {{The 
> file is to large to be uploaded: upload "LargeFile.zip" "LargeFile.zip.temp" 
> 11000000}}
> Suggestion:
> {noformat}
> struts.messages.error.file.too.large=File {0} is too large to be uploaded. 
> Maximum allowed size {3} bytes?
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to