diff --git a/demo-app/src/example/Example.react.js b/demo-app/src/example/Example.react.js index 7f5fbe1d..6a200f68 100644 --- a/demo-app/src/example/Example.react.js +++ b/demo-app/src/example/Example.react.js @@ -272,11 +272,11 @@ export default class Example extends React.Component { - - diff --git a/demo-app/src/example/__tests__/__snapshots__/Example.react-test.js.snap b/demo-app/src/example/__tests__/__snapshots__/Example.react-test.js.snap index 679c9b5b..d79f5f08 100755 --- a/demo-app/src/example/__tests__/__snapshots__/Example.react-test.js.snap +++ b/demo-app/src/example/__tests__/__snapshots__/Example.react-test.js.snap @@ -210,7 +210,7 @@ exports[`Example.react renders the example 1`] = ` onChange={[Function]} > @@ -220,24 +220,24 @@ exports[`Example.react renders the example 1`] = ` Not a person diff --git a/docs/pronouns.md b/docs/pronouns.md index 47bfc6d2..49439006 100644 --- a/docs/pronouns.md +++ b/docs/pronouns.md @@ -15,17 +15,10 @@ const PRONOUN_USAGE = { const GenderConst = { NOT_A_PERSON: 0 - FEMALE_SINGULAR: 1 - MALE_SINGULAR: 2 - FEMALE_SINGULAR_GUESS: 3 - MALE_SINGULAR_GUESS: 4 - MIXED_UNKNOWN: 5 - NEUTER_SINGULAR: 6 - UNKNOWN_SINGULAR: 7 - FEMALE_PLURAL: 8 - MALE_PLURAL: 9 - NEUTER_PLURAL: 10 - UNKNOWN_PLURAL: 11 + UNKNOWN_SINGULAR: 1 + UNKNOWN_PLURAL: 2 + FEMALE: 3 + MALE: 4 } ``` @@ -85,14 +78,7 @@ Below is the table of possible values for their various types. V Name Subject Possessive Reflexive Object ============================================================= 0 NOT_A_PERSON they their themself this - 1 FEMALE_SINGULAR she her herself her - 2 MALE_SINGULAR he his himself him - 3 FEMALE_SINGULAR_GUESS she her herself her - 4 MALE_SINGULAR_GUESS he his himself him - 5 MIXED_UNKNOWN they their themselves them - 6 NEUTER_SINGULAR they their themself them - 7 UNKNOWN_SINGULAR they their themself them - 8 FEMALE_PLURAL they their themselves them - 9 MALE_PLURAL they their themselves them - 10 NEUTER_PLURAL they their themselves them - 11 UNKNOWN_PLURAL they their themselves them + 1 UNKNOWN_SINGULAR they their themself them + 2 UNKNOWN_PLURAL they their themselves them + 3 FEMALE she her herself her + 4 MALE he his himself him diff --git a/packages/babel-plugin-fbt/FbtMethodCallVisitors.js b/packages/babel-plugin-fbt/FbtMethodCallVisitors.js index 4ad9d191..43188f44 100644 --- a/packages/babel-plugin-fbt/FbtMethodCallVisitors.js +++ b/packages/babel-plugin-fbt/FbtMethodCallVisitors.js @@ -197,7 +197,7 @@ const call = function(moduleName) { // - enum string usage // e.g. 'object', 'possessive', 'reflexive', 'subject' // - enum int gender - // e.g. GenderConst.MALE_SINGULAR, FEMALE_SINGULAR, etc. + // e.g. GenderConst.MALE, FEMALE, etc. this.hasTable = true; diff --git a/packages/babel-plugin-fbt/Gender.js b/packages/babel-plugin-fbt/Gender.js index 92162a09..0efe5bbf 100644 --- a/packages/babel-plugin-fbt/Gender.js +++ b/packages/babel-plugin-fbt/Gender.js @@ -32,18 +32,10 @@ export type GenderConstEnum = $GenderConstEnum; // TODO(T70508769) Figure out a way to keep this in sync more transparently const GENDER_CONST = Object.freeze({ NOT_A_PERSON: ((0 /*: $FlowExpectedError*/ ) /*: GenderConstEnum*/), - FEMALE_SINGULAR: ((1 /*: $FlowExpectedError*/ ) /*: GenderConstEnum*/), - MALE_SINGULAR: ((2 /*: $FlowExpectedError*/ ) /*: GenderConstEnum*/), - FEMALE_SINGULAR_GUESS: ((3 /*: $FlowExpectedError*/ ) /*: GenderConstEnum*/), - MALE_SINGULAR_GUESS: ((4 /*: $FlowExpectedError*/ ) /*: GenderConstEnum*/), - // 5 seems to indicate a group of people who may be of mixed gender - MIXED_UNKNOWN: ((5 /*: $FlowExpectedError*/ ) /*: GenderConstEnum*/), - NEUTER_SINGULAR: ((6 /*: $FlowExpectedError*/ ) /*: GenderConstEnum*/), - UNKNOWN_SINGULAR: ((7 /*: $FlowExpectedError*/ ) /*: GenderConstEnum*/), - FEMALE_PLURAL: ((8 /*: $FlowExpectedError*/ ) /*: GenderConstEnum*/), - MALE_PLURAL: ((9 /*: $FlowExpectedError*/ ) /*: GenderConstEnum*/), - NEUTER_PLURAL: ((10 /*: $FlowExpectedError*/ ) /*: GenderConstEnum*/), - UNKNOWN_PLURAL: ((11 /*: $FlowExpectedError*/ ) /*: GenderConstEnum*/), + UNKNOWN_SINGULAR: ((1 /*: $FlowExpectedError*/ ) /*: GenderConstEnum*/), + UNKNOWN_PLURAL: ((2 /*: $FlowExpectedError*/ ) /*: GenderConstEnum*/), + FEMALE: ((3 /*: $FlowExpectedError*/ ) /*: GenderConstEnum*/), + MALE: ((4 /*: $FlowExpectedError*/ ) /*: GenderConstEnum*/), }); const data /*: {[GenderConstEnum]: GenderConfig} */ = { @@ -78,28 +70,28 @@ const data /*: {[GenderConstEnum]: GenderConfig} */ = { string: 'unknown singular', }, // $FlowExpectedError[invalid-computed-prop] Tolerate using an opaque type as an object key - [GENDER_CONST.FEMALE_SINGULAR]: { + [GENDER_CONST.UNKNOWN_PLURAL]: { is_male: false, - is_female: true, + is_female: false, is_neuter: false, - is_plural: false, + is_plural: true, is_mixed: false, is_guess: false, - is_unknown: false, - subject: 'she', - possessive: 'her', - reflexive: 'herself', - object: 'her', - string: 'female singular', + is_unknown: true, + subject: 'they', + possessive: 'their', + reflexive: 'themselves', + object: 'them', + string: 'unknown plural', }, // $FlowExpectedError[invalid-computed-prop] Tolerate using an opaque type as an object key - [GENDER_CONST.FEMALE_SINGULAR_GUESS]: { + [GENDER_CONST.FEMALE]: { is_male: false, is_female: true, is_neuter: false, is_plural: false, is_mixed: false, - is_guess: true, + is_guess: false, is_unknown: false, subject: 'she', possessive: 'her', @@ -108,7 +100,7 @@ const data /*: {[GenderConstEnum]: GenderConfig} */ = { string: 'female singular', }, // $FlowExpectedError[invalid-computed-prop] Tolerate using an opaque type as an object key - [GENDER_CONST.MALE_SINGULAR]: { + [GENDER_CONST.MALE]: { is_male: true, is_female: false, is_neuter: false, @@ -122,111 +114,6 @@ const data /*: {[GenderConstEnum]: GenderConfig} */ = { object: 'him', string: 'male singular', }, - // $FlowExpectedError[invalid-computed-prop] Tolerate using an opaque type as an object key - [GENDER_CONST.MALE_SINGULAR_GUESS]: { - is_male: true, - is_female: false, - is_neuter: false, - is_plural: false, - is_mixed: false, - is_guess: true, - is_unknown: false, - subject: 'he', - possessive: 'his', - reflexive: 'himself', - object: 'him', - string: 'male singular', - }, - // $FlowExpectedError[invalid-computed-prop] Tolerate using an opaque type as an object key - [GENDER_CONST.NEUTER_SINGULAR]: { - is_male: false, - is_female: false, - is_neuter: true, - is_plural: false, - is_mixed: false, - is_guess: false, - is_unknown: false, - subject: 'they', - possessive: 'their', - reflexive: 'themself', - object: 'them', - string: 'neuter singular', - }, - // $FlowExpectedError[invalid-computed-prop] Tolerate using an opaque type as an object key - [GENDER_CONST.MIXED_UNKNOWN]: { - is_male: false, - is_female: false, - is_neuter: false, - is_plural: true, - is_mixed: true, - is_guess: false, - is_unknown: false, - subject: 'they', - possessive: 'their', - reflexive: 'themselves', - object: 'them', - string: 'mixed plural', - }, - // $FlowExpectedError[invalid-computed-prop] Tolerate using an opaque type as an object key - [GENDER_CONST.FEMALE_PLURAL]: { - is_male: false, - is_female: true, - is_neuter: false, - is_plural: true, - is_mixed: false, - is_guess: false, - is_unknown: false, - subject: 'they', - possessive: 'their', - reflexive: 'themselves', - object: 'them', - string: 'female plural', - }, - // $FlowExpectedError[invalid-computed-prop] Tolerate using an opaque type as an object key - [GENDER_CONST.MALE_PLURAL]: { - is_male: true, - is_female: false, - is_neuter: false, - is_plural: true, - is_mixed: false, - is_guess: false, - is_unknown: false, - subject: 'they', - possessive: 'their', - reflexive: 'themselves', - object: 'them', - string: 'male plural', - }, - // $FlowExpectedError[invalid-computed-prop] Tolerate using an opaque type as an object key - [GENDER_CONST.NEUTER_PLURAL]: { - is_male: false, - is_female: false, - is_neuter: true, - is_plural: true, - is_mixed: false, - is_guess: false, - is_unknown: false, - subject: 'they', - possessive: 'their', - reflexive: 'themselves', - object: 'them', - string: 'neuter plural', - }, - // $FlowExpectedError[invalid-computed-prop] Tolerate using an opaque type as an object key - [GENDER_CONST.UNKNOWN_PLURAL]: { - is_male: false, - is_female: false, - is_neuter: false, - is_plural: true, - is_mixed: false, - is_guess: false, - is_unknown: true, - subject: 'they', - possessive: 'their', - reflexive: 'themselves', - object: 'them', - string: 'unknown plural', - }, }; function getData( diff --git a/packages/babel-plugin-fbt/JSFbtBuilder.js b/packages/babel-plugin-fbt/JSFbtBuilder.js index d3f97c36..58a80e7c 100644 --- a/packages/babel-plugin-fbt/JSFbtBuilder.js +++ b/packages/babel-plugin-fbt/JSFbtBuilder.js @@ -274,22 +274,15 @@ class JSFbtBuilder { ? GENDER_CONST.NOT_A_PERSON : GENDER_CONST.UNKNOWN_PLURAL; - case GENDER_CONST.FEMALE_SINGULAR: - case GENDER_CONST.FEMALE_SINGULAR_GUESS: - return GENDER_CONST.FEMALE_SINGULAR; + case GENDER_CONST.FEMALE: + return GENDER_CONST.FEMALE; - case GENDER_CONST.MALE_SINGULAR: - case GENDER_CONST.MALE_SINGULAR_GUESS: - return GENDER_CONST.MALE_SINGULAR; + case GENDER_CONST.MALE: + return GENDER_CONST.MALE; - case GENDER_CONST.MIXED_UNKNOWN: - case GENDER_CONST.FEMALE_PLURAL: - case GENDER_CONST.MALE_PLURAL: - case GENDER_CONST.NEUTER_PLURAL: case GENDER_CONST.UNKNOWN_PLURAL: return GENDER_CONST.UNKNOWN_PLURAL; - case GENDER_CONST.NEUTER_SINGULAR: case GENDER_CONST.UNKNOWN_SINGULAR: return usage === 'reflexive' ? GENDER_CONST.NOT_A_PERSON diff --git a/packages/babel-plugin-fbt/__tests__/__snapshots__/fbtFunctional-test.js.snap b/packages/babel-plugin-fbt/__tests__/__snapshots__/fbtFunctional-test.js.snap index 01a110a8..0a8ccdc9 100644 --- a/packages/babel-plugin-fbt/__tests__/__snapshots__/fbtFunctional-test.js.snap +++ b/packages/babel-plugin-fbt/__tests__/__snapshots__/fbtFunctional-test.js.snap @@ -296,8 +296,8 @@ Array [ ], "t": Object { "*": "You wished them a happy birthday.", - "1": "You wished her a happy birthday.", - "2": "You wished him a happy birthday.", + "3": "You wished her a happy birthday.", + "4": "You wished him a happy birthday.", }, }, "line_beg": 2, @@ -413,8 +413,8 @@ Array [ ], "t": Object { "*": "It is their birthday.", - "1": "It is her birthday.", - "2": "It is his birthday.", + "3": "It is her birthday.", + "4": "It is his birthday.", }, }, "line_beg": 2, @@ -445,11 +445,11 @@ Array [ "*": Object { "*": "They wished themselves a happy birthday.", }, - "1": Object { - "1": "She wished herself a happy birthday.", + "3": Object { + "3": "She wished herself a happy birthday.", }, - "2": Object { - "2": "He wished himself a happy birthday.", + "4": Object { + "4": "He wished himself a happy birthday.", }, }, }, @@ -877,8 +877,8 @@ Array [ ], "t": Object { "*": "You wished them a happy birthday.", - "1": "You wished her a happy birthday.", - "2": "You wished him a happy birthday.", + "3": "You wished her a happy birthday.", + "4": "You wished him a happy birthday.", }, }, "line_beg": 2, @@ -990,8 +990,8 @@ Array [ ], "t": Object { "*": "It is their birthday.", - "1": "It is her birthday.", - "2": "It is his birthday.", + "3": "It is her birthday.", + "4": "It is his birthday.", }, }, "line_beg": 2, @@ -1018,11 +1018,11 @@ Array [ "*": Object { "*": "They wished themselves a happy birthday.", }, - "1": Object { - "1": "She wished herself a happy birthday.", + "3": Object { + "3": "She wished herself a happy birthday.", }, - "2": Object { - "2": "He wished himself a happy birthday.", + "4": Object { + "4": "He wished himself a happy birthday.", }, }, }, @@ -1531,8 +1531,8 @@ Array [ ], "t": Object { "*": "You wished them a happy birthday.", - "1": "You wished her a happy birthday.", - "2": "You wished him a happy birthday.", + "3": "You wished her a happy birthday.", + "4": "You wished him a happy birthday.", }, }, "line_beg": 2, @@ -1648,8 +1648,8 @@ Array [ ], "t": Object { "*": "It is their birthday.", - "1": "It is her birthday.", - "2": "It is his birthday.", + "3": "It is her birthday.", + "4": "It is his birthday.", }, }, "line_beg": 2, @@ -1680,11 +1680,11 @@ Array [ "*": Object { "*": "They wished themselves a happy birthday.", }, - "1": Object { - "1": "She wished herself a happy birthday.", + "3": Object { + "3": "She wished herself a happy birthday.", }, - "2": Object { - "2": "He wished himself a happy birthday.", + "4": Object { + "4": "He wished himself a happy birthday.", }, }, }, @@ -2169,8 +2169,8 @@ Array [ ], "t": Object { "*": "You wished them a happy birthday.", - "1": "You wished her a happy birthday.", - "2": "You wished him a happy birthday.", + "3": "You wished her a happy birthday.", + "4": "You wished him a happy birthday.", }, }, "line_beg": 2, @@ -2282,8 +2282,8 @@ Array [ ], "t": Object { "*": "It is their birthday.", - "1": "It is her birthday.", - "2": "It is his birthday.", + "3": "It is her birthday.", + "4": "It is his birthday.", }, }, "line_beg": 2, @@ -2310,11 +2310,11 @@ Array [ "*": Object { "*": "They wished themselves a happy birthday.", }, - "1": Object { - "1": "She wished herself a happy birthday.", + "3": Object { + "3": "She wished herself a happy birthday.", }, - "2": Object { - "2": "He wished himself a happy birthday.", + "4": Object { + "4": "He wished himself a happy birthday.", }, }, }, diff --git a/packages/babel-plugin-fbt/__tests__/fbtFunctional-test.js b/packages/babel-plugin-fbt/__tests__/fbtFunctional-test.js index 326ab23f..61673297 100644 --- a/packages/babel-plugin-fbt/__tests__/fbtFunctional-test.js +++ b/packages/babel-plugin-fbt/__tests__/fbtFunctional-test.js @@ -1005,8 +1005,8 @@ const generalTestData = { type: 'table', jsfbt: { t: { - '1': 'You wished her a happy birthday.', - '2': 'You wished him a happy birthday.', + '3': 'You wished her a happy birthday.', + '4': 'You wished him a happy birthday.', '*': 'You wished them a happy birthday.', }, m: [null], @@ -1052,11 +1052,11 @@ const generalTestData = { type: 'table', jsfbt: { t: { - '1': { - '1': 'She wished herself a happy birthday.', + '3': { + '3': 'She wished herself a happy birthday.', }, - '2': { - '2': 'He wished himself a happy birthday.', + '4': { + '4': 'He wished himself a happy birthday.', }, '*': { '*': 'They wished themselves a happy birthday.', @@ -1101,8 +1101,8 @@ const generalTestData = { type: 'table', jsfbt: { t: { - '1': 'It is her birthday.', - '2': 'It is his birthday.', + '3': 'It is her birthday.', + '4': 'It is his birthday.', '*': 'It is their birthday.', }, m: [null], diff --git a/packages/babel-plugin-fbt/__tests__/fbtJsx-test.js b/packages/babel-plugin-fbt/__tests__/fbtJsx-test.js index e2cb7425..287c3466 100644 --- a/packages/babel-plugin-fbt/__tests__/fbtJsx-test.js +++ b/packages/babel-plugin-fbt/__tests__/fbtJsx-test.js @@ -660,8 +660,8 @@ const testData = { type: 'table', jsfbt: { t: { - '1': 'Wish her a happy birthday.', - '2': 'Wish him a happy birthday.', + '3': 'Wish her a happy birthday.', + '4': 'Wish him a happy birthday.', '*': 'Wish them a happy birthday.', }, m: [null], @@ -695,8 +695,8 @@ const testData = { type: 'table', jsfbt: { t: { - '1': 'Wish her a happy birthday.', - '2': 'Wish him a happy birthday.', + '3': 'Wish her a happy birthday.', + '4': 'Wish him a happy birthday.', '*': 'Wish them a happy birthday.', }, m: [ @@ -731,11 +731,11 @@ const testData = { type: 'table', jsfbt: { t: { - '1': { - '1': 'She wished herself a happy birthday.', + '3': { + '3': 'She wished herself a happy birthday.', }, - '2': { - '2': 'He wished himself a happy birthday.', + '4': { + '4': 'He wished himself a happy birthday.', }, '*': { '*': 'They wished themselves a happy birthday.', @@ -775,11 +775,11 @@ const testData = { type: 'table', jsfbt: { t: { - '1': { - '1': 'She wished herself a happy birthday.', + '3': { + '3': 'She wished herself a happy birthday.', }, - '2': { - '2': 'He wished himself a happy birthday.', + '4': { + '4': 'He wished himself a happy birthday.', }, '*': { '*': 'They wished themselves a happy birthday.', diff --git a/packages/babel-plugin-fbt/__tests__/fbtPronoun-test.js b/packages/babel-plugin-fbt/__tests__/fbtPronoun-test.js index c067a7c1..00035265 100644 --- a/packages/babel-plugin-fbt/__tests__/fbtPronoun-test.js +++ b/packages/babel-plugin-fbt/__tests__/fbtPronoun-test.js @@ -43,8 +43,8 @@ describe('fbt pronoun support', () => { type: 'table', jsfbt: { t: { - '1': 'Her birthday is today.', - '2': 'His birthday is today.', + '3': 'Her birthday is today.', + '4': 'His birthday is today.', '*': 'Their birthday is today.', }, m: [null], @@ -117,8 +117,8 @@ describe('fbt pronoun support', () => { type: 'table', jsfbt: { t: { - '1': 'Wish her a happy birthday.', - '2': 'Wish him a happy birthday.', + '3': 'Wish her a happy birthday.', + '4': 'Wish him a happy birthday.', '*': 'Wish them a happy birthday.', }, m: [null], @@ -152,8 +152,8 @@ describe('fbt pronoun support (react native)', () => { type: 'table', jsfbt: { t: { - '1': 'Her birthday is today.', - '2': 'His birthday is today.', + '3': 'Her birthday is today.', + '4': 'His birthday is today.', '*': 'Their birthday is today.', }, m: [ @@ -234,8 +234,8 @@ describe('fbt pronoun support (react native)', () => { type: 'table', jsfbt: { t: { - '1': 'Wish her a happy birthday.', - '2': 'Wish him a happy birthday.', + '3': 'Wish her a happy birthday.', + '4': 'Wish him a happy birthday.', '*': 'Wish them a happy birthday.', }, m: [ diff --git a/packages/babel-plugin-fbt/bin/__tests__/collectFBT-test.js b/packages/babel-plugin-fbt/bin/__tests__/collectFBT-test.js index c3163e77..43ae9f6e 100644 --- a/packages/babel-plugin-fbt/bin/__tests__/collectFBT-test.js +++ b/packages/babel-plugin-fbt/bin/__tests__/collectFBT-test.js @@ -394,11 +394,11 @@ describe('collectFBT', () => { '*': '{name} sells their items', _1: '{name} sells their item', }, - 1: { + 3: { '*': '{name} sells her items', _1: '{name} sells her item', }, - 2: { + 4: { '*': '{name} sells his items', _1: '{name} sells his item', }, @@ -444,11 +444,11 @@ describe('collectFBT', () => { '*': '{name} sells their items', _1: '{name} sells their item', }, - 1: { + 3: { '*': '{name} sells her items', _1: '{name} sells her item', }, - 2: { + 4: { '*': '{name} sells his items', _1: '{name} sells his item', }, diff --git a/runtime/nonfb/GenderConst.js b/runtime/nonfb/GenderConst.js index 42f897a7..c3ed1a7c 100644 --- a/runtime/nonfb/GenderConst.js +++ b/runtime/nonfb/GenderConst.js @@ -16,17 +16,10 @@ export type GenderConstEnum = $GenderConstEnum; const GenderConst = Object.freeze({ /* eslint-disable fb-www/no-flowfixme-in-flow-strict */ NOT_A_PERSON: ((0: $FlowFixMe): GenderConstEnum), - FEMALE_SINGULAR: ((1: $FlowFixMe): GenderConstEnum), - MALE_SINGULAR: ((2: $FlowFixMe): GenderConstEnum), - FEMALE_SINGULAR_GUESS: ((3: $FlowFixMe): GenderConstEnum), - MALE_SINGULAR_GUESS: ((4: $FlowFixMe): GenderConstEnum), - MIXED_UNKNOWN: ((5: $FlowFixMe): GenderConstEnum), - NEUTER_SINGULAR: ((6: $FlowFixMe): GenderConstEnum), - UNKNOWN_SINGULAR: ((7: $FlowFixMe): GenderConstEnum), - FEMALE_PLURAL: ((8: $FlowFixMe): GenderConstEnum), - MALE_PLURAL: ((9: $FlowFixMe): GenderConstEnum), - NEUTER_PLURAL: ((10: $FlowFixMe): GenderConstEnum), - UNKNOWN_PLURAL: ((11: $FlowFixMe): GenderConstEnum), + UNKNOWN_SINGULAR: ((1: $FlowFixMe): GenderConstEnum), + UNKNOWN_PLURAL: ((2: $FlowFixMe): GenderConstEnum), + MALE: ((3: $FlowFixMe): GenderConstEnum), + FEMALE: ((4: $FlowFixMe): GenderConstEnum), /* eslint-enable fb-www/no-flowfixme-in-flow-strict */ }); diff --git a/runtime/shared/IntlGender.js b/runtime/shared/IntlGender.js index 7c97db93..afbccb6c 100644 --- a/runtime/shared/IntlGender.js +++ b/runtime/shared/IntlGender.js @@ -39,11 +39,9 @@ function fromMultiple(genders: Array): number { function fromDisplayGender(gender: DisplayGenderConstType): number { switch (gender) { case DisplayGenderConst.MALE: - return GenderConst.MALE_SINGULAR; + return GenderConst.MALE; case DisplayGenderConst.FEMALE: - return GenderConst.FEMALE_SINGULAR; - case DisplayGenderConst.NEUTER: - return GenderConst.NEUTER_SINGULAR; + return GenderConst.FEMALE default: return GenderConst.NOT_A_PERSON; } diff --git a/runtime/shared/fbt.js b/runtime/shared/fbt.js index f0fcd384..8e4d22cb 100644 --- a/runtime/shared/fbt.js +++ b/runtime/shared/fbt.js @@ -300,7 +300,7 @@ fbt._plural = function(count, label, value) { * fbt._pronoun() takes a 'usage' string and a GenderConst value and returns a tuple in the format: * [variations, null] * @param {number} usage - Example: PRONOUN_USAGE.object. - * @param {number} gender - Example: GenderConst.MALE_SINGULAR + * @param {number} gender - Example: GenderConst.MALE * @param {?object} options - Example: { human: 1 } */ fbt._pronoun = function(usage, gender, options) { @@ -321,22 +321,15 @@ function getPronounGenderKey(usage, gender) { ? GenderConst.NOT_A_PERSON : GenderConst.UNKNOWN_PLURAL; - case GenderConst.FEMALE_SINGULAR: - case GenderConst.FEMALE_SINGULAR_GUESS: - return GenderConst.FEMALE_SINGULAR; + case GenderConst.FEMALE: + return GenderConst.FEMALE; - case GenderConst.MALE_SINGULAR: - case GenderConst.MALE_SINGULAR_GUESS: - return GenderConst.MALE_SINGULAR; + case GenderConst.MALE: + return GenderConst.MALE; - case GenderConst.MIXED_UNKNOWN: - case GenderConst.FEMALE_PLURAL: - case GenderConst.MALE_PLURAL: - case GenderConst.NEUTER_PLURAL: case GenderConst.UNKNOWN_PLURAL: return GenderConst.UNKNOWN_PLURAL; - case GenderConst.NEUTER_SINGULAR: case GenderConst.UNKNOWN_SINGULAR: return usage === PRONOUN_USAGE.REFLEXIVE ? GenderConst.NOT_A_PERSON