public function fillMessage(string $message, string $locale): LocalizedMessage
    {
        foreach ($this->details as $key => $detail) {
            $message = str_replace('{' . $key . '}', $this->flattenDetail($detail), $message);
        }

        return new LocalizedMessage($locale, $message);
    }