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:
consultationreplaced bysessionpatientreplaced 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>.json files.
for each project, there is a folder named assets/i18n-override containing <lang>.json and <lang>json.orig files.
<lang>.json.origcontains translations provided by HCW<lang>.jsoncontains 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 - check translations by running the script
check-and-replace-i18n-resources.sh
if new translations are added the file <lang>.json.orig will be modified and you should compare the orig with the local file.
- 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
Filesfrom this URL.
- Go to hcw-i18n/actions
- Select Publish HCW Docker images
- Click on
Run workflowon the right ( choosemainbranch).
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