diff --git a/apps/mobile/src/modules/settings/profile-validation.test.ts b/apps/mobile/src/modules/settings/profile-validation.test.ts index 372f15f7f..1cf1adc37 100644 --- a/apps/mobile/src/modules/settings/profile-validation.test.ts +++ b/apps/mobile/src/modules/settings/profile-validation.test.ts @@ -5,7 +5,7 @@ import enCommon from "../../../../../locales/common/en.json" import enSettings from "../../../../../locales/settings/en.json" import { getProfileFieldError, getServerProfileFieldError } from "./profile-validation" -const INVALID_HANDLE = "Use only letters, numbers and underscores." +const INVALID_HANDLE = "Don't use spaces or invisible characters." describe("getProfileFieldError", () => { beforeAll(async () => { diff --git a/apps/mobile/src/modules/settings/profile-validation.ts b/apps/mobile/src/modules/settings/profile-validation.ts index 79f3b098c..682853be7 100644 --- a/apps/mobile/src/modules/settings/profile-validation.ts +++ b/apps/mobile/src/modules/settings/profile-validation.ts @@ -24,7 +24,9 @@ const countCharacters = (value: string) => Array.from(value).length const tooLongMessage = (field: ProfileTextField) => t("validation.too_long", { ns: "common", count: MAX_LENGTH[field] }) -const invalidHandleMessage = () => t("profile.handle.invalid", { ns: "settings" }) +// Says what is refused. Desktop's message asks for letters, numbers and underscores only, which +// its stricter check requires but this one, like the server, does not +const invalidHandleMessage = () => t("profile.handle.invalid_characters", { ns: "settings" }) /** * Why the server would refuse a profile field's value, as a translated message. The name and the diff --git a/locales/settings/en.json b/locales/settings/en.json index ac7878392..e5e1023fa 100644 --- a/locales/settings/en.json +++ b/locales/settings/en.json @@ -708,6 +708,7 @@ "profile.email.verify_status": "Your email is {{status}}", "profile.handle.description": "Your unique identifier.", "profile.handle.invalid": "Use only letters, numbers and underscores.", + "profile.handle.invalid_characters": "Don't use spaces or invisible characters.", "profile.handle.label": "Handle", "profile.handle.taken": "This handle is already taken.", "profile.link_social.authentication": "Authentication", diff --git a/locales/settings/fr-FR.json b/locales/settings/fr-FR.json index 183e5a916..d3b378b12 100644 --- a/locales/settings/fr-FR.json +++ b/locales/settings/fr-FR.json @@ -708,6 +708,7 @@ "profile.email.verify_status": "Votre email est {{status}}", "profile.handle.description": "Votre identifiant unique.", "profile.handle.invalid": "Utilisez uniquement des lettres, des chiffres et des tirets bas.", + "profile.handle.invalid_characters": "N'utilisez pas d'espaces ni de caractères invisibles.", "profile.handle.label": "Identifiant", "profile.handle.taken": "Cet identifiant est déjà pris.", "profile.link_social.authentication": "Authentification", diff --git a/locales/settings/ja.json b/locales/settings/ja.json index 0ac0e973b..6028e8380 100644 --- a/locales/settings/ja.json +++ b/locales/settings/ja.json @@ -708,6 +708,7 @@ "profile.email.verify_status": "あなたのメールは{{status}}です", "profile.handle.description": "あなた個人の識別子です", "profile.handle.invalid": "英字、数字、アンダースコアのみ使用できます。", + "profile.handle.invalid_characters": "スペースや見えない文字は使用できません。", "profile.handle.label": "ハンドル", "profile.handle.taken": "このハンドルはすでに使われています。", "profile.link_social.authentication": "認証", diff --git a/locales/settings/zh-CN.json b/locales/settings/zh-CN.json index 6d553eb58..8360d3264 100644 --- a/locales/settings/zh-CN.json +++ b/locales/settings/zh-CN.json @@ -708,6 +708,7 @@ "profile.email.verify_status": "你的邮件地址{{status}}", "profile.handle.description": "你的唯一标识。", "profile.handle.invalid": "只能使用字母、数字和下划线。", + "profile.handle.invalid_characters": "不能使用空格或不可见字符。", "profile.handle.label": "唯一标识", "profile.handle.taken": "该唯一标识已被占用。", "profile.link_social.authentication": "身份验证", diff --git a/locales/settings/zh-TW.json b/locales/settings/zh-TW.json index eb8d3880c..2c3be3b29 100644 --- a/locales/settings/zh-TW.json +++ b/locales/settings/zh-TW.json @@ -708,6 +708,7 @@ "profile.email.verify_status": "你的電子信箱目前狀態為 {{status}}", "profile.handle.description": "你的獨一無二名稱。", "profile.handle.invalid": "只能使用字母、數字和底線。", + "profile.handle.invalid_characters": "不能使用空格或不可見字元。", "profile.handle.label": "名稱", "profile.handle.taken": "此名稱已被使用。", "profile.link_social.authentication": "驗證",