From 8baab22c654e2b475b94851a17069ae9f0e2f927 Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Sat, 3 Sep 2022 16:49:28 +0530 Subject: [PATCH] fix: revert i18n changes in sdk Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> --- .../nocodb-sdk/src/lib/passwordHelpers.ts | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/packages/nocodb-sdk/src/lib/passwordHelpers.ts b/packages/nocodb-sdk/src/lib/passwordHelpers.ts index f172dfe43c..8d4fbe560e 100644 --- a/packages/nocodb-sdk/src/lib/passwordHelpers.ts +++ b/packages/nocodb-sdk/src/lib/passwordHelpers.ts @@ -1,46 +1,46 @@ -import { getI18n } from '~/plugins/a.i18n' export function validatePassword(p) { let error = ''; let progress = 0; let hint = null; let valid = true; - const { t } = getI18n().global + if (!p) { - // 'At least 8 letters with one Uppercase, one number and one special letter'; - error = t('msg.error.signUpRules.completeRuleSet'); + error = + 'At least 8 letters with one Uppercase, one number and one special letter'; + // error = t('msg.error.signUpRules.completeRuleSet'); valid = false; } else { if (!(p.length >= 8)) { - // error += 'At least 8 letters. '; - error += t('msg.error.signUpRules.atLeast8Char'); + error += 'At least 8 letters. '; + // error += t('msg.error.signUpRules.atLeast8Char'); valid = false; } else { progress = Math.min(100, progress + 25); } if (!p.match(/.*[A-Z].*/)) { - // error += 'One Uppercase Letter. '; - error += t('msg.error.signUpRules.atLeastOneUppercase'); + error += 'One Uppercase Letter. '; + // error += t('msg.error.signUpRules.atLeastOneUppercase'); valid = false; } else { progress = Math.min(100, progress + 25); } if (!p.match(/.*[0-9].*/)) { - // error += 'One Number. '; - error += t('msg.error.signUpRules.atLeastOneNumber'); + error += 'One Number. '; + // error += t('msg.error.signUpRules.atLeastOneNumber'); valid = false; } else { progress = Math.min(100, progress + 25); } if (!p.match(/[$&+,:;=?@#|'<>.^*()%!_-]/)) { - // error += 'One special letter. '; - error += t('msg.error.signUpRules.atLeastOneSpecialChar'); - // hint = "Allowed special character list : $&+,:;=?@#|'<>.^*()%!_-"; - hint = `${t( - 'msg.error.signUpRules.allowedSpecialCharList' - )} : $&+,:;=?@#|'<>.^*()%!_-`; + error += 'One special letter. '; + // error += t('msg.error.signUpRules.atLeastOneSpecialChar'); + hint = "Allowed special character list : $&+,:;=?@#|'<>.^*()%!_-"; + // hint = `${t( + // 'msg.error.signUpRules.allowedSpecialCharList' + // )} : $&+,:;=?@#|'<>.^*()%!_-`; valid = false; } else { progress = Math.min(100, progress + 25);