From 078560edc8e7a59ccb4c775b5e9a3cb5aeb52480 Mon Sep 17 00:00:00 2001 From: Jelle van der Waa Date: Wed, 6 Nov 2024 10:21:37 +0100 Subject: [PATCH] Remove punctuation from validation errors in create directory dialog This is what PatternFly advices and is consistent with the rest of our validation error messages. --- src/dialogs/mkdir.tsx | 6 +++--- test/check-application | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/dialogs/mkdir.tsx b/src/dialogs/mkdir.tsx index 4cf10b66..1a4b1aa0 100644 --- a/src/dialogs/mkdir.tsx +++ b/src/dialogs/mkdir.tsx @@ -39,11 +39,11 @@ const _ = cockpit.gettext; function check_name(candidate: string) { if (candidate === "") { - return _("Directory name cannot be empty."); + return _("Directory name cannot be empty"); } else if (candidate.length >= 256) { - return _("Directory name too long."); + return _("Directory name too long"); } else if (candidate.includes("/")) { - return _("Directory name cannot include a /."); + return _("Directory name cannot include a /"); } else { return undefined; } diff --git a/test/check-application b/test/check-application index 78bb1572..e31b9701 100755 --- a/test/check-application +++ b/test/check-application @@ -866,15 +866,15 @@ class TestFiles(testlib.MachineCase): b.set_input_text("#create-directory-input", "test") b.set_input_text("#create-directory-input", "") b.wait_visible("button.pf-m-primary:disabled") - b.wait_in_text("#create-directory-input-helper", "Directory name cannot be empty.") + b.wait_in_text("#create-directory-input-helper", "Directory name cannot be empty") b.set_input_text("#create-directory-input", "a" * 256) b.wait_visible("button.pf-m-primary:disabled") - b.wait_in_text("#create-directory-input-helper", "Directory name too long.") + b.wait_in_text("#create-directory-input-helper", "Directory name too long") b.set_input_text("#create-directory-input", "foo/bar") b.wait_visible("button.pf-m-primary:disabled") - b.wait_in_text("#create-directory-input-helper", "Directory name cannot include a /.") + b.wait_in_text("#create-directory-input-helper", "Directory name cannot include a /") b.set_input_text("#create-directory-input", "test") b.wait_visible("button.pf-m-primary:not(:disabled)")