Skip to content

Commit

Permalink
HAI-1944 Add instructions for translation scripts to README (#388)
Browse files Browse the repository at this point in the history
  • Loading branch information
corvidian authored Oct 10, 2023
1 parent 86758a0 commit b890072
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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*
Expand Down
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit b890072

Please sign in to comment.