diff --git a/doc/dev/features/i18n.md b/doc/dev/features/i18n.md index 7f042c5..69ee650 100644 --- a/doc/dev/features/i18n.md +++ b/doc/dev/features/i18n.md @@ -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.