jezzsantos / automate

Templatize patterns from your own codebase, make them programmable, then share them with your team. https://jezzsantos.github.io/automate/
https://www.nuget.org/packages/automate
MIT License
7 stars 0 forks source link

Pluralisation of attribute properties #3

Closed jezzsantos closed 2 years ago

jezzsantos commented 2 years ago

When rendering code, we need to be able to pluralise attribute values in the model

jezzsantos commented 2 years ago

This could be achieved in either Scriban inline functions or using a calculated property value whose ValueProvider does the calculation based on another property containing the name to be pluralised.

jezzsantos commented 2 years ago

Define a couple of functions: pluralize and singularize using the library https://github.com/Humanizr/Humanizer