Compare commits
No commits in common. "06bd8f207dc7e76d5be7e3ef67c479ed82304bf8" and "a29a14d3f3a291edd495b45ef818089d1c8f898c" have entirely different histories.
06bd8f207d
...
a29a14d3f3
6 changed files with 38 additions and 58 deletions
|
|
@ -1,10 +1,3 @@
|
||||||
## 0.2.0a3 (2025-02-17)
|
|
||||||
|
|
||||||
### Fix
|
|
||||||
|
|
||||||
- do not display default value with default_value_makes_sense set to False
|
|
||||||
- translate ERRORS
|
|
||||||
|
|
||||||
## 0.2.0a2 (2025-02-10)
|
## 0.2.0a2 (2025-02-10)
|
||||||
|
|
||||||
### Feat
|
### Feat
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: \n"
|
"Project-Id-Version: \n"
|
||||||
"POT-Creation-Date: 2025-02-15 18:38+0100\n"
|
"POT-Creation-Date: 2024-11-01 11:03+0100\n"
|
||||||
"PO-Revision-Date: 2025-02-15 18:39+0100\n"
|
"PO-Revision-Date: 2024-11-01 11:04+0100\n"
|
||||||
"Last-Translator: \n"
|
"Last-Translator: \n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
"Language: fr\n"
|
"Language: fr\n"
|
||||||
|
|
@ -16,46 +16,42 @@ msgstr ""
|
||||||
"Generated-By: pygettext.py 1.5\n"
|
"Generated-By: pygettext.py 1.5\n"
|
||||||
"X-Generator: Poedit 3.5\n"
|
"X-Generator: Poedit 3.5\n"
|
||||||
|
|
||||||
#: src/rougail/output_console/__init__.py:88
|
#: src/rougail/output_exporter/__init__.py:73
|
||||||
msgid "The following variables are mandatory but have no value:"
|
msgid "The following variables are mandatory but have no value:"
|
||||||
msgstr "Les variables suiveuses sont obligatoire mais n'ont pas de valeur :"
|
msgstr "Les variables suiveuses sont obligatoire mais n'ont pas de valeur :"
|
||||||
|
|
||||||
#: src/rougail/output_console/__init__.py:99
|
#: src/rougail/output_exporter/__init__.py:84
|
||||||
msgid "The following variables are inaccessible but are empty and mandatory :"
|
msgid "The following variables are inaccessible but are empty and mandatory :"
|
||||||
msgstr "Les variables suiveuses sont inaccessibles mais sont vides et obligatoires :"
|
msgstr "Les variables suiveuses sont inaccessibles mais sont vides et obligatoires :"
|
||||||
|
|
||||||
#: src/rougail/output_console/__init__.py:182
|
#: src/rougail/output_exporter/output/console.py:53
|
||||||
msgid "Undocumented variable"
|
msgid "Undocumented variable"
|
||||||
msgstr "Variable non documentée"
|
msgstr "Variable non documentée"
|
||||||
|
|
||||||
#: src/rougail/output_console/__init__.py:183
|
#: src/rougail/output_exporter/output/console.py:54
|
||||||
msgid "Undocumented but modified variable"
|
msgid "Undocumented but modified variable"
|
||||||
msgstr "Variable non documentée mais modifiée"
|
msgstr "Variable non documentée mais modifiée"
|
||||||
|
|
||||||
#: src/rougail/output_console/__init__.py:186
|
#: src/rougail/output_exporter/output/console.py:57
|
||||||
msgid "Unmodifiable variable"
|
msgid "Unmodifiable variable"
|
||||||
msgstr "Variable non modifiable"
|
msgstr "Variable non modifiable"
|
||||||
|
|
||||||
#: src/rougail/output_console/__init__.py:190
|
#: src/rougail/output_exporter/output/console.py:61
|
||||||
msgid "Default value"
|
msgid "Default value"
|
||||||
msgstr "Valeur par défaut"
|
msgstr "Valeur par défaut"
|
||||||
|
|
||||||
#: src/rougail/output_console/__init__.py:191
|
#: src/rougail/output_exporter/output/console.py:62
|
||||||
msgid "Modified value"
|
msgid "Modified value"
|
||||||
msgstr "Valeur modifiée"
|
msgstr "Valeur modifiée"
|
||||||
|
|
||||||
#: src/rougail/output_console/__init__.py:192
|
#: src/rougail/output_exporter/output/console.py:63
|
||||||
msgid "Original default value"
|
msgid "Original default value"
|
||||||
msgstr "Valeur par défaut d'origine"
|
msgstr "Valeur par défaut d'origine"
|
||||||
|
|
||||||
#: src/rougail/output_console/__init__.py:196
|
#: src/rougail/output_exporter/output/console.py:67
|
||||||
msgid "Caption"
|
msgid "Caption"
|
||||||
msgstr "Légende"
|
msgstr "Légende"
|
||||||
|
|
||||||
#: src/rougail/output_console/__init__.py:203
|
#: src/rougail/output_exporter/output/console.py:92
|
||||||
msgid "ERRORS"
|
|
||||||
msgstr "ERREURS"
|
|
||||||
|
|
||||||
#: src/rougail/output_console/__init__.py:223
|
|
||||||
msgid "Variables:"
|
msgid "Variables:"
|
||||||
msgstr "Variables :"
|
msgstr "Variables :"
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"POT-Creation-Date: 2025-02-15 18:39+0100\n"
|
"POT-Creation-Date: 2024-11-27 16:46+0100\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
|
|
@ -15,47 +15,43 @@ msgstr ""
|
||||||
"Generated-By: pygettext.py 1.5\n"
|
"Generated-By: pygettext.py 1.5\n"
|
||||||
|
|
||||||
|
|
||||||
#: src/rougail/output_console/__init__.py:88
|
#: src/rougail/output_console/__init__.py:82
|
||||||
msgid "The following variables are mandatory but have no value:"
|
msgid "The following variables are mandatory but have no value:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/rougail/output_console/__init__.py:99
|
#: src/rougail/output_console/__init__.py:93
|
||||||
msgid "The following variables are inaccessible but are empty and mandatory :"
|
msgid "The following variables are inaccessible but are empty and mandatory :"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/rougail/output_console/__init__.py:182
|
#: src/rougail/output_console/__init__.py:170
|
||||||
msgid "Undocumented variable"
|
msgid "Undocumented variable"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/rougail/output_console/__init__.py:183
|
#: src/rougail/output_console/__init__.py:171
|
||||||
msgid "Undocumented but modified variable"
|
msgid "Undocumented but modified variable"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/rougail/output_console/__init__.py:186
|
#: src/rougail/output_console/__init__.py:174
|
||||||
msgid "Unmodifiable variable"
|
msgid "Unmodifiable variable"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/rougail/output_console/__init__.py:190
|
#: src/rougail/output_console/__init__.py:178
|
||||||
msgid "Default value"
|
msgid "Default value"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/rougail/output_console/__init__.py:191
|
#: src/rougail/output_console/__init__.py:179
|
||||||
msgid "Modified value"
|
msgid "Modified value"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/rougail/output_console/__init__.py:192
|
#: src/rougail/output_console/__init__.py:180
|
||||||
msgid "Original default value"
|
msgid "Original default value"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/rougail/output_console/__init__.py:196
|
#: src/rougail/output_console/__init__.py:184
|
||||||
msgid "Caption"
|
msgid "Caption"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/rougail/output_console/__init__.py:203
|
#: src/rougail/output_console/__init__.py:209
|
||||||
msgid "ERRORS"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: src/rougail/output_console/__init__.py:223
|
|
||||||
msgid "Variables:"
|
msgid "Variables:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ requires = ["flit_core >=3.8.0,<4"]
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "rougail.output_console"
|
name = "rougail.output_console"
|
||||||
version = "0.2.0a3"
|
version = "0.2.0a2"
|
||||||
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
|
authors = [{name = "Emmanuel Garette", email = "gnunux@gnunux.info"}]
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
description = "Rougail output console"
|
description = "Rougail output console"
|
||||||
|
|
|
||||||
|
|
@ -76,9 +76,6 @@ class RougailOutputConsole:
|
||||||
except (ConfigError, PropertiesOptionError) as err:
|
except (ConfigError, PropertiesOptionError) as err:
|
||||||
self.errors.append(f"Error in config: {err}")
|
self.errors.append(f"Error in config: {err}")
|
||||||
return
|
return
|
||||||
except ValueError as err:
|
|
||||||
self.errors.append(str(err))
|
|
||||||
return
|
|
||||||
for option in mandatories:
|
for option in mandatories:
|
||||||
try:
|
try:
|
||||||
option.value.get()
|
option.value.get()
|
||||||
|
|
@ -112,6 +109,7 @@ class RougailOutputConsole:
|
||||||
errors = self.user_data_errors + self.errors
|
errors = self.user_data_errors + self.errors
|
||||||
if errors:
|
if errors:
|
||||||
self.display_errors(errors)
|
self.display_errors(errors)
|
||||||
|
if self.errors:
|
||||||
return False
|
return False
|
||||||
warnings = self.user_data_warnings + self.warnings
|
warnings = self.user_data_warnings + self.warnings
|
||||||
if warnings:
|
if warnings:
|
||||||
|
|
@ -200,7 +198,7 @@ class RougailOutputConsole:
|
||||||
errors,
|
errors,
|
||||||
) -> None:
|
) -> None:
|
||||||
tree = Tree(
|
tree = Tree(
|
||||||
f":stop_sign: {_('ERRORS')}",
|
":stop_sign: ERRORS",
|
||||||
guide_style="bold bright_red",
|
guide_style="bold bright_red",
|
||||||
)
|
)
|
||||||
for error in errors:
|
for error in errors:
|
||||||
|
|
@ -299,7 +297,6 @@ class OutputFamily:
|
||||||
elif "advanced" in properties:
|
elif "advanced" in properties:
|
||||||
variable_color = self.root.variable_advanced_and_modified_color
|
variable_color = self.root.variable_advanced_and_modified_color
|
||||||
color = None
|
color = None
|
||||||
if option.information.get("default_value_makes_sense", True):
|
|
||||||
try:
|
try:
|
||||||
default_value = option.value.default()
|
default_value = option.value.default()
|
||||||
except ConfigError:
|
except ConfigError:
|
||||||
|
|
@ -312,8 +309,6 @@ class OutputFamily:
|
||||||
default_value = default_value[leader_index]
|
default_value = default_value[leader_index]
|
||||||
else:
|
else:
|
||||||
default_value = None
|
default_value = None
|
||||||
else:
|
|
||||||
default_value = None
|
|
||||||
if value is undefined:
|
if value is undefined:
|
||||||
value = option.value.get()
|
value = option.value.get()
|
||||||
key = self.colorize(
|
key = self.colorize(
|
||||||
|
|
|
||||||
Binary file not shown.
Loading…
Reference in a new issue