Conversation
|
As discussed in Slack and team standup, we're going to hold off on reducing the number of backup codes for now, and limit the scope of this to content and ordering changes for backup code setup. |
app/presenters/two_factor_authentication/set_up_backup_code_selection_presenter.rb
Outdated
Show resolved
Hide resolved
f573e09 to
03bc73e
Compare
|
Based on failing build, |
Looks like the the gem forces the And it seems that plural rules aren't included by default so I added 488189749c411dfdf4e611f9b893d98c4498eb5f to give that a shot |
To add additional clarity, here's an important snippet from the docs of
|
changelog: User-Facing Improvements, Backup Codes, Deemphasize and reduce number of backup codes
Forgot to save!
Avoid type issues with NUMBER_OF_CODES being numeric, but typical usage of t expecting string key
More languages, possible future use-case of gendered numbers
See: #10970 (comment) Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com>
**Why**: The numbers_and_words gem forces the I18n::Backend::Pluralization which requires locales to have plural rules defined, so this commit adds those rules
4881897 to
89b8cfe
Compare
|
Thanks for pushing up those changes @zachmargolis . Makes sense to me to include! |
* Reorder backup codes to be last option * Use NUMBER_OF_CODES to avoid magic numbers * Reduce backup codes from 10 to 5 * Update description for backup code text * Add changelog changelog: User-Facing Improvements, Backup Codes, Deemphasize and reduce number of backup codes * Fix display of odd number backup codes in setup * Avoid persisting codes to database * Fix hard-coded references to 10 codes * Interpolate spelled-out backup codes count * Revert to 10 backup codes * Fix 10 spelled out in French Forgot to save! * Force string numeric for Chinese spelled-out numbers * Mark strings used * Interpolate numbers spelled out as string Avoid type issues with NUMBER_OF_CODES being numeric, but typical usage of t expecting string key * Stub faked string for odd number of codes * Use humanize gem with service class to convert readable numbers See: #10970 (comment) * Swap humanize with numbers_and_words More languages, possible future use-case of gendered numbers * Avoid mutating reference of available_locales * Use condition for control flow See: #10970 (comment) Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com> * Add plurals rules **Why**: The numbers_and_words gem forces the I18n::Backend::Pluralization which requires locales to have plural rules defined, so this commit adds those rules --------- Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com> Co-authored-by: Zach Margolis <zachary.margolis@gsa.gov>
🎫 Ticket
LG-13795
🛠 Summary of changes
Updates backup codes:
Draft pending confirmation of reduction of number of backup codes (see Slack discussion)Per Slack discussion, keeping count to 10.📜 Testing Plan
👀 Screenshots