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

Addition of the "other" gender #423

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/frontend/src/javascript/controllers/admin/calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -366,11 +366,11 @@ Application.Controllers.controller('AdminCalendarController', ['$scope', '$state
/**
* Return an enumerable meaninful string for the gender of the provider user
* @param user {Object} Database user record
* @return {string} 'male' or 'female'
* @return {string} 'male', 'female' or "other"
*/
const getGender = function (user) {
if (user.statistic_profile_attributes) {
if (user.statistic_profile_attributes.gender === 'true') { return 'male'; } else { return 'female'; }
if (user.statistic_profile_attributes.gender === 'male') { return 'male'; } else if (user.statistic_profile_attributes.gender === 'female') { return 'female'; }
} else { return 'other'; }
};

Expand Down
4 changes: 2 additions & 2 deletions app/frontend/src/javascript/controllers/admin/members.js
Original file line number Diff line number Diff line change
Expand Up @@ -1176,11 +1176,11 @@ Application.Controllers.controller('NewAdminController', ['$state', '$scope', 'A
/**
* Return an enumerable meaningful string for the gender of the provider user
* @param user {Object} Database user record
* @return {string} 'male' or 'female'
* @return {string} 'male', 'female' or "other"
*/
return getGender = function (user) {
if (user.statistic_profile_attributes) {
if (user.statistic_profile_attributes.gender) { return 'male'; } else { return 'female'; }
if (user.statistic_profile_attributes.gender === 'male') { return 'male'; } else if (user.statistic_profile_attributes.gender === 'female') { return 'female'; }
} else { return 'other'; }
};
}
Expand Down
16 changes: 14 additions & 2 deletions app/frontend/templates/shared/signupModal.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,26 @@ <h1 translate>{{ 'app.public.common.create_your_account' }}</h1>
<input type="radio"
name="gender"
ng-model="user.statistic_profile_attributes.gender"
value="true"
value="male"
required/> {{ 'app.public.common.man' | translate }}
</label>
<label class="checkbox-inline">
<input type="radio"
name="gender"
ng-model="user.statistic_profile_attributes.gender"
value="false"/> {{ 'app.public.common.woman' | translate }}
value="female"/> {{ 'app.public.common.woman' | translate }}
</label>
<label class="checkbox-inline">
<input type="radio"
name="gender"
ng-model="user.statistic_profile_attributes.gender"
value="other"/> {{ 'app.public.common.other' | translate }}
</label>
<label class="checkbox-inline">
<input type="radio"
name="gender"
ng-model="user.statistic_profile_attributes.gender"
value="false"/> {{ 'app.public.common.other' | translate }}
</label>
<span class="exponent m-l-xs help-cursor" title="{{ 'app.public.common.used_for_statistics' | translate }}"><i class="fa fa-asterisk" aria-hidden="true"></i></span>
<span class="help-block" ng-show="signupForm.gender.$dirty && signupForm.gender.$error.required" translate>{{ 'app.public.common.gender_is_required'}}</span>
Expand Down
3 changes: 3 additions & 0 deletions config/locales/app.admin.de.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1098,6 +1098,7 @@ de:
failed_to_create_admin: "Administrator konnte nicht erstellt werden:"
man: "Männlich"
woman: "Weiblich"
other: "Unbestimmt"
pseudonym: "Pseudonym"
pseudonym_is_required: "Pseudonym ist erforderlich."
first_name: "Vorname"
Expand All @@ -1116,6 +1117,7 @@ de:
failed_to_create_manager: "Konnte den Manager nicht erstellen:"
man: "Männlich"
woman: "Weiblich"
other: "Unbestimmt"
pseudonym: "Pseudonym"
pseudonym_is_required: "Pseudonym ist erforderlich."
first_name: "Vorname"
Expand Down Expand Up @@ -1268,6 +1270,7 @@ de:
deleted_user: "Gelöschter Nutzer"
man: "Männlich"
woman: "Weiblich"
other: "Unbestimmt"
export_is_running_you_ll_be_notified_when_its_ready: "Export wird ausgeführt. Sie werden nach Fertigstellung benachrichtigt."
create_plans_to_start: "Beginnen Sie mit dem Erstellen neuer Abonnement-Pläne."
click_here: "Klicken Sie hier, um die erste zu erstellen."
Expand Down
3 changes: 3 additions & 0 deletions config/locales/app.admin.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1098,6 +1098,7 @@ en:
failed_to_create_admin: "Unable to create the administrator:"
man: "Man"
woman: "Woman"
other: "Other"
pseudonym: "Pseudonym"
pseudonym_is_required: "Pseudonym is required."
first_name: "First name"
Expand All @@ -1116,6 +1117,7 @@ en:
failed_to_create_manager: "Unable to create the manager:"
man: "Man"
woman: "Woman"
other: "Other"
pseudonym: "Pseudonym"
pseudonym_is_required: "Pseudonym is required."
first_name: "First name"
Expand Down Expand Up @@ -1268,6 +1270,7 @@ en:
deleted_user: "Deleted user"
man: "Man"
woman: "Woman"
other: "Other"
export_is_running_you_ll_be_notified_when_its_ready: "Export is running. You'll be notified when it's ready."
create_plans_to_start: "Start by creating new subscription plans."
click_here: "Click here to create your first one."
Expand Down
15 changes: 9 additions & 6 deletions config/locales/app.admin.es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1096,8 +1096,9 @@ es:
add_an_administrator: "Agregar un administrador"
administrator_successfully_created_he_will_receive_his_connection_directives_by_email: "Successful creation. Connection directives were sent to the new administrator by e-mail."
failed_to_create_admin: "No se puede crear el administrador :"
man: "Man"
woman: "Woman"
man: "Hombre"
woman: "Mujer"
other: "Otro"
pseudonym: "Pseudonym"
pseudonym_is_required: "Pseudonym is required."
first_name: "First name"
Expand All @@ -1114,8 +1115,9 @@ es:
add_a_manager: "Add a manager"
manager_successfully_created: "Successful creation. Connection directives were sent to the new manager by e-mail."
failed_to_create_manager: "Unable to create the manager:"
man: "Man"
woman: "Woman"
man: "Hombre"
woman: "Mujer"
other: "Otro"
pseudonym: "Pseudonym"
pseudonym_is_required: "Pseudonym is required."
first_name: "First name"
Expand Down Expand Up @@ -1266,8 +1268,9 @@ es:
export_the_current_search_results: "Exportar los resultados de búsqueda actuales"
export: "Exportar"
deleted_user: "Usario eliminado"
man: "Man"
woman: "Woman"
man: "Hombre"
woman: "Mujer"
other: "Otro"
export_is_running_you_ll_be_notified_when_its_ready: "Export is running. You'll be notified when it's ready."
create_plans_to_start: "Start by creating new subscription plans."
click_here: "Click here to create your first one."
Expand Down
3 changes: 3 additions & 0 deletions config/locales/app.admin.fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1098,6 +1098,7 @@ fr:
failed_to_create_admin: "Impossible de créer l'administrateur :"
man: "Homme"
woman: "Femme"
other: "Autre"
pseudonym: "Pseudonyme"
pseudonym_is_required: "Le pseudonyme est requis."
first_name: "Prénom"
Expand All @@ -1116,6 +1117,7 @@ fr:
failed_to_create_manager: "Impossible de créer le gestionnaire :"
man: "Homme"
woman: "Femme"
other: "Autre"
pseudonym: "Pseudonyme"
pseudonym_is_required: "Le pseudonyme est requis."
first_name: "Prénom"
Expand Down Expand Up @@ -1268,6 +1270,7 @@ fr:
deleted_user: "Utilisateur supprimé"
man: "Homme"
woman: "Femme"
other: "Autre"
export_is_running_you_ll_be_notified_when_its_ready: "L'export est en cours. Vous serez notifié lorsqu'il sera prêt."
create_plans_to_start: "Pour commencer, créez de nouvelles formules d'abonnement."
click_here: "Cliquez ici pour créer votre première formule."
Expand Down
3 changes: 3 additions & 0 deletions config/locales/app.admin.no.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1098,6 +1098,7 @@
failed_to_create_admin: "Kan ikke opprette administrator:"
man: "Mann"
woman: "Kvinne"
other: "Annet"
pseudonym: "Pseudonym"
pseudonym_is_required: "Kallenavn er nødvendig."
first_name: "Fornavn"
Expand All @@ -1116,6 +1117,7 @@
failed_to_create_manager: "Kan ikke opprette leder:"
man: "Mann"
woman: "Kvinne"
other: "Annet"
pseudonym: "Pseudonym"
pseudonym_is_required: "Kallenavn er nødvendig."
first_name: "Fornavn"
Expand Down Expand Up @@ -1268,6 +1270,7 @@
deleted_user: "Slettet bruker"
man: "Mann"
woman: "Kvinne"
other: "Annet"
export_is_running_you_ll_be_notified_when_its_ready: "Eksport er startet. Du vil bli varslet når den er klar."
create_plans_to_start: "Begynn med å opprette nye medlemskapsplaner."
click_here: "Klikk her for å opprette din første."
Expand Down
3 changes: 3 additions & 0 deletions config/locales/app.admin.pt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1098,6 +1098,7 @@ pt:
failed_to_create_admin: "Não é possível criar administrador:"
man: "Homem"
woman: "Mulher"
other: "Other"
pseudonym: "Apelido"
pseudonym_is_required: "Apelido é obrigatório."
first_name: "Primeiro nome"
Expand All @@ -1116,6 +1117,7 @@ pt:
failed_to_create_manager: "Não foi possível criar o gerente:"
man: "Homem"
woman: "Mulher"
other: "Other"
pseudonym: "Apelido"
pseudonym_is_required: "Apelido é obrigatório."
first_name: "Primeiro nome"
Expand Down Expand Up @@ -1268,6 +1270,7 @@ pt:
deleted_user: "Usuário deletado"
man: "Homem"
woman: "Mulher"
other: "Other"
export_is_running_you_ll_be_notified_when_its_ready: "A exportação está em execução. Você será notificado quando estiver pronto."
create_plans_to_start: "Comece criando novos planos de assinatura."
click_here: "Clique aqui para criar o seu primeiro."
Expand Down
3 changes: 3 additions & 0 deletions config/locales/app.admin.zu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1098,6 +1098,7 @@ zu:
failed_to_create_admin: "crwdns25998:0crwdne25998:0"
man: "crwdns26000:0crwdne26000:0"
woman: "crwdns26002:0crwdne26002:0"
other: "Other"
pseudonym: "crwdns26004:0crwdne26004:0"
pseudonym_is_required: "crwdns26006:0crwdne26006:0"
first_name: "crwdns26008:0crwdne26008:0"
Expand All @@ -1116,6 +1117,7 @@ zu:
failed_to_create_manager: "crwdns26030:0crwdne26030:0"
man: "crwdns26032:0crwdne26032:0"
woman: "crwdns26034:0crwdne26034:0"
other: "Other"
pseudonym: "crwdns26036:0crwdne26036:0"
pseudonym_is_required: "crwdns26038:0crwdne26038:0"
first_name: "crwdns26040:0crwdne26040:0"
Expand Down Expand Up @@ -1268,6 +1270,7 @@ zu:
deleted_user: "crwdns26292:0crwdne26292:0"
man: "crwdns26294:0crwdne26294:0"
woman: "crwdns26296:0crwdne26296:0"
other: "Other"
export_is_running_you_ll_be_notified_when_its_ready: "crwdns26298:0crwdne26298:0"
create_plans_to_start: "crwdns26300:0crwdne26300:0"
click_here: "crwdns26302:0crwdne26302:0"
Expand Down
1 change: 1 addition & 0 deletions config/locales/app.public.de.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ de:
create_your_account: "Eigenen Account erstellen"
man: "Männlich"
woman: "Weiblich"
other: "Unbestimmt"
gender_is_required: "Die Angabe des Geschlechts ist erforderlich."
your_first_name: "Dein Vorname"
first_name_is_required: "Der Vorname ist erforderlich."
Expand Down
1 change: 1 addition & 0 deletions config/locales/app.public.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ en:
create_your_account: "Create your account"
man: "Man"
woman: "Woman"
other: "Other"
gender_is_required: "Gender is required."
your_first_name: "Your first name"
first_name_is_required: "First name is required."
Expand Down
1 change: 1 addition & 0 deletions config/locales/app.public.es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ es:
create_your_account: "Crear su cuenta"
man: "Hombre"
woman: "Mujer"
other: "Otro"
gender_is_required: "El genero es obligatorio."
your_first_name: "Su nombre"
first_name_is_required: "El nombre es obligatorio."
Expand Down
1 change: 1 addition & 0 deletions config/locales/app.public.fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ fr:
create_your_account: "Créer votre compte"
man: "Homme"
woman: "Femme"
other: "Autre"
gender_is_required: "Le genre est requis."
your_first_name: "Votre prénom"
first_name_is_required: "Le prénom est requis."
Expand Down
1 change: 1 addition & 0 deletions config/locales/app.public.no.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
create_your_account: "Opprett konto"
man: "Mann"
woman: "Kvinne"
other: "Annet"
gender_is_required: "Kjønn er nødvendig."
your_first_name: "Fornavn"
first_name_is_required: "Fornavn er påkrevd."
Expand Down
1 change: 1 addition & 0 deletions config/locales/app.public.zu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ zu:
create_your_account: "crwdns27878:0crwdne27878:0"
man: "crwdns27880:0crwdne27880:0"
woman: "crwdns27882:0crwdne27882:0"
other: "Other"
gender_is_required: "crwdns27884:0crwdne27884:0"
your_first_name: "crwdns27886:0crwdne27886:0"
first_name_is_required: "crwdns27888:0crwdne27888:0"
Expand Down
1 change: 1 addition & 0 deletions config/locales/app.shared.de.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ de:
gender_input:
man: "Man"
woman: "Woman"
other: "Unbestimmt"
change_password:
change_my_password: "Change my password"
confirm_current: "Confirm your current password"
Expand Down
1 change: 1 addition & 0 deletions config/locales/app.shared.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ en:
gender_input:
man: "Man"
woman: "Woman"
other: "Other"
change_password:
change_my_password: "Change my password"
confirm_current: "Confirm your current password"
Expand Down
5 changes: 3 additions & 2 deletions config/locales/app.shared.es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,9 @@ es:
must_accept_terms: "You must accept the terms and conditions"
save: "Save"
gender_input:
man: "Man"
woman: "Woman"
man: "Hombre"
woman: "Mujer"
other: "Otro"
change_password:
change_my_password: "Change my password"
confirm_current: "Confirm your current password"
Expand Down
1 change: 1 addition & 0 deletions config/locales/app.shared.fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ fr:
gender_input:
man: "Homme"
woman: "Femme"
other: "Autre"
change_password:
change_my_password: "Changer mon mot de passe"
confirm_current: "Confirmez votre mot de passe actuel"
Expand Down
1 change: 1 addition & 0 deletions config/locales/app.shared.no.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@
gender_input:
man: "Man"
woman: "Woman"
other: "Annet"
change_password:
change_my_password: "Change my password"
confirm_current: "Confirm your current password"
Expand Down
1 change: 1 addition & 0 deletions config/locales/app.shared.pt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ pt:
gender_input:
man: "Homem"
woman: "Mulher"
other: "Other"
change_password:
change_my_password: "Alterar a minha senha"
confirm_current: "Confirme sua senha atual"
Expand Down
1 change: 1 addition & 0 deletions config/locales/app.shared.zu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ zu:
gender_input:
man: "crwdns28704:0crwdne28704:0"
woman: "crwdns28706:0crwdne28706:0"
other: "Other"
change_password:
change_my_password: "crwdns28708:0crwdne28708:0"
confirm_current: "crwdns28710:0crwdne28710:0"
Expand Down
2 changes: 2 additions & 0 deletions config/locales/de.yml
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ de:
organization_address: "Adresse der Organisation"
man: "Mann"
woman: "Frau"
other: "Unbestimmt"
without_subscriptions: "Ohne Abonnement"
#machines/trainings/events reservations list to EXCEL format
export_reservations:
Expand Down Expand Up @@ -474,6 +475,7 @@ de:
type: "Typ"
male: "Männlich"
female: "Weiblich"
other: "Unbestimmt"
deleted_user: "Deleted user"
#initial price's category for events, created to replace the old "reduced amount" property
price_category:
Expand Down
1 change: 1 addition & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,7 @@ en:
type: "Type"
male: "Man"
female: "Woman"
other: "Other"
deleted_user: "Deleted user"
#initial price's category for events, created to replace the old "reduced amount" property
price_category:
Expand Down
2 changes: 2 additions & 0 deletions config/locales/es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ es:
organization_address: "Dirección de la organización"
man: "Hombre"
woman: "Mujer"
other: "Otro"
without_subscriptions: "Sin suscripciones"
#machines/trainings/events reservations list to EXCEL format
export_reservations:
Expand Down Expand Up @@ -474,6 +475,7 @@ es:
type: "Tipo"
male: "Hombre"
female: "Mujer"
other: "Otro"
deleted_user: "Deleted user"
#initial price's category for events, created to replace the old "reduced amount" property
price_category:
Expand Down
Loading