protected function setError($type, $text, $params = []) { $this->errors[$type] = trans($text, $params); }