Skip to content

refactor(locale): rename pt-BR streetSuffix to streetPrefix #3493

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

Merged

Conversation

glmchalita
Copy link
Contributor

What’s changed

Renamed streetSuffixstreetPrefix in the PT-BR locale data and updated all related code and tests.

Why

In Brazilian addresses, the street type (e.g. “Rua”, “Avenida”) always appears before the street name (for example, “Rua das Flores”). Calling it a “prefix” better reflects how our PT-BR formatting actually works.

@glmchalita glmchalita requested a review from a team as a code owner April 28, 2025 18:28
Copy link

netlify bot commented Apr 28, 2025

Deploy Preview for fakerjs ready!

Name Link
🔨 Latest commit cef8afa
🔍 Latest deploy log https://app.netlify.com/sites/fakerjs/deploys/68173b07d47eb10008660861
😎 Deploy Preview https://deploy-preview-3493.fakerjs.dev
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Apr 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.97%. Comparing base (1dbd8fa) to head (cef8afa).
Report is 1 commits behind head on next.

Additional details and impacted files
@@           Coverage Diff           @@
##             next    #3493   +/-   ##
=======================================
  Coverage   99.97%   99.97%           
=======================================
  Files        2876     2876           
  Lines      220587   220587           
  Branches      951      949    -2     
=======================================
+ Hits       220532   220534    +2     
+ Misses         55       53    -2     
Files with missing lines Coverage Δ
src/locales/pt_BR/location/index.ts 100.00% <100.00%> (ø)
src/locales/pt_BR/location/street_pattern.ts 100.00% <100.00%> (ø)
src/locales/pt_BR/location/street_prefix.ts 100.00% <ø> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@xDivisionByZerox xDivisionByZerox added p: 1-normal Nothing urgent c: locale Permutes locale definitions m: location Something is referring to the location module labels Apr 29, 2025
Copy link
Member

@xDivisionByZerox xDivisionByZerox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍


For other reviewers:

@xDivisionByZerox xDivisionByZerox requested a review from a team April 29, 2025 15:33
@xDivisionByZerox xDivisionByZerox added this to the vAnytime milestone Apr 29, 2025
@xDivisionByZerox xDivisionByZerox modified the milestones: vAnytime, v9.x May 4, 2025
@xDivisionByZerox xDivisionByZerox merged commit 7c23db3 into faker-js:next May 4, 2025
23 checks passed
@xDivisionByZerox
Copy link
Member

Thank you for your contribution @glmchalita.
I see that this was your first contribution to our project.
Would you mind answering some questions regarding your contribution? This way we can understand the potential struggles or confusions new contributors might have when getting into the project. If you don't want to answer, please ignore this comment:

  1. What did motivate you to do your contribution?
  2. Did you read our documentation regarding contributing before starting to work on your contribution?
  3. How clear was the process of working on your contribution (before the PR) for you? Was there ever a time while working in the project where you didn't know what to do? If so how did you solve your problem?
  4. How clear was the process of the code review (PR) for you? Was there ever a time you felt unsure about the current situation?
  5. Anything else you'd like to share with the Faker team?

@glmchalita
Copy link
Contributor Author

  1. What did motivate you to do your contribution?
  • I recently discovered that the project supports locales, and I felt I could help improve the locale for my region with what I know.
  1. Did you read our documentation regarding contributing before starting to work on your contribution?
  • Yes, it was very clear and well explained.
  1. How clear was the process of working on your contribution (before the PR) for you? Was there ever a time while working in the project where you didn't know what to do? If so how did you solve your problem?
  • When I first ran the project on my machine, I felt a bit lost. I followed the steps in CONTRIBUTING.md and was able to find what I needed.
  • I also had a moment of uncertainty when I wasn’t sure if the tests were actually running. I think that was more due to my own unfamiliarity, but I took a closer look at them and eventually understood how they worked.
  1. How clear was the process of the code review (PR) for you? Was there ever a time you felt unsure about the current situation?
  • Because my contribution was relatively simple, I don’t have much more to add. The code review process was very straightforward and well explained—excellent.
  1. Anything else you'd like to share with the Faker team?
  • Keep up the great work—thank you!

@glmchalita glmchalita deleted the refactor/pt-br-street-prefix branch May 4, 2025 11:13
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
None yet
Development

Successfully merging this pull request may close these issues.

3 participants