From fd4265f62f5b535a768fc7ffdaa1c8dce384fde1 Mon Sep 17 00:00:00 2001 From: Topias Heinonen Date: Tue, 10 Oct 2023 11:59:24 +0300 Subject: [PATCH] HAI-1944 Add instructions for translation scripts to README --- .gitignore | 4 ++++ README.md | 15 ++++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index d64d59e6f..aa727b817 100644 --- a/.gitignore +++ b/.gitignore @@ -27,6 +27,10 @@ package-lock.json public/env-config.js public/test-env-config.js +# Generated Excel-sheet with translations and it's cache file +locale_export.xlsx +~$locale_export.xlsx + npm-debug.log* yarn-debug.log* yarn-error.log* diff --git a/README.md b/README.md index 394a1352b..bf7b6160c 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,20 @@ the identification method in the local environment, edit the `.env` -file. Then either rebuild the docker container or run `yarn update-runtime-env` as discussed above. -All cloud instances use Helsinki AD identification for now. +In the cloud instances, dev uses Helsinki AD identification while others use Suomi.fi. + +## Excel for translations + +You can export an Excel-file with current translations. This can then be sent to translators. + +1. In the repository root, run the export script with `yarn locales:export`. +2. The translations are written to `locale_export.xlsx`. + +After the translations are added to the Excel file, they can be imported back. + +1. Place the translated file inside repository root. It needs to named `locale_export.xlsx`. +2. Run the import script: `yarn locales:import`. +3. The translations in `/src/locales` are updated. ## API mocking