Uploaded image for project: 'Magnolia Form Module'
  1. Magnolia Form Module
  2. MGNLFORM-50

i18n-problem with custom validation-error-messages

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • 1.2
    • 1.1.1
    • None
    • None

      In the magnolia-form-module i did run into a i18n-Problem.
      When you submit a mail and you have required fields which you did not fill out you get an error-Message, e.g.
      <autor-defined error-message> Name: is required
      'Name' is the field-name of the form-element
      'is required' is the label "form.user.errorMessage.mandatory" from messages_en.properties-file

      The Problem is that this message ('is required') which is displayed to the end-user is not translated to the languages (de, it, fr) we have on the website.
      As a workaround I thought i could use our own messages-files by changing the attribute "i18nBasename" from the form-paragraph in the config.
      But this does not work. The reason is that the message-file is hard-coded in info.magnolia.module.form.util.FormUtil.java to "info.magnolia.module.form.messages".
      FormModel.addErrorMessage() uses FormUtil

      Suggestion for improvement: The form-module code is changed so it is possible to use custom-defined-messages-files.

        Acceptance criteria

              ochytil Ondrej Chytil
              htobler Hans Tobler
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: