كأنماas though الحاجبُthe chamberlain الميمونُauspicious علّمهtaught him
كأنما الحاجبُ الميمونُ علّمه
فِعلَdoing الجميلِwhat is good فطابتand so became good منهfrom him أخلاقcharacter traits
فِعلَ الجميلِ فطابت منه أخلاق
As though the auspicious chamberlain had taught him
As if the auspicious eyebrow taught him
to do good, and so his character grew noble.
The practice of doing good, so his character was purified by it