From 21db5cb481e57093d8eb851b710985b0a632cd01 Mon Sep 17 00:00:00 2001 From: MartinBraquet Date: Sat, 3 Jan 2026 14:09:52 +0200 Subject: [PATCH] Add docs for translation --- README.md | 3 ++- docs/development.md | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9f7f94af..8a9ad5fd 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/docs/development.md b/docs/development.md index 3765d171..4fdd9dc1 100644 --- a/docs/development.md +++ b/docs/development.md @@ -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