منwhoever كانwas راعيهhis shepherd ديناًunclear in context; possibly 'a wolf' (ذئباً) فيin حُلوبتهhis milk-giving herd
من كان راعيه ديناً في حُلوبته
فهوso he is الذيthe one who نفسَهhimself فيin أمرهhis affairs ظلماwronged
فهو الذي نفسَه في أمره ظلما
Whoever has 'dīnan' (unclear here, possibly 'a wolf') as shepherd of his milk-giving herd,
He whose guide is religion in his youth
It is he who has wronged himself in his affairs.
Is he who wrongs himself in his affairs
تَرجوyou hope for كفايتهhis meeting your needs والغَدرُand treachery عادتهhis habit
تَرجو كفايته والغَدرُ عادته
ومنand from ولايتهhis guardianship يستجنيhe reaps النَّدماregret
ومن ولايته يستجني النَّدما
You hope he will meet your needs, though treachery is his habit;
You hope for his sufficiency though treachery is his habit
And from his guardianship one reaps regret.
And from his friendship one reaps regret
Sol 6.1