Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-5255

Completely separate the functionality of "locale" and "format" for Decimalbox/Doublebox

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • 9.6.2
    • None
    • None
    • None

      This is a change of specification. The issue was brought to light by ZK-5156. Also, take a look at ZK-4198 and ZK-3704.

      Steps to Reproduce

      <decimalbox format="locale:en-IN" cols="20" value="123456789.00"/>
      <doublebox format="locale:en-IN" cols="20" value="123456789.00"/>
      

      Current Result

      Prior to 9.6.3, both Decimalbox and Doublebox will display "12,34,56,789". Since 9.6.3, both Decimalbox and Doublebox will display "12,34,56,789.02". Due to the decision in ZK-5156.

      Expected Result

      It is preferable to change this specification by separating the concerns of the 2 fields, "format" and "locale".

      We should reject:

      <decimalbox width="200px" locale="es_CO" format="locale:es-CO"/>
      <decimalbox width="200px" locale="es_SV" format="locale:es-SV"/>
      

      link to the snippet above

      And allow:

      <decimalbox width="200px" locale="es_CO" format="###,##0.###"/>
      <decimalbox width="200px" locale="es_SV" format="###,##0.###"/>
      

      link to the snippet above

      Even after the separation of concerns, it is still possible that the values of "locale" and "format" lead to a contradiction. For instance, the locale "en_IN" would yield "12,34,56,789.02". What if the user also specified the format "###,##0.###"? Should the "format" field override the "locale" field and yield "123,456,789.020" instead? This sort of problem should be thought through.

            Unassigned Unassigned
            gordonhsu gordonhsu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: