Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    12.0p: Validation message shown in German and English

    Hi Isomorphic,

    please see this sample in Locale DE (v12.0p_2019-11-02) and in English or French.

    If you click "Validate" in the German version, the error message is displayed in German and English for all three fields (tested Chrome 70 and IE Edge). This does not happen in the other languages.

    Click image for larger version

Name:	Error message 2 languages.PNG
Views:	39
Size:	13.2 KB
ID:	259897

    Best regards
    Blama



    #2
    Sorry, the French link is wrong. With the correct one, it also happens in French.

    Comment


      #3
      Thanks for the notification. We see the problem and have a developer looking into it

      Regards
      Isomorphic Software

      Comment


        #4
        We covered this with your team just days ago. Server-side validation error messages are not automatically localized - you need to localize them.

        If you make the server-side error message for your required validator match the client-side one, the duplicate message will not be shown.

        Comment


          #5
          Hi Isomorphic,

          understood. Of course we could rewrite all required="true" as
          Code:
                      <validators>
                          <validator type="required">
                              <errorMessage><fmt:message key="requiredErrMsg" /></errorMessage>
                          </validator>
                      </validators>
          but this is a lot of tedious work and bloats the .ds.xmls with boilerplate code.
          IMHO it would be a good enhancement, if the framework uses the language information it gets.
          We already provide the selected language at start via
          Code:
          RPCManager.setActionURL(RPCManager.getActionURL() + "?locale=" + "<selectedLanguage>";
          so it could get the requested language from there or from the HttpServletRequest.

          Best regards
          Blama

          Comment


            #6
            Yes, we recognize the possibility of an enhancement here, but it's not a trivial one: many of the error messages for built-in validators are templates that involve variable substitution, so there would need to be a server-side system for doing that. Further, the relationship between the validators and the i18n constants is currently expressed only in client-side code, so that would need to be externalized somehow so that the server could find out which messages to use from the locale packs.

            Still, if it's a large effort for you to internationalize your error messages, it would be a valid Feature Sponsorship to have this capability added.

            Comment


              #7
              Originally posted by Blama View Post
              Hi Isomorphic,

              understood. Of course we could rewrite all required="true" as
              Code:
              <validators>
              <validator type="required">
              <errorMessage><fmt:message key="requiredErrMsg" /></errorMessage>
              </validator>
              </validators>
              but this is a lot of tedious work and bloats the .ds.xmls with boilerplate code.
              IMHO it would be a good enhancement, if the framework uses the language information it gets.
              We already provide the selected language at start via
              Code:
              RPCManager.setActionURL(RPCManager.getActionURL() + "?locale=" + "<selectedLanguage>";
              so it could get the requested language from there or from the HttpServletRequest.

              Best regards
              Blama

              +1

              Comment

              Working...
              X