marhali / easy-i18n

This is a IntelliJ IDE based plugin for internationalization. Supports the most common translation file types.
MIT License
87 stars 27 forks source link

Add option to disable formatting of translation files #411

Open BernatIV opened 5 months ago

BernatIV commented 5 months ago

First of all, this plugin has been great for me and it saved a lot of time.

Here's my issue. Currently, the plugin applies its own formatting rules to the translation files, which overrides the default JSON formatting settings in Intellij / Webstorm. This can lead to undesired changes in the formatting of the files, such as removing line breaks at the end of the file or converting Unicode escape sequences (e.g., \u00A0) to their actual character representation. In this case I need it for french spaces between the word and the question mark. They are non-breaking spaces.

I would like to propose adding a configuration option in the Easy i18n plugin's settings to enable or disable the formatting of translation files. This option could be a checkbox labeled "Disable formatting of translation files" or similar. When enabled, the plugin would skip the formatting step and preserve the original formatting of the translation files.

I understand that implementing this option may require changes to the plugin's codebase, specifically in the EasyI18nJsonFormattingModelBuilder class.

Thank you, Marc