From 6b2660efbc7c2411b716166dbe20fe7a6a0db9b9 Mon Sep 17 00:00:00 2001 From: Alexander Nanberg Date: Tue, 17 Dec 2024 09:52:22 +0100 Subject: [PATCH] Simplify enum values --- docs/pronouns.md | 8 ++++---- .../__tests__/__snapshots__/Example.react-test.tsx.snap | 6 +++--- packages/babel-plugin-fbtee/src/Gender.tsx | 4 ++-- packages/fbtee/ReactTypes.d.ts | 8 ++++++++ packages/fbtee/src/GenderConst.tsx | 4 ++-- 5 files changed, 19 insertions(+), 11 deletions(-) diff --git a/docs/pronouns.md b/docs/pronouns.md index 950158d0..8777f258 100644 --- a/docs/pronouns.md +++ b/docs/pronouns.md @@ -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, } ``` @@ -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 diff --git a/example/src/example/__tests__/__snapshots__/Example.react-test.tsx.snap b/example/src/example/__tests__/__snapshots__/Example.react-test.tsx.snap index f26bf6a5..b75d7a2d 100755 --- a/example/src/example/__tests__/__snapshots__/Example.react-test.tsx.snap +++ b/example/src/example/__tests__/__snapshots__/Example.react-test.tsx.snap @@ -179,7 +179,7 @@ exports[`Example.react renders the example 1`] = ` class="neatoSelect" > @@ -189,12 +189,12 @@ exports[`Example.react renders the example 1`] = ` Not a person diff --git a/packages/babel-plugin-fbtee/src/Gender.tsx b/packages/babel-plugin-fbtee/src/Gender.tsx index fd19ccf3..947ab48c 100644 --- a/packages/babel-plugin-fbtee/src/Gender.tsx +++ b/packages/babel-plugin-fbtee/src/Gender.tsx @@ -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 = [ diff --git a/packages/fbtee/ReactTypes.d.ts b/packages/fbtee/ReactTypes.d.ts index ea7d2ed5..97a58ea5 100644 --- a/packages/fbtee/ReactTypes.d.ts +++ b/packages/fbtee/ReactTypes.d.ts @@ -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. diff --git a/packages/fbtee/src/GenderConst.tsx b/packages/fbtee/src/GenderConst.tsx index 2fe6a0a7..60aaf53f 100644 --- a/packages/fbtee/src/GenderConst.tsx +++ b/packages/fbtee/src/GenderConst.tsx @@ -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;