i18n: add crowdin docker instructions

This commit is contained in:
perennial
2024-10-08 20:41:49 +11:00
parent 877fe4be32
commit dcbc6572b3
+38
View File
@@ -35,6 +35,44 @@ crowdin upload
crowdin download
```
## Crowdin Docker usage
### Step 1: set up container (with sources from local git repo)
```sh
docker run -it --rm --name crowdin-cli \
-e CROWDIN_PERSONAL_TOKEN=${CROWDIN_PERSONAL_TOKEN} \
-v "./i18n/locale/en:/usr/crowdin-project/i18n/locale/en" \
crowdin/cli:latest
```
### Step 2: init crowdin.yml
```sh
crowdin init \
--token "${CROWDIN_PERSONAL_TOKEN}" \
--project-id "724667" \
--base-path "." \
--base-url "https://api.crowdin.com" \
--source "/i18n/locale/en/*.json" \
--translation "/i18n/locale/%locale%/%original_file_name%" \
--verbose
```
### Step 3: upload translations from container to PixivFE crowdin project
```sh
crowdin upload \
--verbose
```
### Step 4: download translations from PixivFE crowdin project to container
```sh
crowdin download \
--verbose
```
## Crowdin Web UI usage
Add new languages to translate in Settings > Languages.