From 92f870025456cf9f9cc6794ea406c0e765b42d6a Mon Sep 17 00:00:00 2001 From: moonrailgun Date: Sun, 21 Apr 2024 02:41:31 +0800 Subject: [PATCH] docs: update document --- README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/README.md b/README.md index 68b0786..9eddd05 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,29 @@ It's good to specialize in one thing, if we are experts in related abilities we ![](./website/static/img/preview3.png) +## Translation + +### Add a new translation + +modify those file: +- `src/client/i18next-toolkit.config.cjs` in this file, edit country code +- `src/client/utils/constants.ts` in this file, add for display + +Then, run below code to auto generate + +```bash +cd src/client +pnpm install +pnpm run translation:extract +pnpm run translation:translate # this will call chatgpt to run auto translation, so you need set env `OPENAPI_KEY` to make sure run correct +``` + +Then manual check translation file in `src/client/public/locales` + +### Improve translation + +Direct update `src/client/public/locales` + ## Open Source `Tianji` is open source with `Apache 2.0` license.