-
-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Output keys and values removed with locize sync #98
Comments
Have you tried to restore the files like described here? https://docs.locize.com/more/general-questions/where-do-i-find-the-namespace-backups The CLI also has a dry-run functionality. Just add the Alternatively, you can also copy your local translations before executing the sync command. Personally, I don't think it is the right approach for adding this functionality to the CLI. Let me know if my suggestions helps. |
I'll try the namespace backups, thanks! The dry-run could help avoid it somewhat in the future. I don't think copying local files beforehand would help, those files are in git and can already be reverted. The problem is with keys in Locize that your system (and git) isn't aware of, but because local timestamps are newer you can still remove those keys with a sync. Unless the CLI informs about what is getting removed, the values are lost. Even the dry-run, in case you used it, only shows the keys that got removed, the values are still lost. Hopefully the backups will work. I'd argue that since a sync can remove content that you can't be aware of, it would be helpful if the CLI made you aware of it, so backups aren't the only option. |
let me know if this helps... |
The namespace backups are helpful, was able to restore things partially so far. Thanks. Local backups seem like a good idea. Having a timestamped folder per sync with backups would make things easier next time. |
with v8.2.0 you should now be able to pass a backup path argument: |
Awesome, works great, thanks! |
🚀 Feature Proposal
It would be useful to have an option to output the keys and values that get removed with
locize sync
. Perhaps it can even be the default.Motivation
It gives an easy way to restore keys. I've destroyed translation work that already happened in Locize by mistake several times by messing up a sync. In Locize there doesn't seem to be a history for removed keys. If
locize sync
outputs both the keys and the values it removes, this would provide a way to recover from the cli.Example
Instead of this output:
You also get the keys and their values:
The text was updated successfully, but these errors were encountered: