Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-41808

change defaults hardcoded strings in yui or other js notifications to use our get_string method

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Minor Minor
    • None
    • 2.5.2, 2.6.3
    • Glossary, JavaScript
    • MOODLE_25_STABLE, MOODLE_26_STABLE
    • MDL-41808-master
    • Hide
      • open the JS console
      • for each of the following dialogues, confirm:
        • that the strings are shown without placeholders

          // Setup
          Y.use('moodle-core-notification');
           
          // Confirmation dialogue
          a = new M.core.confirm({});
          // Confirm that the title, yes, and no buttons are correct
          // Confirm that the title on the [X] is correct.
          a.destroy();
           
          // Alert dialogue
          a = new M.core.alert({});
          // Confirm that the title, and OK buttons are correct
          // Confirm that the title on the [X] is correct.
          a.destroy();
           
          // ajax Exception dialogue
          a = new M.core.ajaxException({});
          // Confirm that the title, and default message (Unknonw error) are correct
          // Confirm that the title on the [X] is correct.
          a.destroy();
           
          // standard dialogue
          a = new M.core.dialogue({});
          // Confirm that the title is correct
          // Confirm that the title on the [X] is correct.
          a.destroy();
          

      1. Enable the glossary autolink filter
      2. Open a course and ensure that the glossary autolink is enabled for that course
      3. Create a new glossary with autolinking and an entry with autolinking enabled
      4. Add a label mentioning that entry
      5. Click on the autolink link
        • Confirm that the dialogue opened
        • Confirm that the 'OK' button was shown with the correct string
      Show
      open the JS console for each of the following dialogues, confirm: that the strings are shown without placeholders // Setup Y.use('moodle-core-notification');   // Confirmation dialogue a = new M.core.confirm({}); // Confirm that the title, yes, and no buttons are correct // Confirm that the title on the [X] is correct. a.destroy();   // Alert dialogue a = new M.core.alert({}); // Confirm that the title, and OK buttons are correct // Confirm that the title on the [X] is correct. a.destroy();   // ajax Exception dialogue a = new M.core.ajaxException({}); // Confirm that the title, and default message (Unknonw error) are correct // Confirm that the title on the [X] is correct. a.destroy();   // standard dialogue a = new M.core.dialogue({}); // Confirm that the title is correct // Confirm that the title on the [X] is correct. a.destroy(); Enable the glossary autolink filter Open a course and ensure that the glossary autolink is enabled for that course Create a new glossary with autolinking and an entry with autolinking enabled Add a label mentioning that entry Click on the autolink link Confirm that the dialogue opened Confirm that the 'OK' button was shown with the correct string

      In MDLSITE-2493, we patched up glossary filter to alert based on passed in yesLabel string to M.core.alert() however the issue still remains that M.core.alert does not strictly require the string to be passed in and defaults to a hardcoded 'Ok'.

      This issue is about dealing with the hardcoded english defaults in our js yui core as well as pulling the glossary patch into core.

      See lib/yui/src/notification/js/notification.js for other dialogs that we extend which contain hardcoded english strings as default ('Yes', 'No', 'Confirm', 'Are you sure?').

            Unassigned Unassigned
            nebgor Aparup Banerjee
            Jetha Chan Jetha Chan
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.