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

[question] spec if normalize would change some files #249

Closed
neumayr opened this issue Jul 4, 2017 · 2 comments
Closed

[question] spec if normalize would change some files #249

neumayr opened this issue Jul 4, 2017 · 2 comments
Assignees
Milestone

Comments

@neumayr
Copy link
Contributor

neumayr commented Jul 4, 2017

Hey! 👋

Would it be possible to add a spec to check if i18n-tasks normalize would apply changes to any .yml file(s). Sorry, for asking this question.

We run the i18n_spec.rb as part of our CI runner with every Pull Request. This works perfect, tests are failing if 'missing' or 'unused' keys are found. Some developer forgets to normalize i18n keys before commit. This sadly is not testable.

It's not tragic, it just adds noise/conflicts to other PRs that normalize the keys.
Could this be solved by some smart test? Maybe a --dry run or could normalize report a status[code] if files were changed/touched?

@neumayr neumayr changed the title [question] spec if normalize translation wasn't run [question] spec if normalize would change some files Jul 17, 2017
@glebm
Copy link
Owner

glebm commented Aug 10, 2017

Hi, this would certainly be useful, PR welcome.

I'd suggest adding a new check-normalized command that:

  1. Fails with a non-zero status code if there are non-normalized files.
  2. Reports these files to stderr.

@glebm glebm self-assigned this Aug 10, 2017
glebm added a commit that referenced this issue Aug 10, 2017
Adds a new task, `check-normalized`, and the corresponding specs, to
verify that all the locale files are normalized.

Fixes #249
@glebm glebm added this to the v0.9.17 milestone Aug 10, 2017
glebm added a commit that referenced this issue Aug 10, 2017
Adds a new task, `check-normalized`, and the corresponding specs, to
verify that all the locale files are normalized.

Fixes #249
glebm added a commit that referenced this issue Aug 10, 2017
Adds a new task, `check-normalized`, and the corresponding specs, to
verify that all the locale files are normalized.

Fixes #249
glebm added a commit that referenced this issue Aug 10, 2017
Adds a new task, `check-normalized`, and the corresponding specs, to
verify that all the locale files are normalized.

Fixes #249
@glebm
Copy link
Owner

glebm commented Aug 10, 2017

Released in v0.9.17!

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