Locale/localeapp

Trailing whitespace

phstc opened this issue · 6 comments

phstc commented

Hey,

Every time we push a blank key or add a new one in one locale without adding it in others, when we localeapp pull, localeapp returns the key with a trailing whitespace:

my_new_key: # new key

instead of:

my_new_key:# new key

And as most of the text editors we use for coding, are configured to auto remove trailing whitespace, every time we change something on these files and save, we get a big git diff, because of all those whitespaces that get removed.

Is it possible (maybe via a configuration) to stop adding trailing whitespaces?

Thanks

Hi Pablo,

Unfortunately, this is totally out of control on our side: it depends on the YAML parser/emitter you are using, which can change a lot from a system to another. It can be multiple gems (Syck, Psych, ...) in multiple versions or even system libraries (libyaml, ...).

Sometimes you may even notice totally different syntaxes from one developer system to another (specially between different OSes).

I'm really sorry about that, but there's no way for us to fix this 😞

phstc commented

@michaelbaudino not sure if I could follow you. For example if I go to http://localeapp.com, add a new key test_key in en, but not in pt-BR, then on my machine, I localeapp pull, it's going to download the pt-BR with test_key: (with a trailing space).

So you are saying that localeapp pull uses a local gem, which is the one adding the trailing space?

Any updates on this one?

bump

pirj commented

Emission of the trailing whitespace was fixed in libyaml 0.2.5.

Update your libyaml and accept all the changes to locale files after localeapp pull.

ryanb commented

Run Psych.libyaml_version to see which version you are using. You'll need to reinstall Ruby after upgrading libyaml to get the new version.