How create github integration with different translations against different folders

I have an open source application with documentation (md files) and app files (.ts files) to translate. The source and translations are all in the same repo and branch. I need to translate all the files but the set of languages for the docs needs to be much smaller than the set of translations for the application.

The solution I have tried is to have two Crowdin projects pointing to the same repo and branch, but one added a filter to translate the docs and supports only a few languages, and the other points to the .ts files and has many more translations.

Unfortunately when I change one project to have the correct filters, it writes the configuration to crowdin.yaml in the master branch. This then gets imported into the other project by default so both have the same filters.

What is the best way to solve this?

  • Is there a way to add a subset of languages to export in a filter? i.e. could I have both translation in one integration, but only a subset of those allowed being exported?
  • Is there a way to specify multiple crowdin.yml files in the same repo branch? (my preferred)

Hi @hamishwillee , have you chosen different branches for the content to be synced to in the integration settings in Crowdin?

Thanks @NataliaM. Assuming you mean the “Service branch name”, yes I have.

The problem is that only one configuration file seems to be used on a source branch.

@hamishwillee the best option in your case is the - Crowdin GitHub Action.

You’ll need to create two separate configuration files and separate GitHub workflow steps with the Crowdin GH Action pointing to the appropriate configuration:

name: Crowdin Action

on:
  push:
    branches: [ main ]

jobs:
  synchronize-with-crowdin:
    runs-on: ubuntu-latest

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

      - name: Sync docs localization
        uses: crowdin/github-action@v1
        with:
          upload_sources: true
          upload_translations: false
          download_translations: true
          config: 'path/to/your/first_crowdin.yml'
        env:
          GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
          CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
          CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}

      - name: Sync app localization
        uses: crowdin/github-action@v1
        with:
          upload_sources: true
          upload_translations: false
          download_translations: true
          config: 'path/to/your/second_crowdin.yml'
        env:
          GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
          CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
          CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}

Alternatively, you can create two WF steps with the No-crowdin.yml configuration.

The example above will create two separate PRs in your repo. You can disable the PR creation (create_pull_request: false) and then do it in a separate step, for example, by using the Create Pull Request Action.