Skip to content

icrc/hcw-i18n

Repository files navigation

Why this project

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 by session
  • patient replaced by service user

How to use this project

Reuse the docker images

Images generated by this GitHub project can be used directly. See https://github.com/orgs/icrc/packages?repo_name=hcw-i18n

Create custom translated images

To provide custom translations, fork this repository and modify the <lang>.override.json files.

How custom translations are managed

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

How to update HCW Docker versions generated by this repository and their related translations

  • 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.

How to modify translations used by this project

How to generate HCW docker images

How to start the applications locally

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

Step 1: Create the file secrets.env

Create the secrets.env file by copying secrets.env.default, then generate and add passwords in the new file.

Step 2: Start the applications

Run: docker compose up -d

Step 3: Create a user

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.

Step 5: Access to the applications

The local URLs are:

Display the logs with docker compose logs -f

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages