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

Exclude children of specified keys #161

Merged
merged 5 commits into from
May 9, 2022
Merged

Conversation

RoscaS
Copy link
Contributor

@RoscaS RoscaS commented May 4, 2022

Non breaking changes. At the moment, you need to specify excluded keys one by one. This update will exclude all children of an excluded key.

...
  "login": {
    "button": "Sign In",
    "create": "Create one here",
   ...
  },
  "menu": {
    "auth": "Auth Pages",
    "authForgot": "Forgot Password",
    ...
}
...

If no menu keys are found in your code but you still want to keep them, the current behavior will force you to exclude all the keys manually (vue-i18n-extract --remove --exclude menu.auth --exclude menu.authForgot ). This PR allows you to only specify the key menu to reach the same behavior.

@Spittal
Copy link
Owner

Spittal commented May 4, 2022

Yeah I think this is great! I believe right now our test suite wouldn't test for this though, wanna add that? The current test lives in tests/unit/create-report/index.spec.ts

@Spittal Spittal merged commit 789c606 into Spittal:master May 9, 2022
@Spittal
Copy link
Owner

Spittal commented May 9, 2022

Thanks!

@RoscaS
Copy link
Contributor Author

RoscaS commented May 10, 2022

My pleasure!

josestbernard pushed a commit to josestbernard/vue-i18n-extract that referenced this pull request Nov 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants