added translations
This commit is contained in:
@@ -91,3 +91,17 @@ Django settings override environment variables with the same names. `VITE_BASE_U
|
||||
- **Browser cannot reach HMR:** set `VITE_DEV_SERVER_URL` to the browser-reachable Vite address, and use matching `VITE_HOST`/`VITE_PORT`. For containers or remote browsers this is often `0.0.0.0` for the host plus a public hostname for the URL.
|
||||
- **A page fails in development:** set `VITE_USE_DEV_SERVER=true` only while `npm run vite` or `npm run dev` is running.
|
||||
- **Assets return 404 after deployment:** rerun both the build and `collectstatic`; ensure the web server serves `STATIC_ROOT` at `STATIC_URL`.
|
||||
|
||||
## Interface translations
|
||||
|
||||
English text in templates and Python is the source language. Dutch translations live in `locale/nl/LC_MESSAGES/django.po`; the compiled `django.mo` is used at runtime. Logged-in users choose their language at `/settings/`. Visitors use the language switcher in the public navigation, which saves Django's standard language cookie. URLs and stored status or source codes do not change with the language.
|
||||
|
||||
Update translations after changing user-facing source text:
|
||||
|
||||
```bash
|
||||
python manage.py makemessages -l nl --ignore=node_modules --ignore=staticfiles --ignore='*.orig'
|
||||
# Edit locale/nl/LC_MESSAGES/django.po
|
||||
python manage.py compilemessages
|
||||
```
|
||||
|
||||
The small amount of JavaScript UI text is translated by Django in `templates/js_translations.html` and read from `window.BOOMCAST_I18N`. After changing JavaScript, run `npm run build` and `python manage.py collectstatic --noinput` for production. Classifier class names, API keys, sensor tokens, H3 values and stored source/status values remain language-neutral.
|
||||
|
||||
Reference in New Issue
Block a user