Best Practice to Remove Legacy Files from Github Integration

I’ve read How to remove old files from Crowdin which don't exist in source any more - Bitbucket integration and it seems the issue is similar.

The answer says “just remove it” and it does work. However, my project documentation has been refactored for several times and it is difficult to manually figure out which files should be deleted.

Is there any best practice for similar situation? For example, if I remove all of the files and then re-update the files, would that bring any side effects?

Hi @darwintree ,

The best solution would be to delete the file from Crowdin indeed. If you delete all files from Crowdin, then integration will push all sources again automatically. However, it would be necessary to upload translation manually from the Bitbucket side by clicking Upload Translations to Crowdin. In that case, all translation details (like who and when made the translations) will be lost.

Thank you for the reply. That would not be a good solution for our project as we need to record the contribution from the contributors.
Could you provide any other advice to remove the legacy files? For example, is there any cli tools assisting to remove the legacy files rather than do that manually?

Hi @darwintree,

Unfortunately, we don’t have a tool to remove legacy files. However, there is a workaround how
you can easily migrate all the translations from the old files in Crowdin to the newly uploaded ones with preserving translation authority.

In order to save the translations you may do the following:

  • rename the current branch in Crowdin where the source files are by adding a suffix to it for example (branchname_old)
  • upload the branch to the project again (so now you will have both of them)
  • Enable the duplicates option in the project. All translations will migrate from one branch to the newly uploaded. Wait a bit for the migration and then you may delete the old branch safely.

In this way, you can refresh files in Crowdin and also save all translations + approvals + translation history

2 Likes