[Feature] - Optional Alphabetic sort
floriangbh opened this issue · 4 comments
Allowing to configure the alphabetic sort
Thinking about it now I remember that sorting the files alphabetically allowed for easier (and faster) warning generation. What I mean is that if an issue is found in the en
file line 3, we can raise the warnings on the same line in other files, say es
or fr
.
Not sorting them automatically means keys could be ordered differently so we will need extra processing to find the right corresponding line in every file.
This shouldn't be too complex but it's something we need to keep in mind :)
My bad after checking in the code, it's already relying on dictionaries rather that line numbers so it shouldn't be that big of a deal :)
/*
Sanitizing files will remove comments, empy lines and order your keys alphabetically.
*/
let sanitizeFiles = true
Set to false, it will prevent the script form modifying your files :)
This seems to work fine, thank you ;-)