fix unit test to actually use specified locale

This commit is contained in:
Henri Dickson 2024-06-05 09:23:11 -04:00
parent 9e75c6267f
commit 0cad828d16
3 changed files with 16 additions and 9 deletions

View file

@ -43,6 +43,7 @@ jobs:
- name: Install Dependencies - name: Install Dependencies
run: | run: |
pip install -r requirements.lock pip install -r requirements.lock
sudo apt install -y gettext
- name: Run Tests - name: Run Tests
env: env:
NEODB_DB_URL: postgres://testuser:testpass@127.0.0.1/test_neodb NEODB_DB_URL: postgres://testuser:testpass@127.0.0.1/test_neodb
@ -53,4 +54,5 @@ jobs:
NEODB_SECRET_KEY: test NEODB_SECRET_KEY: test
NEODB_LANGUAGE: zh-hans NEODB_LANGUAGE: zh-hans
run: | run: |
python manage.py compilemessages -i .venv -l zh_Hans
python manage.py test python manage.py test

View file

@ -6,13 +6,18 @@ Settings you may want to change
------------------------------- -------------------------------
most settings resides in `settings.py`, a few notable ones: most settings resides in `settings.py`, a few notable ones:
- `SECRET_KEY` must use your own, back it up well somewhere absolutely set these before start the instance for the first time:
- `SITE_INFO` change by you need
- `MASTODON_ALLOW_ANY_SITE` set to `True` so that user can login via any Mastodon API compatible sites (e.g. Mastodon/Pleroma) - NEODB_SECRET_KEY - 50 characters of random string, no white space
- `MASTODON_CLIENT_SCOPE` change it later may invalidate app token granted previously - NEODB_SITE_NAME - the name of your site
- `ADMIN_URL` admin page url, keep it private - NEODB_SITE_DOMAIN - the domain name of your site
- `SEARCH_BACKEND` should be ~~either~~ `TYPESENSE` ~~or `MEILISEARCH`~~ so that search and index can function. `None` will use default database search, which is for development only and may gets deprecated soon.
- `MEILISEARCH` support is removed due to lack of usage, feel free to PR if you want to `NEODB_SECRET_KEY` and `NEODB_SITE_DOMAIN` must not be changed later.
if you are doing debug or development:
- NEODB_DEBUG - True will turn on debug for both neodb and takahe, turn off relay, and reveal self as debug mode in nodeinfo (so peers won't try to run fedi search on you)
- NEODB_IMAGE - the docker image to use, `neodb/neodb:edge` for the main branch
Settings for Scrapers Settings for Scrapers

View file

@ -111,8 +111,8 @@ Update translations:
``` ```
django-admin makemessages --no-wrap --no-obsolete -i neodb-takahe -a django-admin makemessages --no-wrap --no-obsolete -i neodb-takahe -a
# edit .po files, run the following to make sure edits are correct # edit .po files, run the following to make sure edits are correct
django-admin makemessages --no-wrap --no-obsolete -i neodb-takahe -a django-admin makemessages --no-wrap --no-obsolete -i .venv -i neodb-takahe -a
django-admin compilemessages django-admin compilemessages -i .venv -i neodb-takahe
``` ```
Development in Docker Compose Development in Docker Compose