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

feat(locale): support street and street address for ja #2193

Merged
merged 12 commits into from
Apr 6, 2024

Conversation

KeisukeYamashita
Copy link
Contributor

@KeisukeYamashita KeisukeYamashita commented May 31, 2023

Fixed (added) Japanese address output.

Previously, English addresses were generated incorrectly, but the format has been changed to the correct address format.
Street address example:

import { fakerJA as faker } from "@faker-js/faker";

// Before
faker.location.streetAddress() // 5668 杏Square. Incorrect
faker.location.streetAddress(true) // 5668 杏Square. Incorrect

// After
faker.location.streetAddress() // 8丁目7番4号. Correct
faker.location.streetAddress(true) // 9丁目2番3号 木村768号室. Correct

Symbols can now be used in street addresses because street names in Japan sometimes contain numbers, but this has no other destructive effect. Of course, not all country road formats include numbers, but I believe they are used in many countries. I supported it because the use of symbols is completely restricted now.

Thank you in advance.

Disclaimer

I am not a government official or lawyer in charge of Japanese geography. However, in its current state, it is difficult to use it for address dummy data, so a PR was created.

Signed-off-by: KeisukeYamashita <[email protected]>
@KeisukeYamashita KeisukeYamashita marked this pull request as ready for review May 31, 2023 13:02
@KeisukeYamashita KeisukeYamashita requested a review from a team as a code owner May 31, 2023 13:02
@ST-DDT ST-DDT added c: feature Request for new feature p: 1-normal Nothing urgent s: needs decision Needs team/maintainer decision m: location Something is referring to the location module labels May 31, 2023
@KeisukeYamashita
Copy link
Contributor Author

Sorry, the CI failed.
Let me check 🙏

@ST-DDT
Copy link
Member

ST-DDT commented May 31, 2023

Looks like you forgot to run pnpm run preflight 😉 .

@matthewmayer
Copy link
Contributor

https://en.wikipedia.org/wiki/Japanese_addressing_system

@KeisukeYamashita KeisukeYamashita marked this pull request as draft June 1, 2023 01:21
@KeisukeYamashita
Copy link
Contributor Author

KeisukeYamashita commented Jun 1, 2023

Looks like you forgot to run pnpm run preflight 😉 .

Thank you very much for your comment, I have ran and push this commit 👉 a83f75a

@KeisukeYamashita KeisukeYamashita marked this pull request as ready for review June 1, 2023 01:54
@codecov
Copy link

codecov bot commented Jun 1, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.93%. Comparing base (f47dfe5) to head (76a8343).

Additional details and impacted files
@@           Coverage Diff           @@
##             next    #2193   +/-   ##
=======================================
  Coverage   99.93%   99.93%           
=======================================
  Files        2973     2975    +2     
  Lines      212592   212600    +8     
  Branches      949      951    +2     
=======================================
+ Hits       212452   212460    +8     
- Misses        136      140    +4     
+ Partials        4        0    -4     
Files Coverage Δ
src/locales/ja/location/index.ts 100.00% <100.00%> (ø)
src/locales/ja/location/secondary_address.ts 100.00% <100.00%> (ø)
src/locales/ja/location/street_address.ts 100.00% <100.00%> (ø)
src/locales/ja/location/street_pattern.ts 100.00% <100.00%> (ø)
src/modules/location/index.ts 99.67% <100.00%> (ø)

... and 5 files with indirect coverage changes

matthewmayer
matthewmayer previously approved these changes Jun 1, 2023
ST-DDT
ST-DDT previously requested changes Jun 1, 2023
src/locales/ja/location/secondary_address.ts Show resolved Hide resolved
@ST-DDT ST-DDT removed the s: needs decision Needs team/maintainer decision label Jun 1, 2023
@ST-DDT ST-DDT dismissed their stale review June 1, 2023 21:35

Wrong review.

@ST-DDT
Copy link
Member

ST-DDT commented Oct 7, 2023

Sorry for the long wait. This somehow got lost in the PR backlog.
I think we have to discuss internally if the fake pattern usage here is what we want.

@ST-DDT ST-DDT added the s: needs decision Needs team/maintainer decision label Oct 7, 2023
@ST-DDT ST-DDT removed the s: needs decision Needs team/maintainer decision label Apr 4, 2024
@ST-DDT ST-DDT changed the title feat(local): support street and street address for ja feat(locale): support street and street address for ja Apr 4, 2024
@ST-DDT
Copy link
Member

ST-DDT commented Apr 4, 2024

Team Decision

  • We accept this change. Please rebase so that we can merge this.

@ST-DDT ST-DDT added the needs rebase There is a merge conflict label Apr 4, 2024
Copy link

netlify bot commented Apr 4, 2024

Deploy Preview for fakerjs ready!

Name Link
🔨 Latest commit 76a8343
🔍 Latest deploy log https://app.netlify.com/sites/fakerjs/deploys/66118bc837a3a000085be2ae
😎 Deploy Preview https://deploy-preview-2193.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.

@KeisukeYamashita
Copy link
Contributor Author

Thank you for your consideration!
I've fixed the conflict and updated the main branch. Thanks in advance.

@xDivisionByZerox xDivisionByZerox enabled auto-merge (squash) April 6, 2024 17:52
@xDivisionByZerox xDivisionByZerox merged commit 501f4b3 into faker-js:next Apr 6, 2024
20 checks passed
@KeisukeYamashita KeisukeYamashita deleted the local/ja/add-street branch April 8, 2024 23:07
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 m: location Something is referring to the location module needs rebase There is a merge conflict p: 1-normal Nothing urgent
Projects
No open projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

5 participants