How to use the fbt.GenderConst.UNKNOWN_SINGULAR function in fbt

To help you get started, we’ve selected a few fbt examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github facebookincubator / fbt / live-demo-app / src / example / Example.react.js View on Github external
});
                    }}>
                    <option value="{GenderConst.UNKNOWN_PLURAL}">Gender:</option>
                    <option value="{GenderConst.FEMALE_SINGULAR}">
                      Female (Singular)
                    </option>
                    <option value="{GenderConst.MALE_SINGULAR}">
                      Male (Singular)
                    </option>
                    <option value="{GenderConst.NOT_A_PERSON}">
                      Not a person
                    </option>
                    <option value="{GenderConst.UNKNOWN_PLURAL}">
                      Unknown (Plural)
                    </option>
                    <option value="{GenderConst.UNKNOWN_SINGULAR}">
                      Unknown (Singular)
                    </option>
                  
                
              
            
            <fieldset>
              <span>
                {/* Use  and  for a complex sentence */}
                {this.state.ex2Name} has a {ExampleEnum[this.state.ex2Object]}{' '}
                to share!
                {/* 
                  
                    {this.state.ex2Name}
                  
                  has a</span></fieldset>
github facebookincubator / fbt / demo-app / src / example / Example.react.js View on Github external
ex1Gender: Variation,
  ex1Count: int,
  ex2Name: string,
  ex2Object: SharedObj,
  ex2Pronoun: PronounGender,
|};

export default class Example extends React.Component {
  state = {
    locale: 'en_US',
    ex1Name: 'Someone',
    ex1Gender: IntlVariations.GENDER_UNKNOWN,
    ex1Count: 1,
    ex2Name: 'Someone',
    ex2Object: 'LINK',
    ex2Pronoun: GenderConst.UNKNOWN_SINGULAR,
  };

  setLocale(locale: Locale) {
    IntlViewerContext.locale = locale;
    this.setState({locale});
    const html = document.getElementsByTagName('html')[0];
    if (html != null) {
      html.lang = LOCALES[locale].bcp47;
    }
    document.body.className = LOCALES[locale].rtl ? 'rtl' : 'ltr';
  }

  onSubmit(event: SyntheticInputEvent&lt;&gt;) {
    event.stopPropagation();
    event.preventDefault();
  }
github facebookincubator / fbt / live-demo-app / src / example / Example.react.js View on Github external
ex1Gender: Variation,
  ex1Count: int,
  ex2Name: string,
  ex2Object: SharedObj,
  ex2Pronoun: PronounGender,
|};

export default class Example extends React.Component {
  state = {
    locale: 'en_US',
    ex1Name: 'Someone',
    ex1Gender: IntlVariations.GENDER_UNKNOWN,
    ex1Count: 1,
    ex2Name: 'Someone',
    ex2Object: 'LINK',
    ex2Pronoun: GenderConst.UNKNOWN_SINGULAR,
  };

  setLocale(locale: Locale) {
    IntlViewerContext.locale = locale;
    this.setState({locale});
    const html = document.getElementsByTagName('html')[0];
    if (html != null) {
      html.lang = LOCALES[locale].bcp47;
    }
    document.body.className = LOCALES[locale].rtl ? 'rtl' : 'ltr';
  }

  onSubmit(event: SyntheticInputEvent&lt;&gt;) {
    event.stopPropagation();
    event.preventDefault();
  }
github facebookincubator / fbt / demo-app / src / example / Example.react.js View on Github external
className="neatoSelect"
                    onChange={(event: SyntheticUIEvent&lt;&gt;) =&gt; {
                      this.setState({
                        ex2Pronoun: parseInt(event.target.value, 10),
                      });
                    }}&gt;
                    <option value="{GenderConst.UNKNOWN_PLURAL}">
                      Gender:
                    </option>
                    <option value="{GenderConst.NOT_A_PERSON}">
                      Not a person
                    </option>
                    <option value="{GenderConst.UNKNOWN_PLURAL}">
                      Unknown (Plural)
                    </option>
                    <option value="{GenderConst.UNKNOWN_SINGULAR}">
                      Unknown (singular)
                    </option>
                    <option value="{GenderConst.MALE_SINGULAR}">
                      Male (singular)
                    </option>
                    <option value="{GenderConst.FEMALE_SINGULAR}">
                      Female (singular)
                    </option>
                  
                
              
            
            <fieldset>
              <span>
                
                  </span></fieldset>