Create GitHub Issue Free
ByAndrii BodnarVerified Author

Streamlining Crowdin Issue Forwarding to GitHub Repositories

Try Crowdin

This guide describes the process of forwarding Crowdin issues to a GitHub repository, improving collaboration between translators and developers. Learn how to configure the integration, report issues effectively, transfer them to GitHub, collaborate on resolutions, and close the loop for seamless localization workflow.

Setup

Copy link
  1. Generate a GitHub personal access token with the repo scope selected.

  2. Set up a Webhook in your crowdin.com or Crowdin Enterprise project:

Screenshot

Payload:

{
  "event_type": "{{event}}",
  "client_payload": {
    "comment": {
      "id": "{{commentId}}",
      "text": "{{commentText}}",
      "type": "{{commentType}}",
      "issueType": "{{commentIssueType}}",
      "issueStatus": "{{commentIssueStatus}}",
      "string": {
        "id": "{{stringId}}",
        "identifier": "{{stringIdentifier}}",
        "key": "{{stringKey}}",
        "text": "{{stringText}}",
        "url": "{{stringUrl}}",
        "file": {
          "id": "{{fileId}}",
          "name": "{{fileName}}",
          "path": "{{filePath}}"
        },
        "project": {
          "id": "{{projectId}}",
          "identifier": "{{projectIdentifier}}",
          "name": "{{projectName}}",
          "url": "{{projectUrl}}"
        }
      },
      "user": {
        "id": "{{userId}}",
        "username": "{{userUsername}}",
        "fullName": "{{userFullName}}",
        "avatarUrl": "{{userAvatarUrl}}"
      }
    }
  }
}

Note! Be sure to configure the request headers for the webhook: Authorization: Bearer your_gh_personal_access_token, Accept: application/vnd.github.v3+json

  1. Create a yml worfklow in your GitHub repository in the .github/workflows directory with the following content:
name: 'Sync Crowdin Issue'

on:
  repository_dispatch:
    types: [stringComment.created]

permissions:
  contents: read
  issues: write

jobs:
  create-issue:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout
        uses: actions/checkout@v3

      - name: Create an issue
        if: github.event.client_payload.comment.issueType == 'source_mistake'
        uses: actions-cool/issues-helper@v3
        with:
          actions: 'create-issue'
          token: ${{ secrets.GITHUB_TOKEN }}
          title: 'Mistake in source string ${{ github.event.client_payload.comment.string.identifier }}'
          issue-number: ${{ github.event.client_payload.comment.id }}
          body: |
            The source string '${{ github.event.client_payload.comment.string.identifier }}' contains a mistake.

            > ${{ github.event.client_payload.comment.text }}

            [View in Crowdin](${{ github.event.client_payload.comment.string.url }})

The above workflow is triggered every time a new string comment is created in the Crowdin project. If the created comment is an issue and it is of type source_mistake, it will create an issue in the repository to notify the developers about this. You can configure the issue body in any way you like.

Crowdin is a platform that helps you manage and translate content into different languages. Integrate Crowdin with your repo, CMS, or other systems. Source content is always up to date for your translators, and translated content is returned automatically.

Learn More
Categories
Development
Works with
  • Crowdin Enterprise
  • crowdin.com
Details

Released on Jun 20, 2023

Updated on Oct 18, 2023

Published by Andrii Bodnar

Identifier:create-github-issue