skip-silence icon indicating copy to clipboard operation
skip-silence copied to clipboard

Setup Crowdin

Open andrii-bodnar opened this issue 1 year ago • 4 comments

Hey everyone,

It's Andrii from Crowdin. Just did some analysis of the current i18n workflow and it feels like GitHub issues and PRs reported by the community are not so easy to handle. The community translators can work together in Crowdin, translations would be delivered as PR and volunteers can raise issues for problematic strings via Crowdin.

I'm suggesting 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 - skip-silence-demo.

Example of the first PR created by Crowdin Action - https://github.com/andrii-bodnar/skip-silence/pull/1 (Don't worry about the diffs. Crowdin tries to save the initial file structure as much as possible but these empty lines in JSON file format are not supported. The next PRs will include the new translations only).

Example of workflow run: here

Fixes #127

andrii-bodnar avatar Sep 26 '22 14:09 andrii-bodnar

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 the 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.

andrii-bodnar avatar Sep 26 '22 15:09 andrii-bodnar

Hey, thanks for raising this PR. This project contains a paywall that allows using all the extension's features. Looking at the CrowdIn Open-Source requirements it looks like this will prevent the project from using it:

  1. You do not have any commercial products related to the open-source project you are requesting a license for.

Maybe the normal free plan works though - the project receives too few translation PRs to justify upgrading to Pro.

vantezzen avatar Sep 26 '22 20:09 vantezzen

Hi @vantezzen! Sure, at first sight, the Free plan will also fit the current project requirements and needs

andrii-bodnar avatar Sep 26 '22 20:09 andrii-bodnar

Also consider Weblate. It offers free hosting for FOSS software regardless of their monetization strategy. And it can be self-hosted as well. I use it and I like it.

WofWca avatar Oct 07 '22 09:10 WofWca