From b8494b69483f390a6fc11ae56a35a1f1f743753c Mon Sep 17 00:00:00 2001 From: Ryan Miller Date: Tue, 27 Aug 2024 17:21:57 +1000 Subject: [PATCH] chore: fix strings --- ts/components/dialog/BanOrUnbanUserDialog.tsx | 2 +- ts/util/passwordUtils.ts | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ts/components/dialog/BanOrUnbanUserDialog.tsx b/ts/components/dialog/BanOrUnbanUserDialog.tsx index 5cccb14e4..d59dc4ccd 100644 --- a/ts/components/dialog/BanOrUnbanUserDialog.tsx +++ b/ts/components/dialog/BanOrUnbanUserDialog.tsx @@ -154,7 +154,7 @@ export const BanOrUnBanUserDialog = (props: { buttonType={SessionButtonType.Simple} buttonColor={SessionButtonColor.Danger} onClick={startBanAndDeleteAllSequence} - text={i18n('banUser')} + text={i18n('banDeleteAll')} disabled={inProgress} /> diff --git a/ts/util/passwordUtils.ts b/ts/util/passwordUtils.ts index 1fcd463c9..22b8d348e 100644 --- a/ts/util/passwordUtils.ts +++ b/ts/util/passwordUtils.ts @@ -21,22 +21,22 @@ export const matchesHash = (phrase: string | null, hash: string) => export const validatePassword = (phrase: string) => { if (!isString(phrase)) { - return window?.i18n ? window?.i18n('passwordError') : ERRORS.TYPE; + return window?.i18n ? window.i18n('passwordError') : ERRORS.TYPE; } const trimmed = phrase.trim(); if (trimmed.length === 0) { - return window?.i18n ? window?.i18n('passwordCreate') : ERRORS.LENGTH; + return window?.i18n ? window.i18n('passwordCreate') : ERRORS.LENGTH; } if (trimmed.length < 6 || trimmed.length > MAX_PASSWORD_LENGTH) { - return window?.i18n ? window?.i18n('passwordErrorLength') : ERRORS.LENGTH; + return window?.i18n ? window.i18n('passwordErrorLength') : ERRORS.LENGTH; } // Restrict characters to letters, numbers and symbols const characterRegex = /^[a-zA-Z0-9-!?/\\()._`~@#$%^&*+=[\]{}|<>,;: ]+$/; if (!characterRegex.test(trimmed)) { - return window?.i18n ? window?.i18n('passwordError') : ERRORS.CHARACTER; + return window?.i18n ? window.i18n('passwordError') : ERRORS.CHARACTER; } return null;