Cropster / ember-l10n

A GNU gettext based localization workflow for Ember
MIT License
15 stars 7 forks source link

Remove comments from generated JSON files #45

Closed mydea closed 5 years ago

mydea commented 5 years ago

The gettext-parser we use generates a nice JSON format. However, it also includes comments, which make up about half of the total JSON file. Since we don't really need this, we should probably strip this out during ember l10n:convert.

A simple regex that seems to fix this is: /"comments": \{([\s\S]*?)\},\s*/gm (replace with '').