Skip to content

Conversation

@danielshvarts1207
Copy link
Contributor

Resolves #3521

@danielshvarts1207 danielshvarts1207 requested a review from a team as a code owner June 19, 2025 14:09
@netlify
Copy link

netlify bot commented Jun 19, 2025

Deploy Preview for fakerjs ready!

Name Link
🔨 Latest commit 4673ec3
🔍 Latest deploy log https://app.netlify.com/projects/fakerjs/deploys/6861b07503ae74000811ee6e
😎 Deploy Preview https://deploy-preview-3531.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 project configuration.

@xDivisionByZerox xDivisionByZerox added c: feature Request for new feature p: 1-normal Nothing urgent c: locale Permutes locale definitions m: word Something is referring to the word module labels Jun 19, 2025
@xDivisionByZerox xDivisionByZerox added this to the vAnytime milestone Jun 19, 2025
@danielshvarts1207 danielshvarts1207 changed the title Feature/add word data to pt br Feat/add word data to pt br Jun 19, 2025
@xDivisionByZerox
Copy link
Member

Hi @DanielShvarts2004 👋
First, let me thank you for your contribution.

The tests in the pipeline are failing, because the locale data you provided contain duplicate values. Can you remove them?
Also, your PR titles does currently not follow our guidelines. Please have a look at our CONTRIBUTING guidelines for more information.

If you need help with anything, feel free to ask :)

@danielshvarts1207 danielshvarts1207 changed the title Feat/add word data to pt br feat: add word data to pt_br locales Jun 19, 2025
@danielshvarts1207
Copy link
Contributor Author

Hey thank you for your helpful response 🙏
Just fixed the dups and the title .

@codecov
Copy link

codecov bot commented Jun 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.97%. Comparing base (bf3fe92) to head (4673ec3).
Report is 1 commits behind head on next.

Additional details and impacted files
@@            Coverage Diff             @@
##             next    #3531      +/-   ##
==========================================
- Coverage   99.97%   99.97%   -0.01%     
==========================================
  Files        2880     2888       +8     
  Lines      220510   222112    +1602     
  Branches      951      952       +1     
==========================================
+ Hits       220457   222053    +1596     
- Misses         53       59       +6     
Files with missing lines Coverage Δ
src/locales/pt_BR/index.ts 100.00% <100.00%> (ø)
src/locales/pt_BR/word/adjective.ts 100.00% <100.00%> (ø)
src/locales/pt_BR/word/index.ts 100.00% <100.00%> (ø)
src/locales/pt_BR/word/noun.ts 100.00% <100.00%> (ø)
src/locales/pt_BR/word/verb.ts 100.00% <100.00%> (ø)
src/locales/pt_PT/index.ts 100.00% <100.00%> (ø)
src/locales/pt_PT/word/adjective.ts 100.00% <100.00%> (ø)
src/locales/pt_PT/word/index.ts 100.00% <100.00%> (ø)
src/locales/pt_PT/word/noun.ts 100.00% <100.00%> (ø)
src/locales/pt_PT/word/verb.ts 100.00% <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.

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.

The changes itself look fine. Would you be able to sort the list alphabetically? 🙂

We already introduced sorting in some locale data, but not in the work module so far. By sorting the data now you'd help us reduce the potential diff when we introduce the normalization later this year.

@xDivisionByZerox xDivisionByZerox modified the milestones: vAnytime, v9.x Jun 19, 2025
@xDivisionByZerox xDivisionByZerox changed the title feat: add word data to pt_br locales feat(locale): add word data to pt_br locales Jun 19, 2025
@danielshvarts1207
Copy link
Contributor Author

Of course! Love the idea

ejcheng
ejcheng previously approved these changes Jun 21, 2025
matthewmayer
matthewmayer previously approved these changes Jun 21, 2025
@matthewmayer
Copy link
Contributor

I don't know how similar pt_PT and pt_BR are. Could we use the same word lists for pt_PT?

@danielshvarts1207
Copy link
Contributor Author

@matthewmayer
pt_PT and pt_BR are similar but have some differences. We definitely can make your suggestion, but it might not be 100% accurate. Let me know what you think. I can copy those words to pt_PT.

(If we would do that, why do we need them both and not expose one pt locale?)

@matthewmayer
Copy link
Contributor

@matthewmayer

pt_PT and pt_BR are similar but have some differences. We definitely can make your suggestion, but it might not be 100% accurate. Let me know what you think. I can copy those words to pt_PT.

(If we would do that, why do we need them both and not expose one pt locale?)

We need both because for example the location or phone modules are substantially different for both.

Maybe could copy over and then we could make tweaks to the pt_PT version in future if there are any words which are uncommon in pt_PT.

@danielshvarts1207
Copy link
Contributor Author

You're right, good point. I'll do that.

@danielshvarts1207 danielshvarts1207 dismissed stale reviews from matthewmayer and ejcheng via e587f4f June 28, 2025 07:28
@matthewmayer matthewmayer changed the title feat(locale): add word data to pt_br locales feat(locale): add word data to pt_br and pt_pt locales Jun 28, 2025
@xDivisionByZerox xDivisionByZerox merged commit a405ac8 into faker-js:next Jun 29, 2025
23 checks passed
@xDivisionByZerox
Copy link
Member

Thank you for your contribution @DanielShvarts2004 🙏
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?

@danielshvarts1207
Copy link
Contributor Author

  1. I've been wanting to contribute to an open source project for a while, and had some free time. We're using faker js in the company i work for and i like it, so I thought it could be nice to make a contribution here. Found this first issue and decided to go for it. Hope it will help someone in the future.

  2. Yes

  3. The project was clear.

  4. The maintainers were responsive, helpful, very kind and nice. Thank youu!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c: feature Request for new feature c: locale Permutes locale definitions m: word Something is referring to the word module p: 1-normal Nothing urgent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing 'word.adjective' locale data in 'pt_BR' breaks internet.domainName()

4 participants