-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add translations for custom matchers
* feat: get feedback from translations * feat: add translations * chore: update readme * refactor: change patterns names * chore: update README * chore: update README * tests: update test matcher strings * fix: update translations + suggestions * tests: add translations assertions * fix: minor bug fix * fix: minor bug fix * chore: update readme * chore: update readme * fix: update matcher suggestions * fix: add v4 beta as peer dependenvy * chore: update readme regarding version * fix: add translated suggestions to matchers * tests: refactor tests to go through the zxcvbn-ts/core package * tests: add suggestions assertions * tests: remove redundant lines --------- Co-authored-by: Ilan Kushnir <[email protected]>
- Loading branch information
1 parent
7e19b06
commit 69e1b95
Showing
11 changed files
with
231 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
export { uppercaseMatcher } from './matchers/uppercaseMatcher'; | ||
export { minLengthMatcher } from './matchers/minLengthMatcher'; | ||
export { uppercaseMatcher } from './matchers/uppercaseMatcher'; | ||
export { lowercaseMatcher } from './matchers/lowercaseMatcher'; | ||
export { numberMatcher } from './matchers/numberMatcher'; | ||
export { specialMatcher } from './matchers/specialMatcher'; | ||
export { customMatchersTranslations } from './translations'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
export const customMatchersTranslations = { | ||
warnings: { | ||
lowercaseRequired: 'At least one lowercase letter is required.', | ||
minLength: 'Password must be at least %s characters long.', | ||
numberRequired: 'At least one number is required.', | ||
specialRequired: 'At least one special character is required.', | ||
uppercaseRequired: 'At least one uppercase letter is required.', | ||
}, | ||
suggestions: { | ||
lowercaseRequired: 'Include at least one lowercase letter.', | ||
minLength: 'Password may not be shorter than %s characters.', | ||
numberRequired: 'Include at least one number.', | ||
specialRequired: 'Include at least one special character.', | ||
uppercaseRequired: 'Include at least one uppercase letter.', | ||
}, | ||
timeEstimation: {}, | ||
}; |
Oops, something went wrong.