-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Description
⚠️ This issue respects the following points: ⚠️
- This is a bug, not a question or a configuration/webserver/proxy issue.
- This issue is not already reported on Github (I've searched it).
- I agree to follow Monica's Code of Conduct.
Bug description
When running the Docker container with a browser locale set to en-US (English - United States), specific pages (such as the "Add Contact" page) fail to render form fields correctly. The browser console displays a 404 Not Found error for /lang/en-US.json. This happens because while en.json exists, the specific en-US.json file is not generated or copied during the Docker build process, causing the frontend to crash or render incompletely when it attempts to load that specific locale.
Steps to reproduce
- Run the official Monica Docker image.
- Set your browser's preferred language to en-US.
- Log in and navigate to the Add Contact page.
- Observe that the form fields are empty or missing labels.
- Open the browser developer tools (Console/Network tab) and observe a 404 error for the request to /lang/en-US.json
Expected behavior
The application should correctly load the English translations for en-US users (falling back to or using en.json content), and the forms should render with all fields visible and labeled.
Environment
Your own self-hosted instance (v5 a.k.a chandler version or main branch)
Version of Monica
v5.0.0-beta.5
Installation method
Docker image
Web server
Apache
Database engine version
MariaDB
Additional info
I have verified that the issue is caused by the missing en-US.json file in the final Docker image.
A proposed fix is to explicitly copy en.json to en-US.json during the Docker build process. I have tested this locally by modifying scripts/docker/Dockerfile and scripts/docker/Dockerfile-fpm, which resolved the issue. Should I submit a PR?