Skip to content

Commit

Permalink
Fix missing space in ru translation (#245)
Browse files Browse the repository at this point in the history
* Fix missing space in translation
* fix ruff linting

Co-authored-by: Dan Braghiș <31622+zerolab@users.noreply.github.com>
  • Loading branch information
ACK1D and zerolab authored Jul 25, 2024
1 parent bdf0f29 commit ca561b6
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 7 deletions.
1 change: 1 addition & 0 deletions .github/report_nightly_build_failure.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
This reports an error to the #nightly-build-failures Slack channel.
"""

import os

import requests
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ruff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ jobs:
steps:
- uses: actions/checkout@v4

- run: python -Im pip install --user ruff
- run: python -Im pip install --user ruff==0.5.4

- name: Run ruff
working-directory: ./src
run: ruff --output-format=github wagtailmedia
run: ruff check --output-format=github wagtailmedia
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.2.0'
rev: 'v0.5.4'
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand Down
2 changes: 1 addition & 1 deletion src/wagtailmedia/locale/ru/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ msgstr[0] ""
"<span>%(total)s</span> Медиафайл <span class=\"visuallyhidden w-sr-only\"> "
"создан на %(site_name)s</span>"
msgstr[1] ""
"<span>%(total)s</span> Медиафайлы <span class=\"visuallyhiddenw-sr-only\"> "
"<span>%(total)s</span> Медиафайлы <span class=\"visuallyhidden w-sr-only\"> "
"созданы на %(site_name)s</span>"

#: src/wagtailmedia/templates/wagtailmedia/media/_file_field.html:4
Expand Down
1 change: 1 addition & 0 deletions src/wagtailmedia/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
This module provides the `wagtailmedia_settings` object, that is used to access
the settings. It checks for user settings first, with fallback to defaults.
"""

import warnings

from django.conf import settings
Expand Down
2 changes: 1 addition & 1 deletion tests/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
CACHES = {
"default": {
"BACKEND": "redis_cache.RedisCache",
"LOCATION": "localhost:%s" % REDIS_PORT,
"LOCATION": f"localhost:{REDIS_PORT}",
},
}
else:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def test_basic(self):
media = Media.objects.get(pk=item["id"])
# Check download_url
self.assertEqual(
item["meta"]["download_url"], "http://localhost/media/%s" % media.file
item["meta"]["download_url"], f"http://localhost/media/{media.file}"
)

self.assertEqual(item["media_type"], media.type)
Expand Down
2 changes: 1 addition & 1 deletion tests/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
path("", include(wagtail_urls)),
] + [
path(
"%s<path:path>" % prefix.lstrip("/"),
f"{prefix.lstrip('/')}<path:path>",
serve,
kwargs={"document_root": document_root},
)
Expand Down

0 comments on commit ca561b6

Please sign in to comment.