Is your feature request related to a problem? Please describe.
In most cases we will end up with some kind of parametrization in some of our resouces, like displaying currencies, amount, etc...
Describe the solution you'd like
We should provide a new annotation (for example @Intercept), which can intercept the result of currently generated getters. Also, the annotation could include a regular expression string, to filter translations which should be intercepted. For parametrization, we can provide additional logic for the generator to include the same parameters on the getters as described on the interceptor function.
Describe alternatives you've considered
We could include sprintf or any other library in the generator, but that would result in a strong dependency and a more abstract solution is always better. :)
Is your feature request related to a problem? Please describe. In most cases we will end up with some kind of parametrization in some of our resouces, like displaying currencies, amount, etc...
Describe the solution you'd like We should provide a new annotation (for example
@Intercept
), which can intercept the result of currently generated getters. Also, the annotation could include a regular expression string, to filter translations which should be intercepted. For parametrization, we can provide additional logic for the generator to include the same parameters on the getters as described on the interceptor function.Describe alternatives you've considered We could include sprintf or any other library in the generator, but that would result in a strong dependency and a more abstract solution is always better. :)
Additional context Simple example:
this should generate getters like:
Parametrized example:
this should generate getters like: