Hi Crowdin team,
We’ve run into an ambiguous situation when working with branches and uploading source files. Below are two scenarios:
1. Problematic case
-
In GitLab, create branch
feature/X
-
In source file (e.g.
en.json
), update the text for keyMY_KEY
-
Run:
crowdin upload sources branch --branch feature/X
– this creates branch feature/X in Crowdin
-
Manually modify en.json and translation files in our code
-
Merge
feature/X
intomain
branch -
From project root, run:
crowdin upload sources crowdin download
-
Result: downloaded files contain empty strings for the updated key instead of translations
2. Normal case (everything works)
-
In GitLab, create branch
feature/Y
-
In source file (e.g.
en.json
), update the text for keyMY_KEY
-
Run:
crowdin upload sources branch --branch feature/Y
– this creates branch feature/Y in Crowdin
-
In Crowdin’s UI, switch to branch feature/Y and add translations for the new text
-
Locally run:
crowdin download branch --branch feature/Y
– you see the new translations
-
Merge
feature/Y
intomain
-
Run:
crowdin upload sources crowdin download
– all translations are pulled in correctly
Our questions
- Master string when upload
How does Crowdin determine which translations/strings is “MASTER” when runningcrowdin upload sources
(without--branch
)? - Conflicting edits across branches
If the same string is modified in two different branches, how does Crowdin decide which version is “current” and which translations to download?
We’d appreciate any guidance on how to keep our workflow consistent and avoid losing translations.
Thanks in advance, Alex