diff --git a/src/rougail/output_console/__init__.py b/src/rougail/output_console/__init__.py index 672027f..9c65f31 100644 --- a/src/rougail/output_console/__init__.py +++ b/src/rougail/output_console/__init__.py @@ -105,17 +105,11 @@ class RougailOutputConsole: else: current_options.setdefault(None, []).append(description) if options: - self.errors.append( - _("The following variables are mandatory but have no value:") - ) - self.errors.append(options) + self.errors.append({_("The following variables are mandatory but have no value:"): options}) elif options_with_error: - self.errors.append( - _( + self.errors.append({_( "The following variables are inaccessible but are empty and mandatory:" - ) - ) - self.errors.append([option.description() for option in options_with_error]) + ): self.errors.append([option.description() for option in options_with_error])}) def exporter(self) -> bool: if self.is_mandatory: @@ -225,9 +219,8 @@ class RougailOutputConsole: f"[bold][bright_red]:stop_sign: {_('ERRORS')}[/bright_red][/bold]", guide_style="bold bright_red", ) - sub_tree = tree for error in errors: - sub_tree = self.display_error(sub_tree, error) + self.display_error(tree, error) self.out.append(tree) def display_error(self, tree, error):