Skip to content

Instantly share code, notes, and snippets.

@MaximeCulea
Last active April 19, 2024 09:36
Show Gist options
  • Save MaximeCulea/553655544dc196c700d01d8017aff971 to your computer and use it in GitHub Desktop.
Save MaximeCulea/553655544dc196c700d01d8017aff971 to your computer and use it in GitHub Desktop.
Easily delete translations backups and json.
/**
* Easily delete locotranslate backup po/mo, while originals are gitted.
* No need to keep them.
*
* @author Maxime CULEA
*/
find ./ -type f -name "*.po~" -exec git clean -df {} +
find ./ -type f -name "*.mo~" -exec git clean -df {} +
find ./ -type f -name "*.pot~" -exec git clean -df {} +
find ./ -type f -name "*.json" -exec rm -rf {} +
/**
* Easily delete json translations
*
* @author Maxime CULEA
*/
# Clear translations files (such old versions)
fin exec find web/content/languages -type f -name "*.po~" -exec git clean -df {} +
fin exec find web/content/languages -type f -name "*.mo~" -exec git clean -df {} +
fin exec find web/content/languages -type f -name "*.pot~" -exec git clean -df {} +
fin exec find web/content/languages -type f -name "*.json" -exec rm -rf {} +
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment