Its croatian or could be bosnian or serbian ( same language)
its a phrase it means " luck in unluck" this is literally translation, i don't know phrase in english. It's when something good happens in a bad situations, then u say that its a "sreća u nesreći", hope this help
The best way to understand is to set an example. But generally the meaning of this expression is: "fortunately", "luckily", "thankful", "happily" etc. Just like alby said, the literally translation would be "luck in unluck".
John: "What happened? You look terrible!
Charles: "My sister got in a car accident."
John: "Oh gosh! Is everything alright? Is she fine?"
Charles: "Yes, yes! *Fortunately, a random passerby was a doctor who helped her." *sreća u nesreći
John: "Što se dogodilo? Izgledaš očajno!"
Charles: "Moja je sestra imala prometnu nezgodnu."
Johan : "Ajme ! Je li sve u redu ? Je li dobro?"
Charles: "Da, da! Sreća u nesreći što je slučajan prolaznik bio doktor." Croatian version of the text above
So, instead of those adverbs as "fortunately", "luckily", "thankful", "happily" it can be used that expression. In Croatian that would be "nasreću" (eng. luckily – literally translation "on luck").
Generally, it's used when we have two actions:
the first one is harmful/bad etc.
the second one reduces the negative effect of the first.