Changeset View
Changeset View
Standalone View
Standalone View
src/applications/settings/setting/PhabricatorPronounSetting.php
| Show All 16 Lines | protected function getSettingOrder() { | ||||
| return 200; | return 200; | ||||
| } | } | ||||
| protected function getControlInstructions() { | protected function getControlInstructions() { | ||||
| return pht('Choose the pronoun you prefer.'); | return pht('Choose the pronoun you prefer.'); | ||||
| } | } | ||||
| public function getSettingDefaultValue() { | public function getSettingDefaultValue() { | ||||
| return PhutilPerson::SEX_UNKNOWN; | return PhutilPerson::GENDER_UNKNOWN; | ||||
| } | } | ||||
| protected function getSelectOptions() { | protected function getSelectOptions() { | ||||
| // TODO: When editing another user's settings as an administrator, this | // TODO: When editing another user's settings as an administrator, this | ||||
| // is not the best username: the user's username would be better. | // is not the best username: the user's username would be better. | ||||
| $viewer = $this->getViewer(); | $viewer = $this->getViewer(); | ||||
| $username = $viewer->getUsername(); | $username = $viewer->getUsername(); | ||||
| $label_unknown = pht('%s updated their profile', $username); | $label_unknown = pht('%s updated their profile', $username); | ||||
| $label_her = pht('%s updated her profile', $username); | $label_her = pht('%s updated her profile', $username); | ||||
| $label_his = pht('%s updated his profile', $username); | $label_his = pht('%s updated his profile', $username); | ||||
| return array( | return array( | ||||
| PhutilPerson::SEX_UNKNOWN => $label_unknown, | PhutilPerson::GENDER_UNKNOWN => $label_unknown, | ||||
| PhutilPerson::SEX_MALE => $label_his, | PhutilPerson::GENDER_MASCULINE => $label_his, | ||||
| PhutilPerson::SEX_FEMALE => $label_her, | PhutilPerson::GENDER_FEMININE => $label_her, | ||||
| ); | ); | ||||
| } | } | ||||
| } | } | ||||