Skip to content
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

Improve clean-ts file handling #119

Open
iafan opened this issue Aug 8, 2019 · 0 comments
Open

Improve clean-ts file handling #119

iafan opened this issue Aug 8, 2019 · 0 comments

Comments

@iafan
Copy link
Contributor

iafan commented Aug 8, 2019

Right now, clean-ts command scans only .po files, which doesn't work well with other interchange file formats that are now supported (e.g. XLIFF) or any custom file naming conventions or future formats.

To make sure clean-ts logic is future-proof, we need to implement the following:

  1. By default, assume that each directory with translation interchange files contains only files in one format; scan for all files in that folder, analyze their extensions and if extension is the same, delete all files with that extension. If there are multiple extensions, bail out (to prevent destructive command behavior if it accidentally configured to run against some random folder with important data).
  2. Implement the --extenstions=xx,yy,zz (shorthand: --ext=xx,yy,zz) flag that will allow one to explicitly specify extensions of files to clean up.
  3. Ignore (do not delete, and skip while traversing) directories and files that start with a dot (e.g. .cache or .gitignore). This will allow external synchronization plugins to store their synchronization cache/state right next to the synced data. It should be a responsibility of an individual TS sync plugin to clean up their cache if, for example, they see that there are no files to synchronize.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant