Skip to content

Commit 757da80

Browse files
committed
chore: apply codespell suggestions
Once codespell-project/codespell#2400 is releases we should annotate all remaining strings and include codespell in pre-commit.
1 parent 864f164 commit 757da80

File tree

21 files changed

+31
-30
lines changed

21 files changed

+31
-30
lines changed

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,8 @@ Twitter = "https://twitter.com/WeblateOrg"
195195
target-version = ['py310']
196196

197197
[tool.codespell]
198-
skip = '*.po,*.pot,*.json,*.tmx,*.tbx,yarn.lock,known_hosts'
198+
count = true
199+
skip = '*.po,*.pot,*.json,*.tmx,*.tbx,*.csv,yarn.lock,known_hosts,*/vendor/*'
199200

200201
[tool.django-stubs]
201202
django_settings_module = "weblate.settings_example"

weblate/accounts/forms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ class CommitForm(ProfileBaseForm):
181181
label=gettext_lazy("Commit e-mail"),
182182
choices=[("", gettext_lazy("Use account e-mail address"))],
183183
help_text=gettext_lazy(
184-
"Used in version control commits. The address will stay in the repository forever once changes are commited by Weblate."
184+
"Used in version control commits. The address will stay in the repository forever once changes are committed by Weblate."
185185
),
186186
required=False,
187187
widget=forms.RadioSelect,

weblate/accounts/migrations/0001_squashed_weblate_5.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ class Migration(migrations.Migration):
425425
),
426426
("LockNotification", "Component was locked or unlocked"),
427427
("LicenseNotification", "License was changed"),
428-
("ParseErrorNotification", "Parse error occured"),
428+
("ParseErrorNotification", "Parse error occurred"),
429429
(
430430
"NewStringNotificaton",
431431
"New string is available for translation",

weblate/accounts/notifications.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ class LicenseNotification(Notification):
477477
@register_notification
478478
class ParseErrorNotification(Notification):
479479
actions = (Change.ACTION_PARSE_ERROR,)
480-
verbose = pgettext_lazy("Notification name", "Parse error occured")
480+
verbose = pgettext_lazy("Notification name", "Parse error occurred")
481481
template_name = "parse_error"
482482

483483
def get_context(

weblate/auth/management/commands/createadmin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def handle(self, *args, **options) -> None:
6666
else:
6767
for user in matching_users:
6868
self.stderr.write(
69-
f"Found maching user: username={user.username} email={user.email}"
69+
f"Found matching user: username={user.username} email={user.email}"
7070
)
7171
raise CommandError("Multiple users matched given parameters!")
7272

weblate/checks/fluent/inner_html.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ def _parse_end_tag(
620620
"""Parse an end tag, starting after the "</"."""
621621
end_tag_match = source.match(cls._END_TAG_REGEX)
622622
if not end_tag_match:
623-
# May correspond to using a non-ASCII alpha-numeric value in the tag
623+
# May correspond to using a non-ASCII alphanumeric value in the tag
624624
# name, which whilst technically allowed for HTML, is not allowed by
625625
# this check.
626626
#

weblate/checks/tests/test_chars_checks.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,14 @@ def setUp(self) -> None:
9696
def test_arabic(self) -> None:
9797
self.assertTrue(
9898
self.check.check_target(
99-
["<unusued singular (hash=…)>", "Lorem ipsum dolor sit amet."],
99+
["<unused singular (hash=…)>", "Lorem ipsum dolor sit amet."],
100100
["zero", "one", "two", "few", "many", "other"],
101101
MockUnit(code="ar"),
102102
)
103103
)
104104
self.assertFalse(
105105
self.check.check_target(
106-
["<unusued singular (hash=…)>", "Lorem ipsum dolor sit amet."],
106+
["<unused singular (hash=…)>", "Lorem ipsum dolor sit amet."],
107107
["zero.", "one", "two.", "few.", "many.", "other."],
108108
MockUnit(code="ar"),
109109
)
@@ -114,14 +114,14 @@ def test_japanese(self) -> None:
114114
self.do_test(True, ("Text:", "Text", ""), "ja")
115115
self.assertTrue(
116116
self.check.check_target(
117-
["<unusued singular (hash=…)>", "English."],
117+
["<unused singular (hash=…)>", "English."],
118118
["Japanese…"],
119119
MockUnit(code="ja"),
120120
)
121121
)
122122
self.assertFalse(
123123
self.check.check_target(
124-
["<unusued singular (hash=…)>", "English."],
124+
["<unused singular (hash=…)>", "English."],
125125
["Japanese。"],
126126
MockUnit(code="ja"),
127127
)

weblate/gitexport/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ def get_response(self):
226226
if "status" in message:
227227
return HttpResponse(status=int(message["status"].split()[0]))
228228

229-
# Send streaming content as reponse
229+
# Send streaming content as response
230230
return StreamingHttpResponse(
231231
streaming_content=self.stream(), content_type=message["content-type"]
232232
)

weblate/lang/models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -996,11 +996,11 @@ def map_units(self, units) -> None:
996996
def zip(self, sources, targets, unit):
997997
if len(sources) != self.source_plural.number:
998998
raise ValueError(
999-
"length of `sources` does't match the number of source plurals"
999+
"length of `sources` doesn't match the number of source plurals"
10001000
)
10011001
if len(targets) != self.target_plural.number:
10021002
raise ValueError(
1003-
"length of `targets` does't match the number of target plurals"
1003+
"length of `targets` doesn't match the number of target plurals"
10041004
)
10051005
if self.same_plurals:
10061006
return zip(sources, targets, strict=True)

weblate/machinery/dummy.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class DummyTranslation(MachineTranslation):
1212

1313
def download_languages(self):
1414
"""
15-
List supported languges.
15+
List supported languages.
1616
1717
Dummy translation supports just Czech language.
1818
"""
@@ -28,7 +28,7 @@ def download_translations(
2828
threshold: int = 75,
2929
) -> DownloadTranslations:
3030
"""
31-
Donwload translations.
31+
Download translations.
3232
3333
Dummy translation supports just few phrases.
3434
"""

0 commit comments

Comments
 (0)