Skip to content

Commit 0518b35

Browse files
ApurveKaranwalnemesifier
authored andcommitted
[chores] Fixed spelling mistakes and typos #1398
Closes #1398
1 parent e0ee749 commit 0518b35

19 files changed

Lines changed: 32 additions & 32 deletions

File tree

openwisp_controller/config/static/config/js/lib/advanced-mode.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10893,7 +10893,7 @@
1089310893

1089410894
var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;
1089510895
while (true) {
10896-
// retreive state number from top of stack
10896+
// retrieve state number from top of stack
1089710897
state = stack[stack.length - 1];
1089810898

1089910899
// use default actions if available

openwisp_controller/config/templates/admin/config/device/change_form.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
the change form.
1818

1919
We utilize a distinct form element (id="act_deact_device_form")
20-
specifically for these actions. The form attribute of the submit buttons (Acivate/Deactivate)
20+
specifically for these actions. The form attribute of the submit buttons (Activate/Deactivate)
2121
within the submit-row div references this form. By doing so, we ensure that
2222
these actions can be submitted independently without causing any
2323
disruption to the device form.

openwisp_controller/config/tests/test_admin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1317,7 +1317,7 @@ def test_variable_usage(self):
13171317

13181318
def test_preview_device_config_empty_id(self):
13191319
path = reverse(f"admin:{self.app_label}_device_preview")
1320-
config = json.dumps({"general": {"descripion": "id: {{ id }}"}})
1320+
config = json.dumps({"general": {"description": "id: {{ id }}"}})
13211321
data = {
13221322
"id": "",
13231323
"name": "test-empty-id",

openwisp_controller/config/tests/test_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def test_backend_openwrt_different_versions(self):
111111
self.assertIsInstance(c.backend_instance, OpenWrt)
112112
self.assertEqual(c.backend_instance.dsa, True)
113113

114-
with self.subTest("DSA disabed OpenWrt Firmware"):
114+
with self.subTest("DSA disabled OpenWrt Firmware"):
115115
c = Config(
116116
backend="netjsonconfig.OpenWrt",
117117
device=Device(name="test", os="OpenWrt 19.02.2 r16495-bf0c965af0"),

openwisp_controller/config/tests/test_selenium.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ def test_change_config_backend(self):
280280
)
281281
self.hide_loading_overlay()
282282
self.find_element(by=By.XPATH, value=f'//*[@value="{template.id}"]')
283-
# Change config backed to
283+
# Change config backend to
284284
config_backend_select = Select(
285285
self.find_element(by=By.NAME, value="config-0-backend")
286286
)
@@ -302,7 +302,7 @@ def test_force_delete_device_with_deactivating_config(self):
302302
# The webpage has two "submit-row" sections, each containing a "Deactivate"
303303
# button. The first (top) "Deactivate" button is hidden, causing
304304
# `wait_for_visibility` to fail. To avoid this issue, we use
305-
# `wait_for='presence'` instead, ensuring we locat the elements regardless
305+
# `wait_for='presence'` instead, ensuring we locate the elements regardless
306306
# of visibility. We then select the last (visible) button and click it.
307307
self.find_elements(
308308
by=By.CSS_SELECTOR,
@@ -327,7 +327,7 @@ def test_force_delete_device_with_deactivating_config(self):
327327
By.CSS_SELECTOR, "#deactivating-warning .messagelist .warning p"
328328
)
329329
self.find_element(by=By.CSS_SELECTOR, value="#warning-ack").click()
330-
# After accepting the warning, wee need to wait for the animation
330+
# After accepting the warning, we need to wait for the animation
331331
# to complete before trying to interact with the button,
332332
# otherwise the test may fail due to the button not being fully
333333
# visible or clickable yet.
@@ -364,7 +364,7 @@ def test_force_delete_multiple_devices_with_deactivating_config(self):
364364
By.CSS_SELECTOR, "#deactivating-warning .messagelist .warning p"
365365
)
366366
self.find_element(by=By.CSS_SELECTOR, value="#warning-ack").click()
367-
# After accepting the warning, wee need to wait for the animation
367+
# After accepting the warning, we need to wait for the animation
368368
# to complete before trying to interact with the button,
369369
# otherwise the test may fail due to the button not being fully
370370
# visible or clickable yet.
@@ -380,7 +380,7 @@ def test_add_remove_templates(self):
380380
config = self._create_config(organization=self._get_org())
381381
device = config.device
382382
self.login()
383-
# some times the url fetching in js gives unauthorized error
383+
# sometimes the url fetching in js gives unauthorized error
384384
# so we add a wait to allow login to complete
385385
time.sleep(2)
386386

openwisp_controller/config/tests/test_views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ def test_get_default_values_authorization(self):
305305

306306
def test_get_default_values_same_keys(self):
307307
self._login()
308-
# Atleast 4 templates are required to create enough entropy in database
308+
# At least 4 templates are required to create enough entropy in database
309309
# to make the test fail consistently without patch
310310
template1 = self._create_template(name="VNI 1", default_values={"vn1": "1"})
311311
template2 = self._create_template(

openwisp_controller/config/whois/tests/tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1178,7 +1178,7 @@ class TestWHOISSelenium(CreateWHOISMixin, SeleniumTestMixin, StaticLiveServerTes
11781178
def test_whois_device_admin(self):
11791179
def _assert_no_js_errors():
11801180
browser_logs = []
1181-
for log in self.get_browser_logs():
1181+
for log in self.get_browser_logs() or []:
11821182
if self.browser == "chrome" and log["source"] != "console-api":
11831183
continue
11841184
elif log["message"] in ["wrong event specified: touchleave"]:

openwisp_controller/connection/base/models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ class AbstractCredentials(ConnectorMixin, ShareableOrgMixinUniqueName, BaseModel
107107
"""
108108

109109
# Controls the number of objects which can be stored in memory
110-
# before commiting them to database during bulk auto add operation.
110+
# before committing them to database during bulk auto add operation.
111111
chunk_size = 1000
112112

113113
connector = models.CharField(
@@ -564,7 +564,7 @@ def _save_without_resurrecting(self):
564564

565565
def _schedule_command(self):
566566
"""
567-
executes ``launch_command`` celery taks in the background
567+
executes ``launch_command`` celery tasks in the background
568568
once changes are committed to the database
569569
"""
570570
transaction.on_commit(lambda: launch_command.delay(self.pk))

openwisp_controller/connection/commands.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
"title": _("Confirm Password"),
5959
},
6060
},
61-
"message": _("Your password must be atleast 6 characters long"),
61+
"message": _("Your password must be at least 6 characters long"),
6262
"additionalProperties": False,
6363
"definitions": {
6464
"password_regex": {

openwisp_controller/connection/connectors/openwrt/ssh.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class OpenWrt(Ssh):
1111
def update_config(self):
1212
try:
1313
output, exit_code = self.exec_command(
14-
# "openwisp_config" for backword compatibility
14+
# "openwisp_config" for backward compatibility
1515
"(openwisp-config --version || openwisp_config --version) 2>/dev/null"
1616
)
1717
except Exception as error:

0 commit comments

Comments
 (0)