collective / collective.contact.core

part of the collective.contact.* suite that provides a directory where you create persons, organizations, sub-organizations and positions
https://github.com/collective/collective.contact.demo
6 stars 10 forks source link

Added 'utils.get_gender_and_number' #51

Closed gbastien closed 6 years ago

gbastien commented 6 years ago

that returns the gender and number of a given list of contacts. This is useful to manage gender (female/male) and number (singular/plural) for generated words.

gbastien commented 6 years ago

Hi @frisi

thank you for review and comments.

I will sort imports, I just copy/pasted from test_views.py.

Yes I suppose we could have some kind of "language" parameter, here it is related to french where we have difference between female/male and singular/plural but it is not the case everywhere sure.

If you need it, feel free to implement when it will be merged as long as it is backward compatible ;-) Like adding an extra parameter to the method.

Gauthier