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

Provide ability to extend a dictionary #63

Closed
abouquet opened this issue Apr 23, 2021 · 4 comments
Closed

Provide ability to extend a dictionary #63

abouquet opened this issue Apr 23, 2021 · 4 comments
Labels
core 🧬 Issue related to :core module enhancement 🚀 New feature or request

Comments

@abouquet
Copy link

I want to extends a localized dictionnary (not creating a new one) as provided ones are not fully localized

Is there any way to do this ?

@serpro69
Copy link
Owner

Hi @abouquet ,
How would you want to extend it without modifying the contents of the .yml file?
Right now the only way to extend the existing dictionaries is by modifying them and bundling with the application.

I've had an idea in mind to make it possible to provide new dict files (or even "extensions" to existing ones) outside of the application. But that requires some major refactoring and re-implementation, and I simply do not have much time for that right now, so that has not evolved pas an issue yet (#8)

But maybe I'm misunderstanding what is it you're asking for. If you can provide some more details and examples, it could be that it's possible to do in an easy way now.

@serpro69 serpro69 added core 🧬 Issue related to :core module enhancement 🚀 New feature or request labels Apr 26, 2021
@abouquet
Copy link
Author

abouquet commented May 8, 2021

That is indeed what I am wanting : beeing able to provide new translation by adding new yaml file in the classpath for example.
We can also think about an API to provide translated words by code (we some kind of builder pattern)

No matter how we can extend the translation, it would be great not to be forced to repackage the library with updated yaml files :)

@serpro69
Copy link
Owner

Thanks for the input. Good to know I'm not the only one who finds such functionality useful :)
Will pick this up.

@serpro69
Copy link
Owner

Hi @abouquet ,
Kotlin-Faker 2.0 will have functionality that allows to create custom data generators (see here for details: https://serpro69.github.io/kotlin-faker/wiki/custom-data-provider/ )
It seems to me that that's something that covers this request as well, hence I'm going to close it.
But feel free to re-open if you feel like that doesn't fully cover your description. I'd like to add as much as possible to kotlin-faker before releasing the next major version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core 🧬 Issue related to :core module enhancement 🚀 New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants