Commit e15e606
authored
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.1 parent 3c85321 commit e15e606
1 file changed
+10
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6949 | 6949 | | |
6950 | 6950 | | |
6951 | 6951 | | |
6952 | | - | |
6953 | | - | |
6954 | | - | |
6955 | | - | |
6956 | | - | |
6957 | | - | |
6958 | | - | |
6959 | | - | |
6960 | | - | |
6961 | | - | |
| 6952 | + | |
| 6953 | + | |
| 6954 | + | |
| 6955 | + | |
| 6956 | + | |
| 6957 | + | |
| 6958 | + | |
| 6959 | + | |
| 6960 | + | |
| 6961 | + | |
6962 | 6962 | | |
6963 | 6963 | | |
6964 | 6964 | | |
| |||
0 commit comments