ngx-translate-extract
ngx-translate-extract copied to clipboard
Add newline to the end of the translation files
Hi @biesbjerg ,
I constantly hit a very simple-to-fix issue.
The .editorconfig forces IDE to add a new line in the end of the file, and the regenerate command removes this newline.
So, git thinks something is updated although nothing really is.
Could it be added by default / as a configuration parameter?
To be more precise. This is what is currently generated:
{
"token": "value"
}
and this is desired output
{
"token": "value"
}
<-- newline here
https://unix.stackexchange.com/questions/31947/how-to-add-a-newline-to-the-end-of-a-file
@ghost683 this is good for Linux-like OS, but is not applicable to e.g. Windows. I still believe this should be provided by the tool itself
i'm not sure, i'am not on project, but some time ago I had the same need and i solved it as well, otherwise you coul'd try "echo >> file.txt". https://stackoverflow.com/questions/23055831/add-new-line-character-at-the-end-of-file-in-bash
@ghost683 you are right, there are tons of ways to deal with this. But this issue is not about workaround, it's about the feature that is missing in 99% of the projects
i know, it was just a suggestion, i solved it like this
It seems this issue would be closed by https://github.com/biesbjerg/ngx-translate-extract/pull/204