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

Add keySeparator configuration option #729

Merged
merged 2 commits into from
Nov 16, 2021
Merged

Conversation

testerez
Copy link
Contributor

@testerez testerez commented Nov 16, 2021

Option Description Type Default
keySeparator Change the separator that is used for nested keys. Set to false to disable keys nesting in JSON translation files. Can be useful if you want to use natural text as keys. string | false '.'

Use case: I'd like to be able to use natural text as keys. This improves the developer experience because I don't have to come-up with a key for each of my texts. Also, I'm using i18next-parser so I don't even have to touch translation files most of the time.

For info, i18next offers a similar option: https://www.i18next.com/overview/configuration-options

@aralroca aralroca added this to the next release milestone Nov 16, 2021
@aralroca aralroca assigned aralroca and unassigned aralroca Nov 16, 2021
@aralroca aralroca self-requested a review November 16, 2021 12:24
Copy link
Owner

@aralroca aralroca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution @testerez! I think it is perfect. Thank you!

@aralroca aralroca changed the base branch from master to canary November 16, 2021 12:25
@aralroca aralroca merged commit 435ff0f into aralroca:canary Nov 16, 2021
@aralroca
Copy link
Owner

@all-contributors please add @testerez for code

@allcontributors
Copy link
Contributor

@aralroca

I've put up a pull request to add @testerez! 🎉

@aralroca
Copy link
Owner

@testerez I pre-released under 1.3.0-canary.2. Thanks for your contribution.

@testerez
Copy link
Contributor Author

Thanks for the quick review!

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.

None yet

2 participants