Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-87727

Error message when field is required in form portlet is not localized




      Error message when invalid data is inputted into a form text field is displayed in the default language specified by the display settings of the instance in which the form was created. When the page is localized (ie. adding in url /en/, /fr/..) the other keys are translated but the error message is not.

      This is issue is not reproducible in master, as a warning message that says "This change will only affect the newly created localized content." is displayed when an user changes the default language under Instance settings. Furthermore, when a form is edited, "available translations" options were added to allow for proper language text display. If the form supports a language, it will display error message correctly, if language is not specified, then error message will be displayed in the default language the form was first created.

      Reproduction Steps

      1. Go to Control Panel > Configuration > Instance Settings > Miscellaneous > Set Default Language to Spanish.
      2. Go to Sites > Create a Blank Site. 
      3. Go to Content > Forms > Create a new form, choose the Text Field and click "Required Field".
      4. Add a Public Page in this site.
      5. Add the Form portlet and select the form we created.
      6. Do not input anything in the text field, click the Submit button on the Form portlet and "This field is required" is in Spanish.
      7. Change the language to English under Instances Settings (Language under Site Settings will also be changed to English by default.). You may also add instead "/en/" after localhost:8080 to localize page.
      8. Follow step 6 again.

      Actual Result: "This field is required" is still in Spanish.
      Expected Result: "This field is required" will be in English.


      Reproducible in 7.0.x f1f57e87fac47d4e817b22d59f87ac0817aaa2a8
      Not reproducible in master 5361b3dc3c9aff9c105607d4a612599f7ed6aeb7




            yvonne.han Yvonne Han
            nelly.liu-peng Nelly Liu-Peng
            Participants of an Issue:
            Recent user:
            Zendesk for JIRA
            0 Vote for this issue
            2 Start watching this issue


              Days since last comment:
              2 years, 44 weeks, 6 days ago


                Version Package
                7.0.0 DXP FP67