LG-12756 Spell canceled consistently#10320
Conversation
config/locales/account_reset/en.yml
Outdated
There was a problem hiding this comment.
might be good to rename the key (and at its callsites as well)
There was a problem hiding this comment.
I am tracking this ticket in https://docs.google.com/document/d/1w6WJbvEI_pWoGmqwLDRlBO3AF7nirehcVDw5ywvG5P8/edit (as I don't have Jira access). In my weakly held opinion, 2 - 5 should be taken up in a separate PR/commit.
aduth
left a comment
There was a problem hiding this comment.
I'd wonder if it's worth testing for "common misspellings", like a spec in spec/i18n_spec.rb. This feels like the sort of thing that'll be easy to regress with future content revisions.
|
@aduth's suggestion is great and could also be employed for other languages (which don't benefit from having as many eyes looking at the strings). With that said, this story (which hasn't gone through backlog refinement) was picked to keep me busy and is tracked in https://docs.google.com/document/d/1w6WJbvEI_pWoGmqwLDRlBO3AF7nirehcVDw5ywvG5P8/edit?usp=sharing. There's another thread within it about handling the misspelling in the code itself... |
**Why**: - Use the standard TTS practice of American English spelling everywhere. **How**: - Change only the user-facing text in this commit. changelog: User-Facing Improvements, Messages, Use the American spelling of canceled consistently
f0efcbb to
c43fd10
Compare
0ae43fa to
7342330
Compare
spec/i18n_spec.rb
Outdated
| it 'does not contain commonly misspelled words' do | ||
| flattened_yaml_data.each do |key, value| | ||
| locale = key.split('.', 2).first.to_sym | ||
| if COMMONLY_MISSPELLED_WORDS.key?(locale) |
There was a problem hiding this comment.
Since the whole describe block is about testing an individual locale's file, I'd wonder if we could avoid running the spec at all for locales we're not interested in testing, to avoid evaluating and iterating through each key of the French and Spanish files. Maybe an early return (next?) before the loop, or a condition around the whole it block, or RSpec conditional metadata.
spec/i18n_spec.rb
Outdated
| # Add additional words using the regex union operator '|'. | ||
| COMMONLY_MISSPELLED_WORDS = { | ||
| en: /\b(cancelled|occured|seperated?)\b/i, | ||
| } |
There was a problem hiding this comment.
Minor: Since this is constant, we could freeze it as we're doing above to avoid any unintended changes?
| } | |
| }.freeze |
In addition: 1. Freeze the hash 2. Refactor `locale` variable assignment
Why:
How:
changelog: User-Facing Improvements, Messages, Use the American spelling of canceled consistently
=
🎫 Ticket
LG-12756