Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(location): avoid hyphenated surnames in city patterns #2119

Merged
merged 7 commits into from
Jul 20, 2023

Conversation

matthewmayer
Copy link
Contributor

@matthewmayer matthewmayer commented May 2, 2023

Changes city_patterns to use person.last_name instead of person.lastName. This means it uses the definitions directly, not the method, which avoids using hyphenated and double surnames in locales where those are used which were introduced in #1872

e.g. remove city names like
Newton Morissette-Kovacekwell
Pollich-Douglasville

Note this doesn't affect default en locale as that is already using last_name instead of lastName https://github.com/faker-js/faker/blob/e490ed3e505124585857421cac73d6f8418280aa/src/locales/en/location/city_pattern.ts

@matthewmayer matthewmayer requested a review from a team as a code owner May 2, 2023 12:36
@matthewmayer matthewmayer self-assigned this May 2, 2023
@matthewmayer matthewmayer added p: 1-normal Nothing urgent c: locale Permutes locale definitions m: location Something is referring to the location module labels May 2, 2023
@codecov
Copy link

codecov bot commented May 2, 2023

Codecov Report

Merging #2119 (c928c99) into next (db34e37) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head c928c99 differs from pull request most recent head 88227c2. Consider uploading reports for the commit 88227c2 to get more accurate results

Additional details and impacted files
@@           Coverage Diff            @@
##             next    #2119    +/-   ##
========================================
  Coverage   99.59%   99.60%            
========================================
  Files        2638     2631     -7     
  Lines      244685   245567   +882     
  Branches     1081     1155    +74     
========================================
+ Hits       243698   244587   +889     
+ Misses        960      953     -7     
  Partials       27       27            
Impacted Files Coverage Δ
src/locales/en_AU/location/city_pattern.ts 100.00% <100.00%> (ø)
src/locales/en_CA/location/city_pattern.ts 100.00% <100.00%> (ø)
src/locales/en_GB/location/city_pattern.ts 100.00% <100.00%> (ø)
src/locales/en_IE/location/city_pattern.ts 100.00% <100.00%> (ø)
src/locales/en_US/location/city_pattern.ts 100.00% <100.00%> (ø)
src/locales/fr_CA/location/city_pattern.ts 100.00% <100.00%> (ø)
src/locales/pt_BR/location/city_pattern.ts 100.00% <100.00%> (ø)

... and 67 files with indirect coverage changes

import-brain
import-brain previously approved these changes May 3, 2023
ST-DDT
ST-DDT previously approved these changes May 4, 2023
@ST-DDT ST-DDT requested review from import-brain and a team May 4, 2023 17:20
Shinigami92
Shinigami92 previously approved these changes May 4, 2023
import-brain
import-brain previously approved these changes May 4, 2023
@matthewmayer matthewmayer removed the needs rebase There is a merge conflict label Jun 17, 2023
@ST-DDT ST-DDT enabled auto-merge (squash) July 20, 2023 22:43
@ST-DDT ST-DDT merged commit 7a4bb43 into faker-js:next Jul 20, 2023
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: locale Permutes locale definitions m: location Something is referring to the location module p: 1-normal Nothing urgent
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

5 participants