From effa673257365bc7d2718eb1eb767969edd9afef Mon Sep 17 00:00:00 2001 From: Sergiu Ghitea <28300158+sergiught@users.noreply.github.com> Date: Wed, 11 Oct 2023 08:58:02 +0200 Subject: [PATCH] Remove usernameOnlyPlaceholder from default custom text translations (#873) --- internal/cli/prompts_custom_text.go | 2 +- internal/cli/universal_login_customize_test.go | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/internal/cli/prompts_custom_text.go b/internal/cli/prompts_custom_text.go index 96f3047c6..af2bd099b 100644 --- a/internal/cli/prompts_custom_text.go +++ b/internal/cli/prompts_custom_text.go @@ -242,7 +242,7 @@ func mergeBrandingTextTranslations( } for key, text := range translations { - if strings.HasPrefix(key, "error") || strings.HasPrefix(key, "devKeys") { + if strings.HasPrefix(key, "error") || strings.HasPrefix(key, "devKeys") || key == "usernameOnlyPlaceholder" { continue } diff --git a/internal/cli/universal_login_customize_test.go b/internal/cli/universal_login_customize_test.go index 46e0652b6..a10224dc7 100644 --- a/internal/cli/universal_login_customize_test.go +++ b/internal/cli/universal_login_customize_test.go @@ -233,7 +233,6 @@ func TestFetchUniversalLoginBrandingData(t *testing.T) { "signupActionText": "${footerText}", "title": "Welcome friend, glad to have you!", "user-blocked": "Your account has been blocked after multiple consecutive login attempts.", - "usernameOnlyPlaceholder": "Username", "usernamePlaceholder": "Username or email address", "wrong-credentials": "Wrong username or password", "wrong-email-credentials": "Wrong email or password", @@ -358,7 +357,6 @@ func TestFetchUniversalLoginBrandingData(t *testing.T) { "signupActionText": "${footerText}", "title": "Welcome friend, glad to have you!", "user-blocked": "Your account has been blocked after multiple consecutive login attempts.", - "usernameOnlyPlaceholder": "Username", "usernamePlaceholder": "Username or email address", "wrong-credentials": "Wrong username or password", "wrong-email-credentials": "Wrong email or password", @@ -485,7 +483,6 @@ func TestFetchUniversalLoginBrandingData(t *testing.T) { "signupActionText": "${footerText}", "title": "Welcome friend, glad to have you!", "user-blocked": "Your account has been blocked after multiple consecutive login attempts.", - "usernameOnlyPlaceholder": "Username", "usernamePlaceholder": "Username or email address", "wrong-credentials": "Wrong username or password", "wrong-email-credentials": "Wrong email or password", @@ -692,7 +689,6 @@ func TestFetchUniversalLoginBrandingData(t *testing.T) { "signupActionText": "${footerText}", "title": "Welcome friend, glad to have you!", "user-blocked": "Your account has been blocked after multiple consecutive login attempts.", - "usernameOnlyPlaceholder": "Username", "usernamePlaceholder": "Username or email address", "wrong-credentials": "Wrong username or password", "wrong-email-credentials": "Wrong email or password",