Push sources and download translations in same PR/branch #289
-
|
Hey there 👋 Our current setup with crowdin actions is made out of two scheduled workflows
That is not ideal for us since we end up with a PR that needs to be approved in isolation from the real changes and it ends up one day later on production than the actual changes/sources do. I want to make a workflow were the translations are already pulled to the branch that has the new sources - that way, both the new/updated sources and its translations would end up in the same production deploy. It's a bit surprising that I can't find an example of a workflow so I'm asking for help here 🙏 I tried with name: "[Crowdin] Upload sources and download translations"
on:
push:
paths:
- "config/locales/**/en_US.yml"
..without master, develop and few other branches..
permissions:
contents: write
jobs:
crowdin-sync:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Upload Sources to Crowdin
uses: crowdin/github-action@v2
with:
upload_sources: true
upload_translations: false
download_translations: false
create_pull_request: false
push_translations: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
- name: Download Translations from Crowdin
uses: crowdin/github-action@v2
with:
upload_sources: false
upload_translations: false
download_translations: true
crowdin_branch_name: ${{ github.ref_name }}
localization_branch_name: ${{ github.ref_name }}
create_pull_request: false
commit_message: "crowdin: Download translations"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} But it's like the two steps are too quick. Like the TM and AI pre-translation steps configured in the crowdin project are not processed between these two steps. I saw your AI guide but I don't think that I need this step in the workflow since we have that configured in the project 🤔 or do I? Can you advise me on how to achieve the workflow that I described? And also - in this workflow, I should use the |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 19 replies
-
|
Hi! That's a great question. The only thing that comes to mind is using a Webhook-based approach with branching in Crowdin. Here's how the flow would work:
The main challenge with this workflow is that the File Fully Translated or File Fully Reviewed events only contain the However, we already have an improvement idea to add a branch name to the webhook payload. |
Beta Was this translation helpful? Give feedback.
-
|
Hey @andrii-bodnar, a quick follow-up on this. The pre-translate-with-AI + branch-delete workflows work great for small repos with a limited number of source files. However, our frontend application repo has ~18k source strings across 2k JSON files. Each pre-translate-with-AI job runs for about 30 minutes, which doesn't scale well when most PRs introduce only a handful of changes (e.g., 10–30 strings in a few files). Do you have any suggestions for a workflow that would create a new branch on Crowdin and only push the sources that actually changed in the PR? |
Beta Was this translation helpful? Give feedback.
-
|
Hi @NBuhinicek! We have just released an experimental caching feature that should drastically reduce the execution time of the You can find more details about the implementation here: crowdin/crowdin-cli#959. I look forward to receiving your feedback! |
Beta Was this translation helpful? Give feedback.
-
|
Hello,
Thank you for reaching out to the Crowdin team ✨🎄
During the holiday period, our response times may be quite slower than
usual. Live chat and expedited email support will resume on January 2nd at
5 am UTC.
Urgent requests will continue to be prioritized in the queue, and our inbox
will still be monitored periodically.
Wishing you happy holidays and all the best in 2026!
…--
Sincerely yours,
Crowdin Team
{#HS:3185195190-359956#}
|
Beta Was this translation helpful? Give feedback.


In this case, you just need the Automatic AI Pre-Translation workflow. It will Pre-Translate the new source strings and immediately push them to GitHub.
Also, please take a look at this discussion - #280.