Skip to content

Commit

Permalink
Replace ugettext with gettext (#447)
Browse files Browse the repository at this point in the history
* Replaced `ugettext_lazy` with `gettext_lazy` and added coveralls action step

* Removed coveralls as I don't have necessary repo access for secrets

* Added coverage as the means for testing

* Added coverage as the means for testing
  • Loading branch information
marksweb committed Jun 21, 2021
1 parent 1613d3f commit 407bcad
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 15 deletions.
14 changes: 14 additions & 0 deletions .editorconfig
@@ -0,0 +1,14 @@
# http://editorconfig.org

root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 4

[*.py]
max_line_length = 120
28 changes: 15 additions & 13 deletions .github/workflows/test.yml
Expand Up @@ -20,17 +20,19 @@ jobs:
]

steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements/optional.txt
pip install -r requirements/${{ matrix.requirements-file }}
python setup.py install
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements/optional.txt
pip install -r requirements/${{ matrix.requirements-file }}
python setup.py install
- name: Run tests
run: python manage.py test
- name: Run tests
run: |
coverage run --source=explorer manage.py test
coverage report
2 changes: 1 addition & 1 deletion explorer/apps.py
@@ -1,7 +1,7 @@
from django.apps import AppConfig
from django.core.exceptions import ImproperlyConfigured
from django.db import connections as djcs
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _


class ExplorerAppConfig(AppConfig):
Expand Down
2 changes: 1 addition & 1 deletion explorer/models.py
Expand Up @@ -4,7 +4,7 @@
from django.conf import settings
from django.db import models, DatabaseError, transaction
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _

from explorer import app_settings
from explorer.utils import (
Expand Down
1 change: 1 addition & 0 deletions requirements/base.txt
@@ -1,2 +1,3 @@
Django>=2.2.14
sqlparse>=0.4.0
coverage

0 comments on commit 407bcad

Please sign in to comment.