{$mode objfpc}
{$M+}

uses typinfo;

type
    TRoosters = (GoldenRooster, Junglefowl, FightingCock, Fjalarr, Gullinkambi, GallicRooster, You);

    TTestPituh = class(TObject)
    private  
        TestField: TRoosters;
    published
        property TestProp: TRoosters read TestField write TestField;
    end;

function GetRoosterName(x: TRoosters): string;
    Var
        O : TTestPituh;
    begin
        O  := TTestPituh.Create;
        GetRoosterName := GetEnumName(GetPropInfo(O,'TestProp')^.PropType, Ord(x));
        O.Destroy
    end;

begin
    Writeln(GetRoosterName(FightingCock))
end.