Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup Crowdin #139

Merged
merged 1 commit into from
Nov 8, 2022
Merged

Setup Crowdin #139

merged 1 commit into from
Nov 8, 2022

Conversation

andrii-bodnar
Copy link
Contributor

Hey everyone,

It's Andrii from Crowdin.

Just found the #136 issue and would like to suggest the integration with Crowdin via GitHub Actions. Crowdin is free for open-source projects. This integration works in the following way:

  • the action runs every 6 hours (actually, it's up to you what trigger to use, it could also be a push to the default branch, for example)
  • upload new source texts to the Crowdin project
  • upload existing translations to Crowdin (using the upload_translations action config parameter, it's necessary only for the first time)
  • download all the new translations from Crowdin and commit these translations to the localization_branch_name
  • open a Pull Request with the latest translations.

You can find my demo Crowdin project here - i-dont-care-about-cookies-demo.

Example of the first PR that will be created by Crowdin Action - PR example (Don't worry about the diffs - it's just updated the translation files to the actual state. The next PRs will include the new translations only. Crowdin tries to save the initial file structure as much as possible but these empty lines in JSON file format are not supported).

@andrii-bodnar
Copy link
Contributor Author

The next steps we can do to move further with this integration:

  • Create a Crowdin account.
  • Submit the Open-source project setup request form.
  • Create a new Crowdin Project:
    • As a source language select English language.
    • Fill in other target languages.
    • In the project settings enable the global Translation Memory (optional).
  • Generate a new Personal Access Token in your Crowdin account settings.
  • Generate a new GitHub Token (only the repo scope is required).
  • Create the Actions secrets for your repository:
    • CROWDIN_PERSONAL_TOKEN - the personal access token generated in Crowdin.
    • CROWDIN_PROJECT_ID - ID of the Crowdin project.
    • GH_TOKEN - the personal access token generated in GitHub.
  • merge this PR.

@OhMyGuus OhMyGuus merged commit 43e9eff into OhMyGuus:master Nov 8, 2022
@andrii-bodnar andrii-bodnar deleted the feat/setup-crowdin branch November 8, 2022 16:08
@OhMyGuus
Copy link
Owner

OhMyGuus commented Nov 8, 2022

Thanks, we are using the same action now on our other project makes it quite easy 👍

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.

None yet

2 participants