[fix] improve UX, previous message was unclear for users

qsd
This commit is contained in:
Laurent Peuch 2018-01-07 16:43:10 +01:00
parent f20ef340dc
commit 297026e654
2 changed files with 5 additions and 3 deletions

View file

@ -19,7 +19,7 @@
"app_incompatible": "The app is incompatible with your YunoHost version",
"app_install_files_invalid": "Invalid installation files",
"app_location_already_used": "An app is already installed in this location",
"app_location_install_failed": "Unable to install the app in this location",
"app_location_install_failed": "Unable to install the app in this location because it conflit with the app '{other_app}' already installed on '{other_path}'",
"app_location_unavailable": "This url is not available or conflicts with an already installed app",
"app_manifest_invalid": "Invalid app manifest: {error}",
"app_no_upgrade": "No app to upgrade",

View file

@ -1169,10 +1169,12 @@ def app_checkurl(auth, url, app=None):
continue
if path == p:
raise MoulinetteError(errno.EINVAL,
m18n.n('app_location_already_used'))
m18n.n('app_location_already_used',
app=a["id"], path=path))
elif path.startswith(p) or p.startswith(path):
raise MoulinetteError(errno.EPERM,
m18n.n('app_location_install_failed'))
m18n.n('app_location_install_failed',
other_path=p, other_app=a['id']))
if app is not None and not installed:
app_setting(app, 'domain', value=domain)