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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 8.5.0
    • 8.0.2
    • None
    • Security Level: Jimmy
    • None
    • None

      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

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

              Created:
              Updated:
              Resolved:

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