Will create Docker images based on HCW applications with custom translations, enabling HCW applications to be used in various contexts beyond health.
The main i18n changes are:
consultation
replaced bysession
patient
replaced byservice user
Images generated by this GitHub project can be used directly. See https://github.com/orgs/icrc/packages?repo_name=hcw-i18n
To provide custom translations, fork this repository and modify the <lang>.override.json
files.
for each project, there is a folder named assets/i18n-override
containing <lang>.json
and <lang>json.orig
files.
<lang>json.orig
contains translations provided by HCW<lang>.json
contains modified translations provided by this project
The json.orig file is maintained for informational purposes and to allow comparison between the original translations and custom ones.
For instance for the patient interface, translations are in the folder ./patient/assets/i18n-override and you can compare en.json
with en.json.orig
to see the modifications
- Change HCW versions in
.env
- update translations by running the script
update-i18n-resources.sh
- Do a PR to this repository
The script update-i18n-resources.sh
will update json files in the folders <service>/assets/i18n-override
.
Existing customization won't be overwritten and and only unused translations will be removed.
These files will be used by weblate hosted by iabsis.
- Go to https://translate.iabsis.com to create an account if needed.
- Then contact us to have access to https://translate.iabsis.com/projects/icrc/
to download all translations in a zip file, use the main menu
Files
from this URL.
- Go to hcw-i18n/actions
- Select Publish HCW Docker images
- Click on
Run workflow
on the right ( choosemain
branch).
To test translations, all application can be started locally.
By default, the backend is configured to start in development mode, allowing the content of sent emails and SMS to be printed to the backend sysout. To check these messages, please display the backend logs with docker compose logs -f backend
Create the secrets.env file by copying secrets.env.default, then generate and add passwords in the new file.
Run: docker compose up -d
See https://docs.hcw-at-home.com/users/ for all documentation.
Main steps:
docker compose exec -ti mongo mongosh
Then:
use hcw-athome
and run this query after having replaced the relevant info:
db.user.insertOne({email:"replace-by-your-email", firstName:"replace-by-your-firstname", lastName:"replace-by-your-lastname", password: "replace-by-a-hashed-password", role: "admin", createdAt: new Date().getTime(), "updatedAt": new Date().getTime(), "username" : "", phoneNumber: "+41..."})
Please have a look to https://docs.hcw-at-home.com/users/ to manually hash the password.
The local URLs are:
- Doctor: http://localhost:8081
- Patient: http://localhost:8080
- Admin: http://localhost:8082
Display the logs with docker compose logs -f