From 517f21f9107b544aa70e8fb4b37bdf601c4d3d1a Mon Sep 17 00:00:00 2001 From: Joshua Ramon Enslin Date: Tue, 25 Jul 2023 15:32:17 +0200 Subject: [PATCH] Remove markup in plausi messages --- src/Checks/Plausi/MDPlausi.php | 54 +++++++++++++++++----------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/src/Checks/Plausi/MDPlausi.php b/src/Checks/Plausi/MDPlausi.php index b26f9fc..8a81b4b 100644 --- a/src/Checks/Plausi/MDPlausi.php +++ b/src/Checks/Plausi/MDPlausi.php @@ -53,14 +53,14 @@ final class MDPlausi { // Work on the object started before the actor was born if ($event->time_start_normalized !== false && $event->time_start_normalized < $event->actor_birth_normalized) { - $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; + $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 // Ended being involved before birth else if ($event->time_end_normalized !== false && $event->time_end_normalized < $event->actor_birth_normalized) { - $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->_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; } @@ -71,11 +71,11 @@ final class MDPlausi { // 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) { - $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->_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; } else if ($event->time_end_normalized !== false && $event->actor_death_normalized < $event->time_end_normalized) { - $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; + $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->_printing_plate->latest < $this->_template_creation->earliest) { - $message = '' . $this->_tlLoader->tl("eventtype_name", "eventname", "12") . ''; + $message = $this->_tlLoader->tl("eventtype_name", "eventname", "12"); $message .= $this->_printing_plate->formulateMessagePartForLatest($this->_tlLoader); - $message .= ' ' . $this->_tlLoader->tl("quality", "quality", "before") . ' ' . $this->_tlLoader->tl("eventtype_name", "eventname", "4") . ''; + $message .= ' ' . strtolower($this->_tlLoader->tl("quality", "quality", "before")) . ' ' . $this->_tlLoader->tl("eventtype_name", "eventname", "4"); $message .= $this->_template_creation->formulateMessagePartForEarliest($this->_tlLoader); @@ -113,11 +113,11 @@ final class MDPlausi { && $this->_template_creation->latest_event_type !== 0 && $this->_printing_plate->latest < $this->_template_creation->latest) { - $message = '' . $this->_tlLoader->tl("eventtype_name", "eventname", "12") . ''; + $message = $this->_tlLoader->tl("eventtype_name", "eventname", "12"); $message .= $this->_printing_plate->formulateMessagePartForLatest($this->_tlLoader); - $message .= ' ' . $this->_tlLoader->tl("quality", "quality", "before_possibly") . ' ' . $this->_tlLoader->tl("eventtype_name", "eventname", "4") . ''; + $message .= ' ' . $this->_tlLoader->tl("quality", "quality", "before_possibly") . ' ' . $this->_tlLoader->tl("eventtype_name", "eventname", "4"); $message .= $this->_template_creation->formulateMessagePartForLatest($this->_tlLoader); @@ -139,7 +139,7 @@ final class MDPlausi { // Paintings should not be printed at the same time if ($this->_is_painted_drawn === true and $this->_is_print_material === true) { - $message = '' . $this->_tlLoader->tl("quality", "quality", "print_not_paint") . ' ' . $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; } @@ -159,11 +159,11 @@ final class MDPlausi { && $this->_pre_production->earliest_event_type !== 0 && $this->_production->latest < $this->_pre_production->earliest) { - $message = '' . $this->_tlLoader->tl("eventtype_name", "eventname", (string)$this->_production->latest_event_type) . ''; + $message = $this->_tlLoader->tl("eventtype_name", "eventname", (string)$this->_production->latest_event_type); $message .= $this->_production->formulateMessagePartForLatest($this->_tlLoader); - $message .= ' ' . $this->_tlLoader->tl("quality", "quality", "before") . ' ' . $this->_tlLoader->tl("eventtype_name", "eventname", (string)$this->_pre_production->earliest_event_type) . ''; + $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); @@ -177,11 +177,11 @@ final class MDPlausi { && $this->_pre_production->latest_event_type !== 0 && $this->_production->latest < $this->_pre_production->latest) { - $message = '' . $this->_tlLoader->tl("eventtype_name", "eventname", (string)$this->_production->latest_event_type) . ''; + $message = $this->_tlLoader->tl("eventtype_name", "eventname", (string)$this->_production->latest_event_type); $message .= $this->_production->formulateMessagePartForLatest($this->_tlLoader); - $message .= ' ' . $this->_tlLoader->tl("quality", "quality", "before_possibly") . ' ' . $this->_tlLoader->tl("eventtype_name", "eventname", (string)$this->_pre_production->latest_event_type) . ''; + $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); @@ -204,11 +204,11 @@ final class MDPlausi { && $this->_pre_production->earliest_event_type !== 0 && $this->_post_production->latest < $this->_pre_production->earliest) { - $message = '' . $this->_tlLoader->tl("eventtype_name", "eventname", (string)$this->_post_production->latest_event_type) . ''; + $message = $this->_tlLoader->tl("eventtype_name", "eventname", (string)$this->_post_production->latest_event_type); $message .= $this->_post_production->formulateMessagePartForLatest($this->_tlLoader); - $message .= ' ' . $this->_tlLoader->tl("quality", "quality", "before") . ' ' . $this->_tlLoader->tl("eventtype_name", "eventname", (string)$this->_pre_production->earliest_event_type) . ''; + $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); @@ -222,11 +222,11 @@ final class MDPlausi { && $this->_pre_production->latest_event_type !== 0 && $this->_post_production->latest < $this->_pre_production->latest) { - $message = '' . $this->_tlLoader->tl("eventtype_name", "eventname", (string)$this->_post_production->latest_event_type) . ''; + $message = $this->_tlLoader->tl("eventtype_name", "eventname", (string)$this->_post_production->latest_event_type); $message .= $this->_post_production->formulateMessagePartForLatest($this->_tlLoader); - $message .= ' ' . $this->_tlLoader->tl("quality", "quality", "before") . ' ' . $this->_tlLoader->tl("eventtype_name", "eventname", (string)$this->_pre_production->latest_event_type) . ''; + $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); @@ -242,11 +242,11 @@ final class MDPlausi { && $this->_pre_production->earliest_event_type !== 0 && $this->_post_production->earliest < $this->_pre_production->earliest) { - $message = '' . $this->_tlLoader->tl("eventtype_name", "eventname", (string)$this->_post_production->earliest_event_type) . ''; + $message = $this->_tlLoader->tl("eventtype_name", "eventname", (string)$this->_post_production->earliest_event_type); $message .= $this->_post_production->formulateMessagePartForEarliest($this->_tlLoader); - $message .= ' ' . $this->_tlLoader->tl("quality", "quality", "before_possibly") . ' ' . $this->_tlLoader->tl("eventtype_name", "eventname", (string)$this->_pre_production->earliest_event_type) . ''; + $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); @@ -268,11 +268,11 @@ final class MDPlausi { && $this->_production->earliest_event_type !== 0 && $this->_post_production->earliest < $this->_production->earliest) { - $message = '' . $this->_tlLoader->tl("eventtype_name", "eventname", (string)$this->_post_production->earliest_event_type) . ''; + $message = $this->_tlLoader->tl("eventtype_name", "eventname", (string)$this->_post_production->earliest_event_type); $message .= $this->_post_production->formulateMessagePartForEarliest($this->_tlLoader); - $message .= ' ' . $this->_tlLoader->tl("quality", "quality", "before") . ' ' . $this->_tlLoader->tl("eventtype_name", "eventname", (string)$this->_production->earliest_event_type) . ''; + $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); @@ -285,11 +285,11 @@ final class MDPlausi { && $this->_production->latest_event_type !== 0 && $this->_post_production->earliest < $this->_production->latest) { - $message = '' . $this->_tlLoader->tl("eventtype_name", "eventname", (string)$this->_post_production->earliest_event_type) . ''; + $message = $this->_tlLoader->tl("eventtype_name", "eventname", (string)$this->_post_production->earliest_event_type); $message .= $this->_post_production->formulateMessagePartForEarliest($this->_tlLoader); - $message .= ' ' . $this->_tlLoader->tl("quality", "quality", "before_possibly") . ' ' . $this->_tlLoader->tl("eventtype_name", "eventname", (string)$this->_production->latest_event_type) . ''; + $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); @@ -300,11 +300,11 @@ final class MDPlausi { && $this->_production->latest_event_type !== 0 && $this->_post_production->latest < $this->_production->latest) { - $message = '' . $this->_tlLoader->tl("eventtype_name", "eventname", (string)$this->_post_production->latest_event_type) . ''; + $message = $this->_tlLoader->tl("eventtype_name", "eventname", (string)$this->_post_production->latest_event_type); $message .= $this->_post_production->formulateMessagePartForLatest($this->_tlLoader); - $message .= ' ' . $this->_tlLoader->tl("quality", "quality", "before_possibly") . ' ' . $this->_tlLoader->tl("eventtype_name", "eventname", (string)$this->_production->latest_event_type) . ''; + $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); @@ -331,11 +331,11 @@ final class MDPlausi { && $event->actor_birth_normalized > $this->_production->latest ) { - $message = '' . $this->_tlLoader->tl("eventtype_name", "eventname", (string)$this->_production->latest_event_type) . ''; + $message = $this->_tlLoader->tl("eventtype_name", "eventname", (string)$this->_production->latest_event_type); $message .= $this->_production->formulateMessagePartForLatest($this->_tlLoader); - $message .= ' ' . $this->_tlLoader->tl("quality", "quality", "before") . ' ' . $this->_tlLoader->tl("eventtype_name", "eventname", "5") . ''; + $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 . '))'; $this->_messageList[] = $message;