diff --git a/data/hooks/diagnosis/14-ports.py b/data/hooks/diagnosis/14-ports.py index 82a44384a..b953f35a9 100644 --- a/data/hooks/diagnosis/14-ports.py +++ b/data/hooks/diagnosis/14-ports.py @@ -37,18 +37,15 @@ class PortsDiagnoser(Diagnoser): except Exception as e: raise YunohostError("diagnosis_ports_could_not_diagnose", error=e) - found_issues = False for port in ports: if r["ports"].get(str(port), None) is not True: - found_issues = True yield dict(meta={"port": port}, status="ERROR", summary=("diagnosis_ports_unreachable", {"port": port})) - - if not found_issues: - yield dict(meta={}, - status="SUCCESS", - summary=("diagnosis_ports_ok", {})) + else: + yield dict(meta={}, + status="SUCCESS", + summary=("diagnosis_ports_ok", {"port": port})) def main(args, env, loggers): diff --git a/locales/en.json b/locales/en.json index ac44122fe..6dce769f1 100644 --- a/locales/en.json +++ b/locales/en.json @@ -181,7 +181,7 @@ "diagnosis_description_http": "HTTP exposure", "diagnosis_ports_could_not_diagnose": "Could not diagnose if ports are reachable from outside. Error: {error}", "diagnosis_ports_unreachable": "Port {port} is not reachable from outside.", - "diagnosis_ports_ok": "Relevant ports are reachable from outside!", + "diagnosis_ports_ok": "Port {port} is reachable from outside.", "diagnosis_http_could_not_diagnose": "Could not diagnose if domain is reachable from outside. Error: {error}", "diagnosis_http_ok": "Domain {domain} is reachable from outside.", "diagnosis_http_unreachable": "Domain {domain} is unreachable through HTTP from outside.", diff --git a/src/yunohost/diagnosis.py b/src/yunohost/diagnosis.py index 14b332fe3..88316a15f 100644 --- a/src/yunohost/diagnosis.py +++ b/src/yunohost/diagnosis.py @@ -116,8 +116,10 @@ def diagnosis_run(categories=[], force=False): if issues: if msettings.get("interface") == "api": + # FIXME: i18n logger.info("You can go to the Diagnosis section (in the home screen) to see the issues found.") else: + # FIXME: i18n logger.info("You can run 'yunohost diagnosis show --issues' to display the issues found.") return