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 #312

Merged
merged 1 commit into from
Nov 21, 2022
Merged

Setup Crowdin #312

merged 1 commit into from
Nov 21, 2022

Conversation

andrii-bodnar
Copy link
Contributor

Hey everyone,

Recently I found this extension and now it's my favorite VS Code Extension ever 😍

image

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
  • download all the new translations from Crowdin, commit changes and open a Pull Request.

You can find my demo Crowdin project here - vs-code-pets-demo.

Example of the first PR that will be created by the Action - here (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).

Also, I would be happy to contribute to Ukrainian translations 🇺🇦

@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:
    • Select the source 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.

@tonybaloney
Copy link
Owner

Thanks Andrii, I'll take a look at this. The localisation API in VS Code is changing in the latest release, so I need to move to the latest package, see #276

@tonybaloney
Copy link
Owner

The related PR is merged now, package.nls.json is still there, but isn't used for translations.

The l10n/ directory now keeps the mapping between English and the target languages.

@tonybaloney
Copy link
Owner

This is the new project. https://crowdin.com/project/vscode-pets

@tonybaloney tonybaloney merged commit 4e5ec23 into tonybaloney:master Nov 21, 2022
tonybaloney added a commit that referenced this pull request Feb 26, 2023
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.

2 participants