Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move en-US.yml's cell_phone entry to the correct position (#2924)
`PhoneNumber.cell_phone` expects an i18n key of `cell_phone.formats`, but the en-US.yml file currently has `faker.phone_number.cell_phone` instead of `faker.cell_phone`. The result of that mismatch is that `cell_phone` will ignore the defined formats, and potentially generate invalid US numbers (e.g. those with an area code beginning with 1) when the locale is en-US. 31d99d1 reworked YAML structure and appears to have inadvertently moved the key. You can see the change in US number behavior in a console: Faker::Config.locale = "en-US" Faker::PhoneNumber.translate("faker.cell_phone.formats") On 3.3.0 this returns ["###-###-####", "(###) ###-####", "###.###.####", "### ### ####"] because it's the fallback value within the `en` (not `en-US`) locale file. The correct value should be the formats outdented in this commit.
- Loading branch information