app/Http/Controllers/IndividualController.php
private function formatSexRecord(Fact $fact): string
    {
        $individual = $fact->record();

        switch ($fact->value()) {
            case 'M':
                $sex = I18N::translate('Male');
                break;
            case 'F':
                $sex = I18N::translate('Female');
                break;
            default:
                $sex = I18N::translateContext('unknown gender', 'Unknown');
                break;
        }

        $container_class = 'card';
        if ($fact->isPendingDeletion()) {
            $container_class .= ' old';
        } elseif ($fact->isPendingAddition()) {
            $container_class .= ' new';
        }

        if ($individual->canEdit()) {
            $edit_links = '<a class="btn btn-link" href="' . e(route('edit-fact', ['xref' => $individual->xref(), 'fact_id' => $fact->id(), 'ged' => $individual->tree()->name()])) . '" title="' . I18N::translate('Edit the gender') . '">' . view('icons/edit') . '<span class="sr-only">' . I18N::translate('Edit the gender') . '</span></a>';
        } else {
            $edit_links = '';
        }

        return '
		<div class="' . $container_class . '">
			<div class="card-header" role="tab" id="name-header-add">
				<div class="card-title mb-0">
					<b>' . I18N::translate('Gender') . '</b> ' . $sex . $edit_links . '
				</div>
			</div>
		</div>';
    }
private function formatSexRecord(Fact $fact): string
    {
        $individual = $fact->record();

        switch ($fact->value()) {
            case 'M':
                $sex = I18N::translate('Male');
                break;
            case 'F':
                $sex = I18N::translate('Female');
                break;
            default:
                $sex = I18N::translateContext('unknown gender', 'Unknown');
                break;
        }

        $container_class = 'card';
        if ($fact->isPendingDeletion()) {
            $container_class .= ' old';
        } elseif ($fact->isPendingAddition()) {
            $container_class .= ' new';
        }

        if ($individual->canEdit()) {
            $edit_links = '<a class="btn btn-link" href="' . e(route('edit-fact', ['xref' => $individual->xref(), 'fact_id' => $fact->id(), 'ged' => $individual->tree()->name()])) . '" title="' . I18N::translate('Edit the gender') . '">' . view('icons/edit') . '<span class="sr-only">' . I18N::translate('Edit the gender') . '</span></a>';
        } else {
            $edit_links = '';
        }

        return '
		<div class="' . $container_class . '">
			<div class="card-header" role="tab" id="name-header-add">
				<div class="card-title mb-0">
					<b>' . I18N::translate('Gender') . '</b> ' . $sex . $edit_links . '
				</div>
			</div>
		</div>';
    }
private function formatSexRecord ( Fact $ fact ) : string { $ individual = $ fact -> record ( ) ; switch ( $ fact -> value ( ) ) { case 'M' : $ sex = I18N :: translate ( 'Male' ) ; break ; case 'F' : $ sex = I18N :: translate ( 'Female' ) ; break ; default : $ sex = I18N :: translateContext ( 'unknown gender' , 'Unknown' ) ; break ; } $ container_class = 'card' ; if ( $ fact -> isPendingDeletion ( ) ) { $ container_class .= ' old' ; } elseif ( $ fact -> isPendingAddition ( ) ) { $ container_class .= ' new' ; } if ( $ individual -> canEdit ( ) ) { $ edit_links = '<a class="btn btn-link" href="' . e ( route ( 'edit-fact' , [ 'xref' => $ individual -> xref ( ) , 'fact_id' => $ fact -> id ( ) , 'ged' => $ individual -> tree ( ) -> name ( ) ] ) ) . '" title="' . I18N :: translate ( 'Edit the gender' ) . '">' . view ( 'icons/edit' ) . '<span class="sr-only">' . I18N :: translate ( 'Edit the gender' ) . '</span></a>' ; } else { $ edit_links = '' ; } return '
		<div class="' . $ container_class . '">
			<div class="card-header" role="tab" id="name-header-add">
				<div class="card-title mb-0">
					<b>' . I18N :: translate ( 'Gender' ) . '</b> ' . $ sex . $ edit_links . '
				</div>
			</div>
		</div>' ; }
print information for a sex record

@param Fact $fact

@return string
print information for a sex record