Skip to content

Commit

Permalink
Simplify enum values
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandernanberg committed Dec 17, 2024
1 parent 7364d7a commit 6b2660e
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 11 deletions.
8 changes: 4 additions & 4 deletions docs/pronouns.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ const GenderConst = {
NOT_A_PERSON = 0,
FEMALE = 1,
MALE = 2,
UNKNOWN_SINGULAR = 7,
UNKNOWN_PLURAL = 11,
UNKNOWN_SINGULAR = 3,
UNKNOWN_PLURAL = 4,
}
```

Expand Down Expand Up @@ -91,5 +91,5 @@ _Note how `reflexive` and `object` have 4 types_
0 NOT_A_PERSON they their themself this
1 FEMALE she her herself her
2 MALE he his himself him
7 UNKNOWN_SINGULAR they their themself them
11 UNKNOWN_PLURAL they their themselves them
3 UNKNOWN_SINGULAR they their themself them
4 UNKNOWN_PLURAL they their themselves them
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ exports[`Example.react renders the example 1`] = `
class="neatoSelect"
>
<option
value="11"
value="4"
>
Gender:
</option>
Expand All @@ -189,12 +189,12 @@ exports[`Example.react renders the example 1`] = `
Not a person
</option>
<option
value="11"
value="4"
>
Unknown (plural)
</option>
<option
value="7"
value="3"
>
Unknown (singular)
</option>
Expand Down
4 changes: 2 additions & 2 deletions packages/babel-plugin-fbtee/src/Gender.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ export enum GenderConst {
NOT_A_PERSON = 0,
FEMALE = 1,
MALE = 2,
UNKNOWN_SINGULAR = 7,
UNKNOWN_PLURAL = 11,
UNKNOWN_SINGULAR = 3,
UNKNOWN_PLURAL = 4,
}

export const Genders = [
Expand Down
8 changes: 8 additions & 0 deletions packages/fbtee/ReactTypes.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@ enum IntlVariations {
GENDER_UNKNOWN = 3,
}

enum GenderConst {
NOT_A_PERSON = 0,
FEMALE = 1,
MALE = 2,
UNKNOWN_SINGULAR = 3,
UNKNOWN_PLURAL = 4,
}

export type ParamOptions = {
/**
* `IntlVariations.GENDER_*` Pass the gender of the parameter for correctly variated text.
Expand Down
4 changes: 2 additions & 2 deletions packages/fbtee/src/GenderConst.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ enum GenderConst {
NOT_A_PERSON = 0,
FEMALE = 1,
MALE = 2,
UNKNOWN_SINGULAR = 7,
UNKNOWN_PLURAL = 11,
UNKNOWN_SINGULAR = 3,
UNKNOWN_PLURAL = 4,
}

export default GenderConst;

0 comments on commit 6b2660e

Please sign in to comment.