Merge pull request #500 from Arthur-Milchior/more_precise_config_error_message

More precise schema failure message
This commit is contained in:
Damien Elmes 2020-03-09 19:43:37 +10:00 committed by GitHub
commit 18a6b8e33c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 2 deletions

View file

@ -1330,7 +1330,14 @@ class ConfigEditor(QDialog):
except ValidationError as e:
# The user did edit the configuration and entered a value
# which can not be interpreted.
showInfo(tr(TR.ADDONS_CONFIG_VALIDATION_ERROR, problem=e.message))
showInfo(
tr(
TR.ADDONS_CONFIG_VALIDATION_ERROR,
problem=e.message,
path="/".join(str(path) for path in e.path),
schema=str(e.schema),
)
)
return
except Exception as e:
showInfo(_("Invalid configuration: ") + repr(e))

View file

@ -6,4 +6,4 @@ addons-failed-to-load =
{$traceback}
# Shown in the add-on configuration screen (Tools>Add-ons>Config), in the title bar
addons-config-window-title = Configure '{$name}'
addons-config-validation-error = There was a problem with the provided configuration: {$problem}
addons-config-validation-error = There was a problem with the provided configuration: {$problem}, at path {$path}, against schema {$schema}.