[feature] support to sync diff between local and remote
ctf0 opened this issue · 2 comments
ctf0 commented
is it possible for the package instead of replacing the current lang files with the ones from the google sheet, to check first for the new items in the current and add them to the array from google b4 replacing.
this way you dont lose the extra work made on the local side when u pull the translation from the sheet.
nbourguig commented
I can't figure a way off the top of my head to do this. This means some kind of a diff system that could run into conflicts which cannot be solved automatically or maybe present the users a choice to override or not when they run the pull command.
Pull request are more than welcome.
ctf0 commented
for now i think the flow could be like
- sort the array keys of both versions "app & g-sheet"
- get the new keys in local
- add them to the g-sheet data
- replace the local files with the g-sheet data
- sync all to g-sheet