feat: make UI strings localisable via LOCALE environment variable

Agent-Logs-Url: https://github.com/wasi-master/13ft/sessions/3b6e6061-c4d2-4aa1-879b-8526ccd3b1db

Co-authored-by: wasi-master <63045920+wasi-master@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-05-11 18:41:32 +00:00
committed by GitHub
co-authored by wasi-master
parent b6b831f156
commit e7669b7e08
5 changed files with 221 additions and 47 deletions
+22
View File
@@ -166,6 +166,28 @@ WantedBy=multi-user.target
</VirtualHost>
```
## Localisation
The UI strings can be localised by setting the `LOCALE` environment variable before starting the app. Locale files live in `/home/runner/work/13ft/13ft/app/locales/<locale>.json`.
Built-in locales:
- `en` (default)
- `de`
- `fr`
Examples:
```sh
# from /home/runner/work/13ft/13ft/app
LOCALE=de python portable.py
# or with gunicorn
LOCALE=fr python -m gunicorn 'portable:app'
```
To add a new locale, copy `/home/runner/work/13ft/13ft/app/locales/en.json` to a new file such as `/home/runner/work/13ft/13ft/app/locales/es.json` and translate the values.
## Screenshots
### Step 1