That dialog is in NPC.cs within the source of Stardew Valley.exe itself. Hardcoded. Wait for an API to improve to affect it.
That probably contains dialogue for when you're caught going through the trash and when you try to propose when already married as well.