Remove markup in plausi messages

This commit is contained in:
Joshua Ramon Enslin 2023-07-25 15:32:17 +02:00
parent 4557165a0c
commit 517f21f910
Signed by: jrenslin
GPG Key ID: 46016F84501B70AE

View File

@ -53,14 +53,14 @@ final class MDPlausi {
// Work on the object started before the actor was born // Work on the object started before the actor was born
if ($event->time_start_normalized !== false && $event->time_start_normalized < $event->actor_birth_normalized) { if ($event->time_start_normalized !== false && $event->time_start_normalized < $event->actor_birth_normalized) {
$this->_messageList[] = '<b>' . $this->_tlLoader->tl("eventtype_name", "eventname", (string)$event->event_type) . '</b> (' . $event->time_name . ') ' . $this->_tlLoader->tl("quality", "quality", "before_birth_possibly") . ' ' . $event->actor_name; $this->_messageList[] = $this->_tlLoader->tl("eventtype_name", "eventname", (string)$event->event_type) . ' (' . $event->time_name . ') ' . $this->_tlLoader->tl("quality", "quality", "before_birth_possibly") . ' ' . $event->actor_name;
} }
// The actor was involved with the object totally before they were born // The actor was involved with the object totally before they were born
// Ended being involved before birth // Ended being involved before birth
else if ($event->time_end_normalized !== false && $event->time_end_normalized < $event->actor_birth_normalized) { else if ($event->time_end_normalized !== false && $event->time_end_normalized < $event->actor_birth_normalized) {
$this->_messageList[] = '<b>' . $this->_tlLoader->tl("eventtype_name", "eventname", (string)$event->event_type) . '</b> (' . $event->time_name . ') ' . $this->_tlLoader->tl("quality", "quality", "before_birth") . ' ' . $event->actor_name; $this->_messageList[] = $this->_tlLoader->tl("eventtype_name", "eventname", (string)$event->event_type) . ' (' . $event->time_name . ') ' . $this->_tlLoader->tl("quality", "quality", "before_birth") . ' ' . $event->actor_name;
$this->_hasCertainWarnings = true; $this->_hasCertainWarnings = true;
} }
@ -71,11 +71,11 @@ final class MDPlausi {
// Check if the actor died before they started being involved with the object // Check if the actor died before they started being involved with the object
if ($event->time_start_normalized !== false && $event->actor_death_normalized < $event->time_start_normalized) { if ($event->time_start_normalized !== false && $event->actor_death_normalized < $event->time_start_normalized) {
$this->_messageList[] = '<b>' . $this->_tlLoader->tl("eventtype_name", "eventname", (string)$event->event_type) . '</b> (' . $event->time_name . ') ' . $this->_tlLoader->tl("quality", "quality", "after_death") . ' ' . $event->actor_name; $this->_messageList[] = $this->_tlLoader->tl("eventtype_name", "eventname", (string)$event->event_type) . ' (' . $event->time_name . ') ' . $this->_tlLoader->tl("quality", "quality", "after_death") . ' ' . $event->actor_name;
$this->_hasCertainWarnings = true; $this->_hasCertainWarnings = true;
} }
else if ($event->time_end_normalized !== false && $event->actor_death_normalized < $event->time_end_normalized) { else if ($event->time_end_normalized !== false && $event->actor_death_normalized < $event->time_end_normalized) {
$this->_messageList[] = '<b>' . $this->_tlLoader->tl("eventtype_name", "eventname", (string)$event->event_type) . '</b> (' . $event->time_name . ') ' . $this->_tlLoader->tl("quality", "quality", "after_death_possibly") . ' ' . $event->actor_name; $this->_messageList[] = $this->_tlLoader->tl("eventtype_name", "eventname", (string)$event->event_type) . ' (' . $event->time_name . ') ' . $this->_tlLoader->tl("quality", "quality", "after_death_possibly") . ' ' . $event->actor_name;
} }
} }
@ -96,11 +96,11 @@ final class MDPlausi {
&& $this->_template_creation->earliest_event_type !== 0 && $this->_template_creation->earliest_event_type !== 0
&& $this->_printing_plate->latest < $this->_template_creation->earliest) { && $this->_printing_plate->latest < $this->_template_creation->earliest) {
$message = '<b>' . $this->_tlLoader->tl("eventtype_name", "eventname", "12") . '</b>'; $message = $this->_tlLoader->tl("eventtype_name", "eventname", "12");
$message .= $this->_printing_plate->formulateMessagePartForLatest($this->_tlLoader); $message .= $this->_printing_plate->formulateMessagePartForLatest($this->_tlLoader);
$message .= ' ' . $this->_tlLoader->tl("quality", "quality", "before") . ' <b>' . $this->_tlLoader->tl("eventtype_name", "eventname", "4") . '</b>'; $message .= ' ' . strtolower($this->_tlLoader->tl("quality", "quality", "before")) . ' ' . $this->_tlLoader->tl("eventtype_name", "eventname", "4");
$message .= $this->_template_creation->formulateMessagePartForEarliest($this->_tlLoader); $message .= $this->_template_creation->formulateMessagePartForEarliest($this->_tlLoader);
@ -113,11 +113,11 @@ final class MDPlausi {
&& $this->_template_creation->latest_event_type !== 0 && $this->_template_creation->latest_event_type !== 0
&& $this->_printing_plate->latest < $this->_template_creation->latest) { && $this->_printing_plate->latest < $this->_template_creation->latest) {
$message = '<b>' . $this->_tlLoader->tl("eventtype_name", "eventname", "12") . '</b>'; $message = $this->_tlLoader->tl("eventtype_name", "eventname", "12");
$message .= $this->_printing_plate->formulateMessagePartForLatest($this->_tlLoader); $message .= $this->_printing_plate->formulateMessagePartForLatest($this->_tlLoader);
$message .= ' ' . $this->_tlLoader->tl("quality", "quality", "before_possibly") . ' <b>' . $this->_tlLoader->tl("eventtype_name", "eventname", "4") . '</b>'; $message .= ' ' . $this->_tlLoader->tl("quality", "quality", "before_possibly") . ' ' . $this->_tlLoader->tl("eventtype_name", "eventname", "4");
$message .= $this->_template_creation->formulateMessagePartForLatest($this->_tlLoader); $message .= $this->_template_creation->formulateMessagePartForLatest($this->_tlLoader);
@ -139,7 +139,7 @@ final class MDPlausi {
// Paintings should not be printed at the same time // Paintings should not be printed at the same time
if ($this->_is_painted_drawn === true and $this->_is_print_material === true) { if ($this->_is_painted_drawn === true and $this->_is_print_material === true) {
$message = '<b>' . $this->_tlLoader->tl("quality", "quality", "print_not_paint") . '</b> ' . $this->_tlLoader->tl("quality", "quality", "better_use") . ' "' . $this->_tlLoader->tl("eventtype_name", "eventname", "4") . '" . '; $message = $this->_tlLoader->tl("quality", "quality", "print_not_paint") . ' ' . $this->_tlLoader->tl("quality", "quality", "better_use") . ' "' . $this->_tlLoader->tl("eventtype_name", "eventname", "4") . '" . ';
$this->_hasCertainWarnings = true; $this->_hasCertainWarnings = true;
} }
@ -159,11 +159,11 @@ final class MDPlausi {
&& $this->_pre_production->earliest_event_type !== 0 && $this->_pre_production->earliest_event_type !== 0
&& $this->_production->latest < $this->_pre_production->earliest) { && $this->_production->latest < $this->_pre_production->earliest) {
$message = '<b>' . $this->_tlLoader->tl("eventtype_name", "eventname", (string)$this->_production->latest_event_type) . '</b>'; $message = $this->_tlLoader->tl("eventtype_name", "eventname", (string)$this->_production->latest_event_type);
$message .= $this->_production->formulateMessagePartForLatest($this->_tlLoader); $message .= $this->_production->formulateMessagePartForLatest($this->_tlLoader);
$message .= ' ' . $this->_tlLoader->tl("quality", "quality", "before") . ' <b>' . $this->_tlLoader->tl("eventtype_name", "eventname", (string)$this->_pre_production->earliest_event_type) . '</b>'; $message .= ' ' . strtolower($this->_tlLoader->tl("quality", "quality", "before")) . ' ' . $this->_tlLoader->tl("eventtype_name", "eventname", (string)$this->_pre_production->earliest_event_type);
$message .= $this->_pre_production->formulateMessagePartForEarliest($this->_tlLoader); $message .= $this->_pre_production->formulateMessagePartForEarliest($this->_tlLoader);
@ -177,11 +177,11 @@ final class MDPlausi {
&& $this->_pre_production->latest_event_type !== 0 && $this->_pre_production->latest_event_type !== 0
&& $this->_production->latest < $this->_pre_production->latest) { && $this->_production->latest < $this->_pre_production->latest) {
$message = '<b>' . $this->_tlLoader->tl("eventtype_name", "eventname", (string)$this->_production->latest_event_type) . '</b>'; $message = $this->_tlLoader->tl("eventtype_name", "eventname", (string)$this->_production->latest_event_type);
$message .= $this->_production->formulateMessagePartForLatest($this->_tlLoader); $message .= $this->_production->formulateMessagePartForLatest($this->_tlLoader);
$message .= ' ' . $this->_tlLoader->tl("quality", "quality", "before_possibly") . ' <b>' . $this->_tlLoader->tl("eventtype_name", "eventname", (string)$this->_pre_production->latest_event_type) . '</b>'; $message .= ' ' . $this->_tlLoader->tl("quality", "quality", "before_possibly") . ' ' . $this->_tlLoader->tl("eventtype_name", "eventname", (string)$this->_pre_production->latest_event_type);
$message .= $this->_pre_production->formulateMessagePartForLatest($this->_tlLoader); $message .= $this->_pre_production->formulateMessagePartForLatest($this->_tlLoader);
@ -204,11 +204,11 @@ final class MDPlausi {
&& $this->_pre_production->earliest_event_type !== 0 && $this->_pre_production->earliest_event_type !== 0
&& $this->_post_production->latest < $this->_pre_production->earliest) { && $this->_post_production->latest < $this->_pre_production->earliest) {
$message = '<b>' . $this->_tlLoader->tl("eventtype_name", "eventname", (string)$this->_post_production->latest_event_type) . '</b>'; $message = $this->_tlLoader->tl("eventtype_name", "eventname", (string)$this->_post_production->latest_event_type);
$message .= $this->_post_production->formulateMessagePartForLatest($this->_tlLoader); $message .= $this->_post_production->formulateMessagePartForLatest($this->_tlLoader);
$message .= ' ' . $this->_tlLoader->tl("quality", "quality", "before") . ' <b>' . $this->_tlLoader->tl("eventtype_name", "eventname", (string)$this->_pre_production->earliest_event_type) . '</b>'; $message .= ' ' . strtolower($this->_tlLoader->tl("quality", "quality", "before")) . ' ' . $this->_tlLoader->tl("eventtype_name", "eventname", (string)$this->_pre_production->earliest_event_type);
$message .= $this->_pre_production->formulateMessagePartForEarliest($this->_tlLoader); $message .= $this->_pre_production->formulateMessagePartForEarliest($this->_tlLoader);
@ -222,11 +222,11 @@ final class MDPlausi {
&& $this->_pre_production->latest_event_type !== 0 && $this->_pre_production->latest_event_type !== 0
&& $this->_post_production->latest < $this->_pre_production->latest) { && $this->_post_production->latest < $this->_pre_production->latest) {
$message = '<b>' . $this->_tlLoader->tl("eventtype_name", "eventname", (string)$this->_post_production->latest_event_type) . '</b>'; $message = $this->_tlLoader->tl("eventtype_name", "eventname", (string)$this->_post_production->latest_event_type);
$message .= $this->_post_production->formulateMessagePartForLatest($this->_tlLoader); $message .= $this->_post_production->formulateMessagePartForLatest($this->_tlLoader);
$message .= ' ' . $this->_tlLoader->tl("quality", "quality", "before") . ' <b>' . $this->_tlLoader->tl("eventtype_name", "eventname", (string)$this->_pre_production->latest_event_type) . '</b>'; $message .= ' ' . strtolower($this->_tlLoader->tl("quality", "quality", "before")) . ' ' . $this->_tlLoader->tl("eventtype_name", "eventname", (string)$this->_pre_production->latest_event_type);
$message .= $this->_pre_production->formulateMessagePartForLatest($this->_tlLoader); $message .= $this->_pre_production->formulateMessagePartForLatest($this->_tlLoader);
@ -242,11 +242,11 @@ final class MDPlausi {
&& $this->_pre_production->earliest_event_type !== 0 && $this->_pre_production->earliest_event_type !== 0
&& $this->_post_production->earliest < $this->_pre_production->earliest) { && $this->_post_production->earliest < $this->_pre_production->earliest) {
$message = '<b>' . $this->_tlLoader->tl("eventtype_name", "eventname", (string)$this->_post_production->earliest_event_type) . '</b>'; $message = $this->_tlLoader->tl("eventtype_name", "eventname", (string)$this->_post_production->earliest_event_type);
$message .= $this->_post_production->formulateMessagePartForEarliest($this->_tlLoader); $message .= $this->_post_production->formulateMessagePartForEarliest($this->_tlLoader);
$message .= ' ' . $this->_tlLoader->tl("quality", "quality", "before_possibly") . ' <b>' . $this->_tlLoader->tl("eventtype_name", "eventname", (string)$this->_pre_production->earliest_event_type) . '</b>'; $message .= ' ' . $this->_tlLoader->tl("quality", "quality", "before_possibly") . ' ' . $this->_tlLoader->tl("eventtype_name", "eventname", (string)$this->_pre_production->earliest_event_type);
$message .= $this->_pre_production->formulateMessagePartForEarliest($this->_tlLoader); $message .= $this->_pre_production->formulateMessagePartForEarliest($this->_tlLoader);
@ -268,11 +268,11 @@ final class MDPlausi {
&& $this->_production->earliest_event_type !== 0 && $this->_production->earliest_event_type !== 0
&& $this->_post_production->earliest < $this->_production->earliest) { && $this->_post_production->earliest < $this->_production->earliest) {
$message = '<b>' . $this->_tlLoader->tl("eventtype_name", "eventname", (string)$this->_post_production->earliest_event_type) . '</b>'; $message = $this->_tlLoader->tl("eventtype_name", "eventname", (string)$this->_post_production->earliest_event_type);
$message .= $this->_post_production->formulateMessagePartForEarliest($this->_tlLoader); $message .= $this->_post_production->formulateMessagePartForEarliest($this->_tlLoader);
$message .= ' ' . $this->_tlLoader->tl("quality", "quality", "before") . ' <b>' . $this->_tlLoader->tl("eventtype_name", "eventname", (string)$this->_production->earliest_event_type) . '</b>'; $message .= ' ' . strtolower($this->_tlLoader->tl("quality", "quality", "before")) . ' ' . $this->_tlLoader->tl("eventtype_name", "eventname", (string)$this->_production->earliest_event_type);
$message .= $this->_production->formulateMessagePartForEarliest($this->_tlLoader); $message .= $this->_production->formulateMessagePartForEarliest($this->_tlLoader);
@ -285,11 +285,11 @@ final class MDPlausi {
&& $this->_production->latest_event_type !== 0 && $this->_production->latest_event_type !== 0
&& $this->_post_production->earliest < $this->_production->latest) { && $this->_post_production->earliest < $this->_production->latest) {
$message = '<b>' . $this->_tlLoader->tl("eventtype_name", "eventname", (string)$this->_post_production->earliest_event_type) . '</b>'; $message = $this->_tlLoader->tl("eventtype_name", "eventname", (string)$this->_post_production->earliest_event_type);
$message .= $this->_post_production->formulateMessagePartForEarliest($this->_tlLoader); $message .= $this->_post_production->formulateMessagePartForEarliest($this->_tlLoader);
$message .= ' ' . $this->_tlLoader->tl("quality", "quality", "before_possibly") . ' <b>' . $this->_tlLoader->tl("eventtype_name", "eventname", (string)$this->_production->latest_event_type) . '</b>'; $message .= ' ' . $this->_tlLoader->tl("quality", "quality", "before_possibly") . ' ' . $this->_tlLoader->tl("eventtype_name", "eventname", (string)$this->_production->latest_event_type);
$message .= $this->_production->formulateMessagePartForLatest($this->_tlLoader); $message .= $this->_production->formulateMessagePartForLatest($this->_tlLoader);
@ -300,11 +300,11 @@ final class MDPlausi {
&& $this->_production->latest_event_type !== 0 && $this->_production->latest_event_type !== 0
&& $this->_post_production->latest < $this->_production->latest) { && $this->_post_production->latest < $this->_production->latest) {
$message = '<b>' . $this->_tlLoader->tl("eventtype_name", "eventname", (string)$this->_post_production->latest_event_type) . '</b>'; $message = $this->_tlLoader->tl("eventtype_name", "eventname", (string)$this->_post_production->latest_event_type);
$message .= $this->_post_production->formulateMessagePartForLatest($this->_tlLoader); $message .= $this->_post_production->formulateMessagePartForLatest($this->_tlLoader);
$message .= ' ' . $this->_tlLoader->tl("quality", "quality", "before_possibly") . ' <b>' . $this->_tlLoader->tl("eventtype_name", "eventname", (string)$this->_production->latest_event_type) . '</b>'; $message .= ' ' . $this->_tlLoader->tl("quality", "quality", "before_possibly") . ' ' . $this->_tlLoader->tl("eventtype_name", "eventname", (string)$this->_production->latest_event_type);
$message .= $this->_production->formulateMessagePartForLatest($this->_tlLoader); $message .= $this->_production->formulateMessagePartForLatest($this->_tlLoader);
@ -331,11 +331,11 @@ final class MDPlausi {
&& $event->actor_birth_normalized > $this->_production->latest && $event->actor_birth_normalized > $this->_production->latest
) { ) {
$message = '<b>' . $this->_tlLoader->tl("eventtype_name", "eventname", (string)$this->_production->latest_event_type) . '</b>'; $message = $this->_tlLoader->tl("eventtype_name", "eventname", (string)$this->_production->latest_event_type);
$message .= $this->_production->formulateMessagePartForLatest($this->_tlLoader); $message .= $this->_production->formulateMessagePartForLatest($this->_tlLoader);
$message .= ' ' . $this->_tlLoader->tl("quality", "quality", "before") . ' <b>' . $this->_tlLoader->tl("eventtype_name", "eventname", "5") . '</b>'; $message .= ' ' . strtolower($this->_tlLoader->tl("quality", "quality", "before")) . ' ' . $this->_tlLoader->tl("eventtype_name", "eventname", "5");
$message .= ' (' . $this->_tlLoader->tl("basis", "basis", "actor_short") . ': ' . $event->actor_name . ' (* ' . $event->actor_birth . '))'; $message .= ' (' . $this->_tlLoader->tl("basis", "basis", "actor_short") . ': ' . $event->actor_name . ' (* ' . $event->actor_birth . '))';
$this->_messageList[] = $message; $this->_messageList[] = $message;