Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated README to include info on translations #8690

Merged
merged 1 commit into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ Authenticate to staging API with any of the following credentials
- Once the code review is done, the PR will be marked with a "Needs Testing" label where it'll be queued for QA testing.
- Once tested, the PR would be marked with a "Tested" label and would be queued for merge.

### Translations

All strings must be encased in i18n translations. New translation strings must be specified in `src`->`Locale`->`en`. Do not add translations for languages other than english through pull requests. Other language translations can be contributed through [Crowdin](https://crowdin.com/project/ohccarefe)

### Testing

To ensure the quality of our pull requests, we use a variety of tools:
Expand Down
22 changes: 3 additions & 19 deletions src/Locale/TRANSLATION_CONTRIBUTION.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,13 @@
# Contributing Translation
# Contributing Translations

### For adding a new language

<br>
## Adding a new language

- Open the Terminal and `cd` to `care_fe/src/Locale`
- Run the command `node update_locale.js <LANG_CODE>`
Eg: `node update_locale.js ml` for Malayalam
- The command will create a directory with default locale files and you can start translating them.
- The command will create a directory with default locale files.
- After it's done, add the new language to `care_fe/src/Locale/config.ts` file.

### For improving the existing language

<br>

- Open the Terminal and `cd` to `care_fe/src/Locale`
- Run the command `node update_locale.js <LANG_CODE>`
Eg: `node update_locale.js ml` for Malayalam
- The command will update the new keys which are yet to be translated.
- You can now start translating or improving it.

## Note

⚠ - If you are adding a new word, then please add it to the Default Locale (EN) first and then proceed with your language.

⚠ - After translating, have a look at its appearance. It may be overflowing or cause some UI breaks. Try to adjust the words such that it fits the UI.

⚠ - Try to separate the translation files for each module like `Facility`, `Patient` and more. Don't dump all the keys in one JSON file.
Loading