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

Numeric data is not getting saved properly in Web Content for translation

Details

    Description

      Steps to reproduce:

      1. Start a Liferay portal
      2. Create a structure (Struct1) with a 'Text' and a 'Number' field
      3. Create a new web content (Content1) using the above-created structure
      4. For the default English translation, add "Hello" to the Text and "-12.54" to the Number field
      5. Switch to Spanish translation and observe that the value is still "-12.54"
      6. Change the Text field to "Hola" and keep the "-12.54" value in the Number field
      7. Save the web content
      8. Open the web content again and check the values

      Expected result: The value should be "-12.54" for English and Spanish as well (or possibly "-12,54" for Spanish, since that's the correct number format for that language)
      Actual result: For English translation, "-12.54" but for Spanish translation "-1254"

      Notes:
      Most likely caused by LPS-102643 . Although, it fixes a different scenario. In Spanish and Italian the comma "," is the decimal separator, and the dot "." is simply dropped from the value, when parsing it on those specific languages. Technically, this is the correct behavior, but it's confusing for the users, as the values are directly copied between languages when creating translations. Users expect the numerical values to work, even when they don't "translate" them manually (by replacing "." with "," and vice-versa).

      Attachments

        Issue Links

          Activity

            People

              yang.cao Yang Cao
              vendel.toreki Vendel Töreki
              Kiyoshi Lee Kiyoshi Lee
              Vendel Töreki Vendel Töreki
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                2 years, 16 weeks, 1 day ago

                Packages

                  Version Package
                  7.2.10 DXP FP12
                  7.2.X
                  7.3.10 DXP FP1
                  7.3.10.1 DXP SP1
                  7.3.6 CE GA7
                  7.3.X
                  7.4.13 DXP GA1
                  Master