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

jq.alert default "OK" button doesn't use internationalized messages

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 8.0.2
    • Fix Version/s: 8.5.0
    • Component/s: None
    • Security Level: Jimmy
    • Labels:
      None

      Description

      Steps to Reproduce

      trigger a jq.alert without parameters in any non-english locale

      jq.alert('test');
      

      Actual Result

      The button label is always 'OK' regardless of locale

      Expected Result

      The button label should be msgzul.OK (internationalized OK label value)

      Debug Info

      the default button is created when getButtons is called with an empty opts.button:
      called in jq.alert:
      https://github.com/zkoss/zk/blob/4f24fc11451896b7c03f720a584aba509512a0f9/zul/src/archive/web/js/zul/dom.js#L111

      if opts.button is empty:
      a default button with hardcoded label 'OK' is created instead
      https://github.com/zkoss/zk/blob/4f24fc11451896b7c03f720a584aba509512a0f9/zul/src/archive/web/js/zul/dom.js#L60

      Root Cause

      Workaround

        Attachments

          Activity

            People

            Assignee:
            DevChu DevChu
            Reporter:
            MDuchemin MDuchemin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 10 minutes
                10m