Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-4636

File upload error message always in default language

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.28
    • Fix Version/s: 2.5.8
    • Component/s: None
    • Labels:
      None

      Description

      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 :

      struts.messages.upload.error.SizeLimitExceededException=File size exceeded (in i18n.properties).
      

      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).

        Attachments

        1. Struts2i18nTest.zip
          6 kB
          Pierre-Yves Soblet

          Activity

            People

            • Assignee:
              aleksandr-m Aleksandr Mashchenko
              Reporter:
              pys Pierre-Yves Soblet
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: