FlineDev / BartyCrouch

Localization/I18n: Incrementally update/translate your Strings files from .swift, .h, .m(m), .storyboard or .xib files.
MIT License
1.37k stars 121 forks source link

Add new line on every translation after normalize #251

Closed ivan-gaydamakin closed 2 years ago

ivan-gaydamakin commented 2 years ago

Problem Statement

I have file like:

"account" = "Account";
"top" = "Top";
"movie" = "Movie";

When I made "normalize" I got:

"account" = "Account";

"top" = "Top";

"movie" = "Movie";

Suggested Solution

Maybe add some param for "normalize" step, like "with_new_line=false"?

Jeehut commented 2 years ago

@ivan-gaydamakin Thank you for that suggestion. That's actually a nice idea and should be easy enough to implement. Do you want to tackle the implementation yourself, maybe? You'd just need to add a new param here, pass that down to the StringsFileUpdater and adjust the separator in this line from "\n\n" to "\n" when your option is active.

I might have a look into that myself, too, but I can't promise you any timeline right now ...

FlineDevPublic commented 2 years ago

@ivan-gaydamakin Thank you for the suggestion again, I just implemented this during my live stream and published a new version (4.11.0) where you should find the new option separateWithEmptyLine for various options (see README) which you can set all to false to get rid of the empty line. I hope this is what you were looking for and works (not tested, actually, but should work).


This comment was written during my regular Open Source live stream on Twitch. Follow me there to support my work!