Generate CSV file for only changed strings and import only translations
Background
We lately changed our translations management process which had impact on how we are using CSV generator currently, currently the CSV generator script export all strings from the project and use whole sheet as a String synchronization dataset.
Why it worked beforehand?
Beforehand we used to have string freeze phase before generating the CSV file and string freeze were respected until we import the CSV file back into the project.
Why it doesn't work now?
We currently provide small chunk of the strings to the C&T team and have no code freeze in between, this will causes already updated Strings being overwritten, which is not what we want.
What to do
In order to minimize the risk of the String being overwritten we need to only export and import the Strings that were affected.
- Determine which strings were changed between current and previous commits.
- Export those strings with their translations and mark them "Addition" or "Modification" depending on the change type.
- Import the translations from the CSV file that uses the new format.
Hints for testers
- Ensure that generated
.csv
file contains only Source Strings and their translations(if available) that have been changed between current commit and the commit hash specified during the CSV file export (npm run csv-export -- [HASH]
)- Ensure that each exported strings has "Addition" and/or "Modification" note in the first column depending to the string change type.
- Ensure that translations are imported accordingly(i.e. Only affected strings translations are imported).
Edited by Manvel Saroyan