Support » Plugin: Loco Translate » Translations Gone

  • Resolved sighan

    (@sighan)


    Hey there,

    I updated a string within a translation and instead of saving it, I hit sync. This resulted in almost all of the translations of my theme being deleted (from about 1,800 down to 100). Since I only noticed it after the fact I can’t use “revert” now.

    How do I undo this? Do I have to find the original files and do it all over again?

    Also, what is the purpose of “Sync” and is it deleting all my translations expected behavior? If so, maybe you could add an option to remove that button from the GUI in future versions.

    Kind regards
    Daniel

Viewing 1 replies (of 1 total)
  • Plugin Author Tim W

    (@timwhitlock)

    what is the purpose of “Sync”

    It is to update the template file with source code changes, and update PO files with template changes. See working with templates.

    is it deleting all my translations expected behavior?

    It is not its behaviour at all.

    1. Sync doesn’t delete anything from disk. It updates your current view.
    2. You cannot sync while you have unsaved changes in the editor.

    These two factors combined prevent unwanted changes being committed to disk until you do so explicitly. After syncing you would have seen a message saying that 1,700 strings were removed. At which point clicking Save would have been to confirm that’s what you wanted.

    How do I undo this?

    Every time you save a PO file, Loco Translate will try to save a backup in the same location. Assuming you have the option enabled you may be able to find the original file on disk. This can only be done manually at the moment. PO file backups have the suffix .po~ and are dated according to when they were saved.

    maybe you could add an option to remove that button from the GUI

    In the context of your problem I don’t follow how this is a solution. You clicked Sync not knowing what it did, but you’re saying if the option existed you would have gone into the plugin settings and disabled the button to avoid yourself clicking it?

    • This reply was modified 2 years, 10 months ago by  Tim W.
    • This reply was modified 2 years, 10 months ago by  Tim W.
Viewing 1 replies (of 1 total)
  • The topic ‘Translations Gone’ is closed to new replies.