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

OI-2897: Update gender field in profile #4349

Merged
merged 4 commits into from
Feb 6, 2024
Merged
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
10 changes: 10 additions & 0 deletions common/user-clients.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,13 @@ export type UserClient = {
custom_goals?: CustomGoal[];
enrollment?: Enrollment;
};

export type Gender = {
'': string;
male_masculine: string;
female_feminine: string;
intersex: string;
transgender: string;
'non-binary': string;
do_not_wish_to_say: string;
};
10 changes: 7 additions & 3 deletions web/locales/en/messages.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ profile-form-custom-accent-placeholder-2 = Start typing to describe your accent
profile-form-age =
.label = Age
profile-form-gender-2 =
.label = Gender
.label = Sex or Gender
leaderboard-visibility =
.label = Leaderboard Visibility
hidden = Hidden
Expand All @@ -414,8 +414,12 @@ profile-form-add-accent = Add new custom accent "{ $inputValue }"
profile-form-submit-save = Save
profile-form-submit-saved = Saved

male = Male
female = Female
male_masculine = Male/Masculine
female_feminine = Female/Feminine
intersex = Intersex
transgender = Transgender
non-binary = Non-binary
do_not_wish_to_say = Don't wish to say
# Gender
other = Other
why-profile-title = Why a profile?
Expand Down
14 changes: 10 additions & 4 deletions web/src/stores/demographics.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// Please note - this list is no longer the canonical list of
// accents on the platform and will be removed in a future
// dataset release. For more info, please see this Discourse

import { Gender } from 'common';

// post: https://discourse.mozilla.org/t/89754
export const LEGACY_ACCENTS: any = {
br: {
Expand Down Expand Up @@ -287,9 +290,12 @@ export const AGES = {
nineties: '> 89',
};

export const GENDERS = {
export const GENDERS: Gender = {
'': '',
male: 'Male',
female: 'Female',
other: 'Other',
male_masculine: 'Male/Masculine',
female_feminine: 'Female/Feminine',
intersex: 'Intersex',
transgender: 'Transgender',
'non-binary': 'Non-binary',
do_not_wish_to_say: "Don't wish to say",
};
Loading