Skip to content
New issue

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

How to disable normalisation? #217

Open
AdrienGiboire opened this issue Dec 23, 2016 · 5 comments
Open

How to disable normalisation? #217

AdrienGiboire opened this issue Dec 23, 2016 · 5 comments

Comments

@AdrienGiboire
Copy link

AdrienGiboire commented Dec 23, 2016

I found how to disable wrapping line but I didn't found the config to disable reordering the keys.

@glebm
Copy link
Owner

glebm commented Dec 23, 2016

There is no such option, but PRs are welcome to add it. I'd call it data.sort_keys_on_write.

To get you started, see

hash = tree.to_hash(true)
. It currently always passes true for the sort parameter.

@ghost
Copy link

ghost commented Feb 20, 2017

Is it possible, after having run normalize -p to put everything back into a single file? sort of a de-normalize -p or at least something that copies all the keys and injects them back into the main <locale>.yml ?

@glebm
Copy link
Owner

glebm commented Feb 20, 2017

@ClaudioCarmeli

This should work:

# config/i18n-tasks.yml
data:
  write:
  - 'config/locales/%{locale}.yml'
i18n-tasks normalize -p

@glebm glebm mentioned this issue Feb 22, 2017
@ghost
Copy link

ghost commented Feb 23, 2017

@glebm Thank you so much!
I was gonna reply and say "that doesn't work, I've already tried."
Still, before commenting, I tried and it worked!

So thank you.

@AdrienGiboire
Copy link
Author

I'll give it a try though I'm not at ease :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants