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
run: |
pip install -r requirements.lock
sudo apt install -y gettext
- name: Run Tests
env:
NEODB_DB_URL: postgres://testuser:testpass@127.0.0.1/test_neodb
@ -53,4 +54,5 @@ jobs:
NEODB_SECRET_KEY: test
NEODB_LANGUAGE: zh-hans
run: |
python manage.py compilemessages -i .venv -l zh_Hans
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:
- `SECRET_KEY` must use your own, back it up well somewhere
- `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)
- `MASTODON_CLIENT_SCOPE` change it later may invalidate app token granted previously
- `ADMIN_URL` admin page url, keep it private
- `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
absolutely set these before start the instance for the first time:
- NEODB_SECRET_KEY - 50 characters of random string, no white space
- NEODB_SITE_NAME - the name of your site
- NEODB_SITE_DOMAIN - the domain name of your site
`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

View file

@ -111,8 +111,8 @@ Update translations:
```
django-admin makemessages --no-wrap --no-obsolete -i neodb-takahe -a
# 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 compilemessages
django-admin makemessages --no-wrap --no-obsolete -i .venv -i neodb-takahe -a
django-admin compilemessages -i .venv -i neodb-takahe
```
Development in Docker Compose