launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #29704
[Merge] ~cjwatson/launchpad:codespell-js into launchpad:master
Colin Watson has proposed merging ~cjwatson/launchpad:codespell-js into launchpad:master.
Commit message:
Fix spelling errors in *.js
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/437816
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:codespell-js into launchpad:master.
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 1a7a1f4..2cd64a1 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -83,7 +83,7 @@ repos:
rev: v2.2.2
hooks:
- id: codespell
- files: ^doc/.*\.rst$
+ files: ^(doc/.*\.rst|.*\.js)$
- repo: https://github.com/get-woke/woke
rev: v0.19.0
hooks:
diff --git a/lib/lp/app/javascript/client.js b/lib/lp/app/javascript/client.js
index f437fb6..74b66e9 100644
--- a/lib/lp/app/javascript/client.js
+++ b/lib/lp/app/javascript/client.js
@@ -528,7 +528,7 @@ YUI.add('lp.client', function(Y) {
},
'lookup_value': function(key) {
- /* A common getter interface for Entrys and non-Entrys. */
+ /* A common getter interface for `Entry`s and non-`Entry`s. */
return this[key];
},
@@ -653,7 +653,7 @@ YUI.add('lp.client', function(Y) {
};
module.Entry.prototype.lookup_value = function(key) {
- /* A common getter interface between Entrys and non-Entrys. */
+ /* A common getter interface between `Entry`s and non-`Entry`s. */
return this.get(key);
};
diff --git a/lib/lp/app/javascript/overlay/tests/test_overlay.js b/lib/lp/app/javascript/overlay/tests/test_overlay.js
index 3617948..07f161d 100644
--- a/lib/lp/app/javascript/overlay/tests/test_overlay.js
+++ b/lib/lp/app/javascript/overlay/tests/test_overlay.js
@@ -79,7 +79,7 @@ YUI.add('lp.overlay.test', function (Y) {
test_overlay_can_show_progressbar: function() {
this.overlay = new Y.lp.ui.PrettyOverlay({
- 'headerContent': 'bu bu bu'
+ 'headerContent': 'blah blah blah'
});
var bb = this.overlay.get('boundingBox');
this.overlay.render();
diff --git a/lib/lp/code/javascript/branchmergeproposal.inlinecomments.js b/lib/lp/code/javascript/branchmergeproposal.inlinecomments.js
index bcc5e24..2eb96af 100644
--- a/lib/lp/code/javascript/branchmergeproposal.inlinecomments.js
+++ b/lib/lp/code/javascript/branchmergeproposal.inlinecomments.js
@@ -771,7 +771,7 @@ namespace.get_headers = function() {
namespace.set_comments = function(headers) {
var i;
delete namespace.comment_idx;
- // Set first and last comment indicies, allowing for nav fallthough.
+ // Set first and last comment indices, allowing for nav fallthough.
for (i = 0; i < headers.length; i++) {
if (!namespace.comment_idx
&& namespace.header_has_type(headers[i], 'comment')) {
diff --git a/lib/lp/code/javascript/tests/test_branchmergeproposal.inlinecomments.js b/lib/lp/code/javascript/tests/test_branchmergeproposal.inlinecomments.js
index 843b10a..fb7368b 100644
--- a/lib/lp/code/javascript/tests/test_branchmergeproposal.inlinecomments.js
+++ b/lib/lp/code/javascript/tests/test_branchmergeproposal.inlinecomments.js
@@ -155,14 +155,14 @@ YUI.add('lp.code.branchmergeproposal.inlinecomments.test', function (Y) {
Y.Assert.areEqual(
'Go!', ic_area.one('.yui3-editable_text-text').get('text'));
- // Removing a draft comment by submitting an emtpy text.
+ // Removing a draft comment by submitting an empty text.
line.simulate('dblclick');
ic_area = line.next();
ic_area.one('.yui3-ieditor-input>textarea').set('value', '');
ic_area.one('.lazr-pos').simulate('click');
// LP is hit again and the previous comment is removed,
- // the next row diplayed is the next diff line.
+ // the next row displayed is the next diff line.
Y.Assert.areEqual(2, mockio.requests.length);
Y.Assert.isNull(Y.one('#comments-diff-line-1 .draft'));
Y.Assert.areEqual('diff-line-2', line.next().get('id'));
diff --git a/lib/lp/registry/javascript/distroseries/initseries.js b/lib/lp/registry/javascript/distroseries/initseries.js
index b845e0c..a73d8bc 100644
--- a/lib/lp/registry/javascript/distroseries/initseries.js
+++ b/lib/lp/registry/javascript/distroseries/initseries.js
@@ -89,7 +89,7 @@ Y.extend(DeriveDistroSeriesActionsWidget, formwidgets.FormActionsWidget, {
var arch_indep_choice = this.architectureIndepChoice.get(
'choice').value;
if (arch_indep_choice === this.architectureIndepChoice.AUTOSELECT) {
- // If no arch indep arch tag has been explicitely selected
+ // If no arch indep arch tag has been explicitly selected,
// check that one from the parents' is present among the selected
// architectures.
if (!this.architectureChoice.validate_arch_indep()) {
diff --git a/lib/lp/registry/javascript/distroseriesdifferences_details.js b/lib/lp/registry/javascript/distroseriesdifferences_details.js
index f007fec..10b0610 100644
--- a/lib/lp/registry/javascript/distroseriesdifferences_details.js
+++ b/lib/lp/registry/javascript/distroseriesdifferences_details.js
@@ -688,14 +688,14 @@ namespace.add_link_to_package_diff = function(container, url_uri) {
};
/**
-* Polling intervall for checking package diff's status.
+* Polling interval for checking package diff's status.
*/
namespace.poll_interval = 30000;
/**
* Attach package diff status poller.
*
-* This method attachs a poller to the container to check
+* This method attaches a poller to the container to check
* the package diff object's status.
*
* @param container {Node} The container node displaying this package
diff --git a/lib/lp/registry/javascript/product_views.js b/lib/lp/registry/javascript/product_views.js
index 03c1044..bd35ec6 100644
--- a/lib/lp/registry/javascript/product_views.js
+++ b/lib/lp/registry/javascript/product_views.js
@@ -47,7 +47,7 @@ YUI.add('registry.product-views', function (Y) {
};
/**
- * Update the visiblity and settings of the license field based on the
+ * Update the visibility and settings of the license field based on the
* value of the information type.
*
* @function toggle_license_field
diff --git a/lib/lp/registry/javascript/structural-subscription.js b/lib/lp/registry/javascript/structural-subscription.js
index 52b06aa..dcbfc3f 100644
--- a/lib/lp/registry/javascript/structural-subscription.js
+++ b/lib/lp/registry/javascript/structural-subscription.js
@@ -931,7 +931,7 @@ function setup_client() {
} // setup_client
/**
- * External entry point for configuring the structual subscription.
+ * External entry point for configuring the structural subscription.
* @method setup_bug_subscriptions
* @param {Object} config Object literal of config name/value pairs.
* config.content_box is the name of an element on the page where
@@ -1840,7 +1840,7 @@ function make_add_subscription_success_handler(config) {
// We're creating an informational message box.
.addClass('informational')
.addClass('message')
- // The box needs to be a little wider to accomodate the
+ // The box needs to be a little wider to accommodate the
// wordy subscription description.
.setStyle('width', '50em')
.append(header)
diff --git a/lib/lp/registry/javascript/team.js b/lib/lp/registry/javascript/team.js
index 33ed058..65b64bb 100644
--- a/lib/lp/registry/javascript/team.js
+++ b/lib/lp/registry/javascript/team.js
@@ -227,7 +227,7 @@ module.visibility_changed = function(visibility) {
* Setup javascript for team adding/editing.
*/
module.initialise_team_edit = function() {
- // If no visibility widget, then bale.
+ // If no visibility widget, then bail.
var visibility_widget = Y.one("[name='field.visibility']");
if (!Y.Lang.isValue(visibility_widget)) {
return;
diff --git a/lib/lp/registry/javascript/tests/test_distroseriesdifferences_details.js b/lib/lp/registry/javascript/tests/test_distroseriesdifferences_details.js
index 21c174b..341b3b0 100644
--- a/lib/lp/registry/javascript/tests/test_distroseriesdifferences_details.js
+++ b/lib/lp/registry/javascript/tests/test_distroseriesdifferences_details.js
@@ -18,7 +18,7 @@ YUI.add('lp.registry.distroseriesdifferences_details.test', function (Y) {
* @param derived_version {String} The version for the package in the
* derived series.
* @missing_row {Boolean} If false, generate a row of the
- * +localpackagediffs page, if true, generate a row of te
+ * +localpackagediffs page, if true, generate a row of the
* +missingpackages page.
*/
var create_row = function(package_name, parent_version, derived_version,
diff --git a/lib/lp/registry/javascript/timeline.js b/lib/lp/registry/javascript/timeline.js
index dd892fe..c7cb0e3 100644
--- a/lib/lp/registry/javascript/timeline.js
+++ b/lib/lp/registry/javascript/timeline.js
@@ -316,7 +316,7 @@ ProjectLine.prototype = {
/**
* Instantiate each SeriesLine object and place it at the
* correct point on the slanted vertical line. The series aren't
- * actuall drawn yet, since we need to loop through these objects
+ * actually drawn yet, since we need to loop through these objects
* to calculate the landmark_spacing.
*
* @method initSeries
diff --git a/lib/lp/testing/tests/test_yuixhr_fixture.js b/lib/lp/testing/tests/test_yuixhr_fixture.js
index 73757aa..cfb9d40 100644
--- a/lib/lp/testing/tests/test_yuixhr_fixture.js
+++ b/lib/lp/testing/tests/test_yuixhr_fixture.js
@@ -2,7 +2,7 @@ YUI.add('lp.testing.tests.test_yuixhr_fixture', function (Y) {
var module = Y.lp.testing.serverfixture;
/**
- * Test setup and teardown of yuixhr fixtures, and the asociated JS module.
+ * Test setup and teardown of yuixhr fixtures, and the associated JS module.
*/
var tests = Y.namespace('lp.testing.tests.test_yuixhr_fixture');
tests.suite = new Y.Test.Suite('lp.testing.yuixhr Tests');
diff --git a/lib/lp/translations/javascript/pofile.js b/lib/lp/translations/javascript/pofile.js
index 6ba6e5a..73981c0 100644
--- a/lib/lp/translations/javascript/pofile.js
+++ b/lib/lp/translations/javascript/pofile.js
@@ -126,7 +126,7 @@ var WORKING_MODE_TRANSLATOR = "translator";
/*
* This function is sanitizing the WORKING_MODE_COOKIE and in case it contains
- * unknow values, we play it safe by returning WORKING_MODE_REVIEWER, which
+ * unknown values, we play it safe by returning WORKING_MODE_REVIEWER, which
* is the default mode.
*/
var getWorkingMode = function () {
@@ -610,8 +610,8 @@ var initializeReviewDivergeMutualExclusion = function (fields) {
*/
var initializeKeyBindings = function(e) {
if (translations_order.length < 1) {
- // If no translations fiels are displayed on the page
- // don't initialize the translations order
+ // If no translations fields are displayed on the page,
+ // don't initialize the translations order.
return;
}
@@ -625,7 +625,7 @@ var initializeKeyBindings = function(e) {
};
/*
- * Controls the behaviour for reseting current translations
+ * Controls the behaviour for resetting current translations
*/
var resetTranslation = function (event, translation_id) {
if (this === null) {
diff --git a/lib/lp/translations/javascript/tests/test_importqueue.js b/lib/lp/translations/javascript/tests/test_importqueue.js
index 302bf95..d20efc4 100644
--- a/lib/lp/translations/javascript/tests/test_importqueue.js
+++ b/lib/lp/translations/javascript/tests/test_importqueue.js
@@ -9,7 +9,7 @@ var namespace = Y.lp.translations.importqueue;
var make_choice_confs = function() {
- // Make generic confs fot testing. The test can change these as needed.
+ // Make generic confs for testing. The test can change these as needed.
var confs = [];
var values = ['Imported', 'Imported'];
var statuses = ['Approved', 'Imported'];
diff --git a/lib/lp/translations/javascript/tests/test_poexport.js b/lib/lp/translations/javascript/tests/test_poexport.js
index 1cb2ddd..0283e8a 100644
--- a/lib/lp/translations/javascript/tests/test_poexport.js
+++ b/lib/lp/translations/javascript/tests/test_poexport.js
@@ -22,7 +22,7 @@ YUI.add('lp.translations.poexport.test', function (Y) {
},
test_initialize_pofile_export_without_pochanged: function() {
- // The change handler was not added if the checbox does not exist.
+ // The change handler was not added if the checkbox does not exist.
var pochanged = Y.one('#div_pochanged');
pochanged.get('parentNode').removeChild(pochanged);
var handler_added = namespace.initialize_pofile_export_page();