MDL-68753 lang: Remove a redundant okay string and use "OK" everywhere

The "Ok" (with lower-case "k") string was added in MDL-68409 to keep
backwards compatibility with YUI alerts that had it hard-coded. But we
should not need to explain to translators why we have two OK strings
like this and why they use different wording.

Additionally, there would be inconsistency in Behat tests and everywhere
depending on which "OK" or "Ok" string is used for buttons.

So instead, this patch changes the hard-coded 'Ok' string in the YUI and
we should stick to "OK" from now on everywhere.
This commit is contained in:
David Mudrák
2020-05-27 09:59:44 +02:00
parent c47b174d44
commit 2615e429f4
32 changed files with 61 additions and 62 deletions
@@ -116,7 +116,7 @@ Feature: availability_grade
And I click on "Grade" "link" in the "s@example.com" "table_row"
And I set the field "Grade out of 100" to "40"
And I click on "Save changes" "button"
And I press "Ok"
And I press "OK"
And I click on "Edit settings" "link"
# Log back in as student.
@@ -58,7 +58,7 @@ Feature: Restrict activity availability through grade conditions
And I set the following fields to these values:
| Grade | 21 |
And I press "Save changes"
And I press "Ok"
And I press "OK"
And I follow "Edit settings"
And I log out
And I log in as "student1"
@@ -91,7 +91,7 @@ Feature: Restrict sections availability through completion or grade conditions
And I set the following fields to these values:
| Grade | 21 |
And I press "Save changes"
And I press "Ok"
And I press "OK"
And I follow "Edit settings"
And I log out
And I log in as "student1"
@@ -83,7 +83,7 @@ Feature: Marking guides can be created and edited
And I wait "1" seconds
Then the field "Guide criterion B criterion remark" matches value "Comment \"4\""
When I press "Save changes"
And I press "Ok"
And I press "OK"
And I follow "Edit settings"
And I follow "Test assignment 1 name"
And I navigate to "View all submissions" in current page administration
+1 -1
View File
@@ -156,7 +156,7 @@ class behat_grading extends behat_base {
public function i_save_the_advanced_grading_form() {
$this->execute('behat_forms::press_button', get_string('savechanges'));
$this->execute('behat_forms::press_button', 'Ok');
$this->execute('behat_forms::press_button', 'OK');
$this->execute('behat_general::i_click_on', array($this->escape(get_string('editsettings')), 'link'));
$this->execute('behat_forms::press_button', get_string('cancel'));
$this->execute('behat_navigation::i_navigate_to_in_current_page_administration',
@@ -38,7 +38,7 @@ Feature: We can bulk insert grades for students in a course
And I set the following fields to these values:
| Grade out of 100 | 50 |
And I press "Save changes"
And I press "Ok"
And I press "OK"
And I am on "Course 1" course homepage
And I navigate to "View > Grader report" in the course gradebook
And I follow "Single view for Test assignment one"
@@ -79,7 +79,7 @@ Feature: We can bulk insert grades for students in a course
And I set the following fields to these values:
| Grade out of 100 | 50 |
And I press "Save changes"
And I press "Ok"
And I press "OK"
And I am on "Course 1" course homepage
And I navigate to "View > Grader report" in the course gradebook
# And I click on "input[title='Dock Navigation block']" "css_element"
+5 -5
View File
@@ -55,23 +55,23 @@ Feature: View gradebook when scales are used
And I click on "Grade" "link" in the "Student 1" "table_row"
And I set the field "Grade" to "A"
And I press "Save changes"
And I press "Ok"
And I press "OK"
And I click on "[data-action=next-user]" "css_element"
And I set the field "Grade" to "B"
And I press "Save changes"
And I press "Ok"
And I press "OK"
And I click on "[data-action=next-user]" "css_element"
And I set the field "Grade" to "C"
And I press "Save changes"
And I press "Ok"
And I press "OK"
And I click on "[data-action=next-user]" "css_element"
And I set the field "Grade" to "D"
And I press "Save changes"
And I press "Ok"
And I press "OK"
And I click on "[data-action=next-user]" "css_element"
And I set the field "Grade" to "F"
And I press "Save changes"
And I press "Ok"
And I press "OK"
And I am on "Course 1" course homepage
And I navigate to "Setup > Course grade settings" in the course gradebook
And I set the field "Show weightings" to "Show"
@@ -51,7 +51,7 @@ Feature: View gradebook when single item scales are used
And I click on "Grade" "link" in the "Student 1" "table_row"
And I set the field "Grade" to "A"
And I press "Save changes"
And I press "Ok"
And I press "OK"
And I am on "Course 1" course homepage
And I navigate to "Setup > Course grade settings" in the course gradebook
And I set the field "Show weightings" to "Show"
-1
View File
@@ -1500,7 +1500,6 @@ $string['numwords'] = '{$a} words';
$string['numyear'] = '{$a} year';
$string['numyears'] = '{$a} years';
$string['ok'] = 'OK';
$string['okay'] = 'Ok';
$string['oldpassword'] = 'Current password';
$string['olduserdirectory'] = 'This is the OLD users directory, and is no longer needed. You may safely delete it. The files it contains have been copied to the NEW user directory.';
$string['optional'] = 'optional';
@@ -144,7 +144,7 @@ Feature: Using the activity grade form element
And I click on "Grade" "link" in the "Student 1" "table_row"
And I set the field "Grade" to "C"
And I press "Save changes"
And I press "Ok"
And I press "OK"
And I follow "Edit settings"
When I expand all fieldsets
Then I should see "Some grades have already been awarded, so the grade type and scale cannot be changed"
@@ -203,7 +203,7 @@ Feature: Using the activity grade form element
And I click on "Grade" "link" in the "Student 1" "table_row"
And I set the field "Grade out of 100" to "50"
And I press "Save changes"
And I press "Ok"
And I press "OK"
And I follow "Edit settings"
When I expand all fieldsets
Then I should see "Some grades have already been awarded, so the grade type cannot be changed. If you wish to change the maximum grade, you must first choose whether or not to rescale existing grades."
+1 -1
View File
@@ -40,6 +40,6 @@
{{< core/modal }}
{{$footer}}
<button type="button" class="btn btn-primary" data-action="cancel">{{#str}}okay, moodle{{/str}}</button>
<button type="button" class="btn btn-primary" data-action="cancel">{{#str}}ok, moodle{{/str}}</button>
{{/footer}}
{{/ core/modal }}
@@ -127,17 +127,17 @@ Y.extend(ALERT, M.core.notification.info, {
*
* @attribute yesLabel
* @type String
* @default 'Ok'
* @default 'OK'
*/
yesLabel: {
validator: Y.Lang.isString,
setter: function(txt) {
if (!txt) {
txt = 'Ok';
txt = 'OK';
}
return txt;
},
value: 'Ok'
value: 'OK'
}
}
});
@@ -1 +1 @@
YUI.add("moodle-core-notification-alert",function(o,t){var e,i;M.core=M.core||{},e="Moodle alert",i=function(t){t.closeButton=!1,i.superclass.constructor.apply(this,[t])},o.extend(i,M.core.notification.info,{_closeEvents:null,initializer:function(){var t,e,i;this._closeEvents=[],this.publish("complete"),t=o.Node.create('<input type="button" class="btn btn-primary" id="id_yuialertconfirm-'+this.get("COUNT")+'"value="'+this.get("yesLabel")+'" />'),e=o.Node.create('<div class="confirmation-dialogue"></div>').append(o.Node.create('<div class="confirmation-message">'+this.get("message")+"</div>")).append(o.Node.create('<div class="confirmation-buttons text-xs-right"></div>').append(t)),this.get("notificationBase").addClass("moodle-dialogue-confirm"),this.setStdModContent(o.WidgetStdMod.BODY,e,o.WidgetStdMod.REPLACE),this.setStdModContent(o.WidgetStdMod.HEADER,'<h1 id="moodle-dialogue-'+this.get("COUNT")+'-header-text">'+this.get("title")+"</h1>",o.WidgetStdMod.REPLACE),this._closeEvents.push(o.on("key",this.submit,window,"down:13",this),t.on("click",this.submit,this)),(i=this.get("boundingBox").one(".closebutton"))&&this._closeEvents.push(i.on("click",this.submit,this))},submit:function(){new o.EventHandle(this._closeEvents).detach(),this.fire("complete"),this.hide(),this.destroy()}},{NAME:e,CSS_PREFIX:"moodle-dialogue",ATTRS:{title:{validator:o.Lang.isString,value:"Alert"},message:{validator:o.Lang.isString,value:"Confirm"},yesLabel:{validator:o.Lang.isString,setter:function(t){return t=t||"Ok"},value:"Ok"}}}),M.core.alert=i},"@VERSION@",{requires:["moodle-core-notification-dialogue"]});
YUI.add("moodle-core-notification-alert",function(o,t){var e,i;M.core=M.core||{},e="Moodle alert",i=function(t){t.closeButton=!1,i.superclass.constructor.apply(this,[t])},o.extend(i,M.core.notification.info,{_closeEvents:null,initializer:function(){var t,e,i;this._closeEvents=[],this.publish("complete"),t=o.Node.create('<input type="button" class="btn btn-primary" id="id_yuialertconfirm-'+this.get("COUNT")+'"value="'+this.get("yesLabel")+'" />'),e=o.Node.create('<div class="confirmation-dialogue"></div>').append(o.Node.create('<div class="confirmation-message">'+this.get("message")+"</div>")).append(o.Node.create('<div class="confirmation-buttons text-xs-right"></div>').append(t)),this.get("notificationBase").addClass("moodle-dialogue-confirm"),this.setStdModContent(o.WidgetStdMod.BODY,e,o.WidgetStdMod.REPLACE),this.setStdModContent(o.WidgetStdMod.HEADER,'<h1 id="moodle-dialogue-'+this.get("COUNT")+'-header-text">'+this.get("title")+"</h1>",o.WidgetStdMod.REPLACE),this._closeEvents.push(o.on("key",this.submit,window,"down:13",this),t.on("click",this.submit,this)),(i=this.get("boundingBox").one(".closebutton"))&&this._closeEvents.push(i.on("click",this.submit,this))},submit:function(){new o.EventHandle(this._closeEvents).detach(),this.fire("complete"),this.hide(),this.destroy()}},{NAME:e,CSS_PREFIX:"moodle-dialogue",ATTRS:{title:{validator:o.Lang.isString,value:"Alert"},message:{validator:o.Lang.isString,value:"Confirm"},yesLabel:{validator:o.Lang.isString,setter:function(t){return t=t||"OK"},value:"OK"}}}),M.core.alert=i},"@VERSION@",{requires:["moodle-core-notification-dialogue"]});
@@ -127,17 +127,17 @@ Y.extend(ALERT, M.core.notification.info, {
*
* @attribute yesLabel
* @type String
* @default 'Ok'
* @default 'OK'
*/
yesLabel: {
validator: Y.Lang.isString,
setter: function(txt) {
if (!txt) {
txt = 'Ok';
txt = 'OK';
}
return txt;
},
value: 'Ok'
value: 'OK'
}
}
});
+3 -3
View File
@@ -97,17 +97,17 @@ Y.extend(ALERT, M.core.notification.info, {
*
* @attribute yesLabel
* @type String
* @default 'Ok'
* @default 'OK'
*/
yesLabel: {
validator: Y.Lang.isString,
setter: function(txt) {
if (!txt) {
txt = 'Ok';
txt = 'OK';
}
return txt;
},
value: 'Ok'
value: 'OK'
}
}
});
@@ -133,7 +133,7 @@ Feature: In an assignment, teacher can annotate PDF files during grading
And I draw on the pdf
And I press "Save changes"
And I should see "The changes to the grade and feedback were saved"
And I press "Ok"
And I press "OK"
And I click on "Edit settings" "link"
And I follow "Test assignment name"
And I navigate to "View all submissions" in current page administration
@@ -62,7 +62,7 @@ Feature: In a group assignment, teacher can annotate PDF files for all users
Given I set the field "applytoall" to "0"
And I press "Save changes"
And I should see "The changes to the grade and feedback were saved"
And I press "Ok"
And I press "OK"
And I click on "Edit settings" "link"
And I log out
And I log in as "student1"
@@ -81,7 +81,7 @@ Feature: In a group assignment, teacher can annotate PDF files for all users
@javascript
Scenario: Submit a PDF file as a student and annotate the PDF as a teacher and all students in the group get a copy of the annotated PDF.
Given I press "Save changes"
And I click on "Ok" "button"
And I click on "OK" "button"
And I am on "Course 1" course homepage
And I log out
And I log in as "student1"
@@ -54,7 +54,7 @@ Feature: In an assignment, teacher can view the feedback for a previous attempt.
And I press "Save changes"
And I wait until the page is ready
And I should see "The changes to the grade and feedback were saved"
And I press "Ok"
And I press "OK"
And I follow "View a different attempt"
And I click on "Attempt 1" "radio" in the "View a different attempt" "dialogue"
And I press "View"
@@ -58,7 +58,7 @@ Feature: In an assignment, teacher can submit feedback files during grading
Scenario: A teacher can provide a feedback file when grading an assignment.
Given I set the field "applytoall" to "0"
And I press "Save changes"
And I click on "Ok" "button"
And I click on "OK" "button"
And I click on "Course 1" "link" in the "[data-region=assignment-info]" "css_element"
And I log out
And I log in as "student1"
@@ -74,7 +74,7 @@ Feature: In an assignment, teacher can submit feedback files during grading
@javascript
Scenario: A teacher can provide a feedback file when grading an assignment and all students in the group will receive the file.
Given I press "Save changes"
And I click on "Ok" "button"
And I click on "OK" "button"
And I click on "Course 1" "link" in the "[data-region=assignment-info]" "css_element"
And I log out
And I log in as "student1"
@@ -43,7 +43,7 @@ Feature: In an assignment, students start a new attempt based on their previous
And I set the following fields to these values:
| Allow another attempt | 1 |
And I press "Save changes"
And I press "Ok"
And I press "OK"
And I click on "Edit settings" "link"
And I log out
Then I log in as "student1"
@@ -150,7 +150,7 @@ Feature: In an assignment, students start a new attempt based on their previous
And I set the following fields to these values:
| Allow another attempt | 1 |
And I press "Save changes"
And I press "Ok"
And I press "OK"
And I follow "Assignment: Test assignment name"
And I log out
And I log in as "student4"
@@ -46,7 +46,7 @@ Feature: In an assignment, teachers can edit a students submission inline
| Feedback comments | I'm the teacher feedback |
And I upload "lib/tests/fixtures/empty.txt" file to "Feedback files" filemanager
And I press "Save changes"
And I press "Ok"
And I press "OK"
And I click on "Edit settings" "link"
And I follow "Test assignment name"
And I navigate to "View all submissions" in current page administration
+2 -2
View File
@@ -32,7 +32,7 @@ Feature: Check that the assignment grade can be updated correctly
And I set the field "Grade out of 100" to "50"
And I set the field "Notify students" to "0"
And I press "Save changes"
And I press "Ok"
And I press "OK"
And I click on "Edit settings" "link"
And I follow "Test assignment name"
And I navigate to "View all submissions" in current page administration
@@ -68,7 +68,7 @@ Feature: Check that the assignment grade can be updated correctly
And I set the field "Grade out of 100" to "50"
And I set the field "Notify students" to "0"
And I press "Save changes"
And I press "Ok"
And I press "OK"
And I click on "Edit settings" "link"
And I follow "Test assignment name"
And I navigate to "View all submissions" in current page administration
@@ -46,7 +46,7 @@ Feature: In an assignment, teachers can edit feedback for a students previous su
| Feedback comments | I'm the teacher first feedback |
| Allow another attempt | Yes |
And I press "Save changes"
And I click on "Ok" "button"
And I click on "OK" "button"
And I click on "Edit settings" "link"
And I log out
And I log in as "student2"
@@ -66,7 +66,7 @@ Feature: In an assignment, teachers can edit feedback for a students previous su
| Grade | 50 |
| Feedback comments | I'm the teacher second feedback |
And I press "Save changes"
And I click on "Ok" "button"
And I click on "OK" "button"
And I click on "Edit settings" "link"
And I log out
Then I log in as "student2"
@@ -36,7 +36,7 @@ Feature: In an assignment, teachers can filter displayed submissions by assigned
And I set the field "allocatedmarker" to "Marker 1"
And I set the field "Notify students" to "0"
And I press "Save changes"
And I press "Ok"
And I press "OK"
And I click on "Edit settings" "link"
And I log out
When I log in as "teacher1"
@@ -57,7 +57,7 @@ Feature: View the grading status of an assignment
And I set the field "Feedback comments" to "Great job! Lol, not really."
And I set the field "Notify students" to "0"
And I press "Save changes"
And I press "Ok"
And I press "OK"
And I click on "Edit settings" "link"
And I follow "Test assignment name"
And I navigate to "View all submissions" in current page administration
@@ -80,7 +80,7 @@ Feature: View the grading status of an assignment
And I should see "1 of 1"
And I set the field "Marking workflow state" to "Released"
And I press "Save changes"
And I press "Ok"
And I press "OK"
And I click on "Edit settings" "link"
And I follow "Test assignment name"
And I navigate to "View all submissions" in current page administration
@@ -104,7 +104,7 @@ Feature: View the grading status of an assignment
And I set the field "Marking workflow state" to "In marking"
And I set the field "Notify students" to "0"
And I press "Save changes"
And I press "Ok"
And I press "OK"
And I click on "Edit settings" "link"
And I follow "Test assignment name"
And I navigate to "View all submissions" in current page administration
@@ -154,7 +154,7 @@ Feature: View the grading status of an assignment
And I set the field "Grade out of 100" to "50"
And I set the field "Feedback comments" to "Great job! Lol, not really."
And I press "Save changes"
And I press "Ok"
And I press "OK"
And I click on "Edit settings" "link"
And I follow "Test assignment name"
And I navigate to "View all submissions" in current page administration
@@ -188,7 +188,7 @@ Feature: View the grading status of an assignment
And I set the field "Grade out of 100" to "99.99"
And I set the field "Feedback comments" to "Even better job! Really."
And I press "Save changes"
And I press "Ok"
And I press "OK"
And I click on "Edit settings" "link"
And I follow "Test assignment name"
And I navigate to "View all submissions" in current page administration
@@ -189,11 +189,11 @@ Feature: Group assignment submissions
| Grade out of 100 | 50.0 |
| Apply grades and feedback to entire group | 1 |
And I press "Save changes"
And I press "Ok"
And I press "OK"
And I set the following fields to these values:
| Allow another attempt | 1 |
And I press "Save changes"
And I press "Ok"
And I press "OK"
When I am on "Course 1" course homepage
And I follow "Test assignment name"
And I navigate to "View all submissions" in current page administration
+1 -1
View File
@@ -46,7 +46,7 @@ Feature: Hide grader identities identity from students
And I set the field "Grade out of 100" to "50"
And I set the field "Feedback comments" to "Catch for us the foxes."
And I press "Save changes"
And I press "Ok"
And I press "OK"
And I follow "Test assignment name"
And I navigate to "View all submissions" in current page administration
And I should see "Graded" in the "Student 1" "table_row"
@@ -65,7 +65,7 @@ Feature: Outcome grading
And I set the following fields to these values:
| Outcome Test: | Excellent |
And I press "Save changes"
And I press "Ok"
And I press "OK"
And I click on "Edit settings" "link"
And I follow "Test assignment name"
And I navigate to "View all submissions" in current page administration
@@ -113,7 +113,7 @@ Feature: Outcome grading
| Outcome Test: | Excellent |
| Apply grades and feedback to entire group | Yes |
And I press "Save changes"
And I press "Ok"
And I press "OK"
And I click on "Edit settings" "link"
And I follow "Test assignment name"
And I navigate to "View all submissions" in current page administration
@@ -125,7 +125,7 @@ Feature: Outcome grading
| Outcome Test: | Disappointing |
| Apply grades and feedback to entire group | No |
And I press "Save changes"
And I press "Ok"
And I press "OK"
And I click on "Edit settings" "link"
And I follow "Test assignment name"
And I navigate to "View all submissions" in current page administration
+2 -2
View File
@@ -39,7 +39,7 @@ Feature: In an assignment, teachers grade multiple students on one page
And I click on "Grade" "link" in the "Student 1" "table_row"
And I wait until the page is ready
And I press "Save changes"
And I press "Ok"
And I press "OK"
And I click on "Edit settings" "link"
And I follow "Test assignment name"
Then I should see "1" in the "Needs grading" "table_row"
@@ -113,7 +113,7 @@ Feature: In an assignment, teachers grade multiple students on one page
| M8d skillZ! | 1337 |
| Feedback comments | I'm the teacher first feedback |
And I press "Save changes"
And I press "Ok"
And I press "OK"
And I click on "Edit settings" "link"
And I follow "Test assignment name"
And I navigate to "View all submissions" in current page administration
@@ -31,7 +31,7 @@ Feature: Check that the assignment grade can be rescaled when the max grade is c
And I click on "Grade" "link" in the "Student 1" "table_row"
And I set the field "Grade out of 100" to "40"
And I press "Save changes"
And I press "Ok"
And I press "OK"
And I follow "Edit settings"
And I follow "Test assignment name"
And I navigate to "View all submissions" in current page administration
@@ -51,7 +51,7 @@ Feature: Assignments correctly add feedback to the grade report when workflow an
And I set the field "Feedback comments" to "Great job! Lol, not really."
And I set the field "Notify students" to "0"
And I press "Save changes"
And I press "Ok"
And I press "OK"
And I click on "Edit settings" "link"
And I follow "Test assignment name"
And I navigate to "View all submissions" in current page administration
@@ -63,7 +63,7 @@ Feature: Assignments correctly add feedback to the grade report when workflow an
And I set the field "Marking workflow state" to "Ready for release"
And I set the field "Notify students" to "0"
And I press "Save changes"
And I press "Ok"
And I press "OK"
And I click on "Edit settings" "link"
And I follow "Test assignment name"
And I navigate to "View all submissions" in current page administration
@@ -71,7 +71,7 @@ Feature: Assignments correctly add feedback to the grade report when workflow an
And I click on "Grade" "link" in the "I'm the student's first submission" "table_row"
And I set the field "Marking workflow state" to "Released"
And I press "Save changes"
And I press "Ok"
And I press "OK"
And I click on "Edit settings" "link"
And I follow "Test assignment name"
And I navigate to "View all submissions" in current page administration
@@ -91,7 +91,7 @@ Feature: Assignments correctly add feedback to the grade report when workflow an
And I set the field "Marking workflow state" to "Ready for release"
And I set the field "Notify students" to "0"
And I press "Save changes"
And I press "Ok"
And I press "OK"
And I click on "Edit settings" "link"
And I follow "Test assignment name"
And I navigate to "View all submissions" in current page administration
@@ -101,7 +101,7 @@ Feature: Assignments correctly add feedback to the grade report when workflow an
And I click on "Grade" "link" in the "Student 1" "table_row"
And I set the field "Marking workflow state" to "Released"
And I press "Save changes"
And I press "Ok"
And I press "OK"
And I click on "Edit settings" "link"
And I follow "Test assignment name"
And I navigate to "View all submissions" in current page administration
@@ -58,7 +58,7 @@ Feature: In an assignment, students can comment in their submissions
| Grade out of 100 | 50 |
| Feedback comments | I'm the teacher feedback |
And I press "Save changes"
And I press "Ok"
And I press "OK"
And I click on "Edit settings" "link"
And I follow "Test assignment name"
And I navigate to "View all submissions" in current page administration
@@ -78,7 +78,7 @@ Feature: In an assignment, students can comment in their submissions
| Grade out of 100 | 0 |
And I press "Save changes"
And I should see "The changes to the grade and feedback were saved"
And I press "Ok"
And I press "OK"
And I set the following fields to these values:
| Feedback comments | I'm the teacher feedback |
And I press "Save changes"