Appointments+ gettext_with_context translation not working

I had a snippet in my theme's functions.php file which uses the gettext filter to translate some strings in the Appointments+ plugin. After updating the Appointments+ plugin, the function doesn't seem to be translating existing <span> tags properly, the tags are showing up in the front-end and the raw HTML (developer tools) show them as asci characters (< and >:wink:. Here's the full code snippet:

/* APPOINTMENTS CALENDAR - CHANGE ALL TEXT */
function wpmu_gettext_with_context( $translated_text, $untranslated_text, $domain ) {
if ( 'appointments' == $domain ) {
if (strpos($untranslated_text,'Our schedule from START to END') !== false) {
$translated_text = str_replace("Our schedule from START to END","<span>MAKE AN APPOINTMENT FOR</span><span>WEEK OF START</span>", $untranslated_text);
} else if (strpos($untranslated_text,'Click on a free time slot to apply for an appointment.') !== false) {
$translated_text = str_replace("Click on a free time slot to apply for an appointment.","Click light colored time slot to schedule.", $untranslated_text);
} else if (strpos($untranslated_text,'Please click here to confirm this appointment') !== false) {
$translated_text = str_replace("Please click here to confirm this appointment"," Confirm ", $untranslated_text);
} else if (strpos($untranslated_text,'Please check the appointment details below and confirm:') !== false) {
$translated_text = str_replace("Please check the appointment details below and confirm:","REVIEW APPOINTMENT & CONFIRM:", $untranslated_text);
} else if (strpos($untranslated_text,'<div class="appointments-confirmation-service"></div>') !== false) {
$translated_text = str_replace('<div class="appointments-confirmation-service"></div>','<div class="appointments-confirmation">Free Phone Consultation</div>', $untranslated_text);
/* adjust confirmation form labels */
} else if (strpos($untranslated_text,'Service provider:') !== false) {
$translated_text = str_replace("Service provider:","Consultation with:", $untranslated_text);
} else if (strpos($untranslated_text,'Your name:') !== false) {
$translated_text = str_replace("Your name:","Full Name:", $untranslated_text);
} else if (strpos($untranslated_text,'Your email:') !== false) {
$translated_text = str_replace("Your email:","Email:", $untranslated_text);
} else if (strpos($untranslated_text,'Your phone:') !== false) {
$translated_text = str_replace("Your phone:","Phone:", $untranslated_text);
} else if (strpos($untranslated_text,'We have received your appointment. Thanks!') !== false) {
$translated_text = str_replace("We have received your appointment. Thanks!",
"Your phone consultation has been scheduled! Now, check your email (or spam) to find -- K Dunn Conference Call Instructions.", $untranslated_text);
}
}

return $translated_text;
}
add_filter( 'gettext', 'wpmu_gettext_with_context', 10, 3 );

Please advice.