Skip to content

Conversation

@artembo
Copy link
Contributor

@artembo artembo commented Jul 5, 2021

Documentation sources are .rst files where a tech writer or a developer writes documentation. As soon as we have two languages supported on our website we need to maintain translated 100% of the documentation. For translation, we use Crowdin - saas solution for translating any texts.
While a new PR with changes in .rst is opened, the translations for these changes are preparing by translators in Crowdin.
When the translations are ready we can run Pull translations job to download and commit translations into the PR branch.
This diagram shows how the process works:
crowdin-time-diagram

  • add cleanup.py for re-arranging .po files and initial re-arranged .po files
  • push-translation.yml push translation sources to Crowdin on pull request when .rst is changed, create a deployment with a link to Crowdin translations
  • pull-translation.yml for getting translations from Crowdin on demand when translation is ready and auto-commit them into the same PR branch
  • upload-translations.yml for upload translations to the master Crowdin branch from the git master branch
  • destroy deployment with a link to Crowdin translations when the translations (in PR) are merged

Closes #104

@artembo artembo force-pushed the artembo/push-pull-translations branch 3 times, most recently from 5638d42 to 092ba35 Compare July 7, 2021 08:15
@artembo artembo closed this Jul 7, 2021
@artembo artembo reopened this Jul 7, 2021
@artembo artembo marked this pull request as ready for review July 7, 2021 15:04
@artembo artembo requested review from NickVolynkin, vanyarock01 and vasiliy-t and removed request for vasiliy-t July 7, 2021 15:20
on:
pull_request:
paths:
- 'doc/**/*'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- 'doc/**/*'
- 'doc/**/*.rst'
- 'doc/conf.py'
- '.github/workflows/push-translation.yml'

on:
push:
paths:
- 'doc/**/*'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- 'doc/**/*'
- 'doc/**/*.rst'
- 'doc/locale/**/*.po'
- '.github/workflows/upload-translations.yml'

ci/helm-chart/templates/crds/tarantool.io_*s_crd.yaml
ci/helm-chart/templates/crds/tarantool_*_cr.yaml

doc/locale/en/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
doc/locale/en/
doc/locale/en/
doc/output/

- add cleanup.py for re-arranging po files
- push translation for pushing sources to crowdin on pull request when rst is changed
- add pull-translation.yml for getting translations from crowdin on demand when translation is ready

Closes #104
@artembo artembo force-pushed the artembo/push-pull-translations branch from 092ba35 to 3baec8f Compare July 19, 2021 07:54
push:
paths:
- 'doc/**/*.rst'
- 'doc/locale/**/*.po'
Copy link
Contributor

@vanyarock01 vanyarock01 Jul 19, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do I need to run a upload when this file changes?

Copy link
Contributor

@NickVolynkin NickVolynkin Jul 20, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We merge translation files from a PR and then re-upload translations back to Crowdin. Unfortunately, Crowdin cannot just "merge" translations from its own branch.

@@ -0,0 +1,807 @@

msgid "Tarantool Cartridge on Kubernetes"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused. Shouldn't the translation result be in the .po files?

Copy link
Contributor

@NickVolynkin NickVolynkin Jul 23, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Translation can be in .po files and only there. But translation is done by humans, and they couldn't do it yet, and won't be able to do until this PR gets merged.

@vanyarock01
Copy link
Contributor

How to understand that the translation is ready?

@NickVolynkin
Copy link
Contributor

How to understand that the translation is ready?

We see it at Crowdin. For example, at this moment it isn't ready at all:

Screenshot 2021-07-23 at 15 17 46

@artembo artembo merged commit 09569dc into master Aug 9, 2021
@vasiliy-t vasiliy-t deleted the artembo/push-pull-translations branch November 9, 2021 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[2pt] Create GitHub Actions workflows to translate documentation

4 participants