This metaphor describes the deep sadness that Mary would feel. Alternate translation: "your sadness will be painful as though a sword pierced your soul" (See: [[rc://en/ta/man/jit/figs-metaphor]])
Here "hearts" is a metonym for people's inner beings. This can be stated in active form. Alternate translation: "he may reveal the thoughts of many people" or "he may reveal what many people secretly think" (See: [[rc://en/ta/man/jit/figs-metonymy]] and [[rc://en/ta/man/jit/figs-activepassive]])