fab-manager icon indicating copy to clipboard operation
fab-manager copied to clipboard

Addition of the "other" gender

Open Norde opened this issue 2 years ago • 2 comments

The de, en, es, fr and no locales have been updated and translated. The locales pt and zu have just been updated with the English version.

The variable "user.statistic_profile_attributes" now takes the values "male", "female" and "other" instead of "true" and "false. Scripts calendar.js and members.js from admin interface have been updated accordingly.

Norde avatar Dec 16 '22 17:12 Norde

Have you tested your changes? I'm afraid this won't work... :confused:

This is not as easy as this to add a new gender. First of all, you must consider that the database currently stores a boolean, so you must start by writing a rails migration that changes the data type of the gender column of the statistic_profiles table to a string, and translate the current true/false to man/woman. Then you have to handle all these new values in the ruby code (see for example str_gender which won't work anymore with a string). You'll have also to handle CSV import and Excel exports. You'll have to deal with the SSO, the user edition form, the statistics and maybe other parts in the code... I'll also expect that you write or update some automated tests for this feature to be merged.

Lastly, you don't have to translate all the languages, only English is expected, the other languages are handled by the crowdin platform and must not be translated manually because this will conflict with crowdin.

sylvainbx avatar Dec 19 '22 09:12 sylvainbx

I'm really sorry about this crappy PR. I will revise my copy

Norde avatar Dec 19 '22 10:12 Norde