We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi 👋🏼
When running ember-intl-analyzer --fix with JSON translation files, I realised that the formatter trims final newline in translation files
ember-intl-analyzer --fix
From what I understand by reading the code, this is due to these few lines Parsing the JSON trims the newline
It would be great if we could add the newline back into the file :)
updatedTranslations = JSON.stringify(translations, null, 2) + '\n';
This would make the behaviour consistent with YAML translation files, since YAML.stringify adds a final newline
YAML.stringify
In case there are people relying on the newline trimming, maybe we can add this as a configuration param, what do you think?
// config export default { removeFinalNewline: true | false; } // index.js updatedTranslations = JSON.stringify(translations, null, 2); updatedTranslations += options.removeFinalNewline? '' : '\n';
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi 👋🏼
When running
ember-intl-analyzer --fix
with JSON translation files, I realised that the formatter trims final newline in translation filesFrom what I understand by reading the code, this is due to these few lines
Parsing the JSON trims the newline
It would be great if we could add the newline back into the file :)
This would make the behaviour consistent with YAML translation files, since
YAML.stringify
adds a final newlineIn case there are people relying on the newline trimming, maybe we can add this as a configuration param, what do you think?
The text was updated successfully, but these errors were encountered: