mirror of
https://github.com/CompassConnections/Compass.git
synced 2026-03-03 06:16:21 -05:00
Add docs for translation
This commit is contained in:
@@ -72,6 +72,7 @@ Everything is open to anyone for collaboration, but the following ones are parti
|
||||
- [x] Add profile fields (intellectual interests, cause areas, personality type, etc.)
|
||||
- [ ] Add profile fields: conflict style
|
||||
- [ ] Add profile fields: timezone
|
||||
- [ ] Add translations: Italian, Dutch, Hindi, Chinese, etc.
|
||||
- [x] Add filters to search through remaining profile fields (politics, religion, education level, etc.)
|
||||
- [ ] Make the app more user-friendly and appealing (UI/UX)
|
||||
- [ ] Clean up terms and conditions (convert to Markdown)
|
||||
@@ -156,7 +157,7 @@ If you are new to Typescript or the open-source space, you could start with smal
|
||||
There is a lof of documentation in the [docs](docs) folder and across the repo, namely:
|
||||
- [Next.js.md](docs/Next.js.md) for core fundamentals about our web / page-rendering framework.
|
||||
- [knowledge.md](docs/knowledge.md) for general information about the project structure.
|
||||
- [development.md](docs/development.md) for additional instructions, such as adding new profile fields.
|
||||
- [development.md](docs/development.md) for additional instructions, such as adding new profile fields or languages.
|
||||
- [web](web) for the web.
|
||||
- [backend/api](backend/api) for the backend API.
|
||||
- [android](android) for the Android app.
|
||||
|
||||
@@ -32,6 +32,16 @@ yarn regen-types dev
|
||||
|
||||
That's it!
|
||||
|
||||
### Adding a new language
|
||||
|
||||
Adding a new language is very easy, especially with translating tools like large language models (ChatGPT, etc.) which you can use as first draft.
|
||||
|
||||
- Add the language to the LOCALES dictionary in [constants.ts](../common/src/constants.ts) (the key is the locale code, the value is the original language name (not in English)).
|
||||
- Duplicate [fr.json](../web/messages/fr.json) and rename it to the locale code (e.g., `de.json` for German). Translate all the strings in the new file.
|
||||
- Duplicate the [fr](../web/public/md/fr) folder and rename it to the locale code (e.g., `de` for German). Translate all the markdown files in the new folder.
|
||||
|
||||
That's all, no code needed!
|
||||
|
||||
### Cover with tests
|
||||
|
||||
Best Practices
|
||||
|
||||
Reference in New Issue
Block a user