diff --git a/locales/en.json b/locales/en.json index c24fc831c..f8f296a7b 100644 --- a/locales/en.json +++ b/locales/en.json @@ -277,7 +277,7 @@ "domain_dyndns_root_unknown": "Unknown DynDNS root domain", "domain_exists": "The domain already exists", "domain_hostname_failed": "Unable to set new hostname. This might cause an issue later (it might be fine).", - "domain_uninstall_app_first": "Those applications are still installed on your domain: {apps}. Please uninstall them before proceeding to domain removal", + "domain_uninstall_app_first": "Those applications are still installed on your domain:\n{apps}\n\nPlease uninstall them using 'yunohost app remove the_app_id' or move them to another domain using 'yunohost app change-url the_app_id' before proceeding to domain removal", "domain_name_unknown": "Domain '{domain}' unknown", "domain_unknown": "Unknown domain", "domains_available": "Available domains:", diff --git a/src/yunohost/domain.py b/src/yunohost/domain.py index 7dc4ee74d..d581b8426 100644 --- a/src/yunohost/domain.py +++ b/src/yunohost/domain.py @@ -182,7 +182,7 @@ def domain_remove(operation_logger, domain, force=False): """ from yunohost.hook import hook_callback - from yunohost.app import app_ssowatconf + from yunohost.app import app_ssowatconf, app_info from yunohost.utils.ldap import _get_ldap_interface if not force and domain not in domain_list()['domains']: @@ -204,11 +204,12 @@ def domain_remove(operation_logger, domain, force=False): for app in _installed_apps(): settings = _get_app_settings(app) + label = app_info(app)["name"] if settings.get("domain") == domain: - apps_on_that_domain.append("%s (on https://%s%s)" % (app, domain, settings["path"]) if "path" in settings else app) + apps_on_that_domain.append(" - %s \"%s\" on https://%s%s" % (app, label, domain, settings["path"]) if "path" in settings else app) if apps_on_that_domain: - raise YunohostError('domain_uninstall_app_first', apps=", ".join(apps_on_that_domain)) + raise YunohostError('domain_uninstall_app_first', apps="\n".join(apps_on_that_domain)) operation_logger.start() ldap = _get_ldap_interface()