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

Removing keys from slave locales based on missing keys in base #140

Closed
oskarkrawczyk opened this issue Apr 1, 2015 · 3 comments
Closed
Labels
Milestone

Comments

@oskarkrawczyk
Copy link

More of a question than issue.

Is there a way to remove keys from slave locales based on missing keys in the base locale?

For example my base EN:

en:
  foo: "foo"

Slave:

fr:
  foo: "foo"
  bar: "bar"

Running i18n-tasks missing will report that bar is missing in en. I don't want this, I know my base locale is correct, and all other should respect missing keys and remove them from slaves.

@glebm
Copy link
Owner

glebm commented Apr 1, 2015

This should do it (once per locale):

i18n-tasks missing -tdiff -len -fyaml | i18n-tasks tree-rename-key en fr | i18n-tasks data-remove

Except I just tried it, and data-remove does not seem to work (although it reports that it did).

glebm added a commit that referenced this issue Aug 2, 2015
Fixes. #162
Additionally, fixes the `data-remove` task. #140
Possibly fixes. #108
@glebm glebm added this to the v0.8.6 milestone Aug 2, 2015
@glebm
Copy link
Owner

glebm commented Aug 2, 2015

The command above should be working in v0.8.6, please give it a try!

@glebm glebm closed this as completed Aug 2, 2015
@feliperaul
Copy link

@glebm since tree-rename-key doesn't exist anymore, how one would perform this task with the most recent version? It's not obvious to me 😬

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

No branches or pull requests

3 participants