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

Add options to make locations coherent #2568

Closed
Akryum opened this issue Dec 6, 2023 · 3 comments
Closed

Add options to make locations coherent #2568

Akryum opened this issue Dec 6, 2023 · 3 comments
Labels
c: feature Request for new feature has workaround Workaround provided or linked s: awaiting more info Additional information are requested s: pending triage Pending Triage s: waiting for user interest Waiting for more users interested in this feature

Comments

@Akryum
Copy link

Akryum commented Dec 6, 2023

Clear and concise description of the problem

Currently location functions such as city() are fully random.

Suggested solution

Add options to pass a country or other contextual information about the location to make it plausible.

Example:

faker.location.city({ countryCode: 'FR' })

Alternative

No response

Additional context

No response

@Akryum Akryum added c: feature Request for new feature s: pending triage Pending Triage s: waiting for user interest Waiting for more users interested in this feature labels Dec 6, 2023
Copy link
Contributor

github-actions bot commented Dec 6, 2023

Thank you for your feature proposal.

We marked it as "waiting for user interest" for now to gather some feedback from our community:

  • If you would like to see this feature be implemented, please react to the description with an up-vote (:+1:).
  • If you have a suggestion or want to point out some special cases that need to be considered, please leave a comment, so we are aware about them.

We would also like to hear about other community members' use cases for the feature to give us a better understanding of their potential implicit or explicit requirements.

We will start the implementation based on:

  • the number of votes (:+1:) and comments
  • the relevance for the ecosystem
  • availability of alternatives and workarounds
  • and the complexity of the requested feature

We do this because:

  • There are plenty of languages/countries out there and we would like to ensure that every method can cover all or almost all of them.
  • Every feature we add to faker has "costs" associated to it:
    • initial costs: design, implementation, reviews, documentation
    • running costs: awareness of the feature itself, more complex module structure, increased bundle size, more work during refactors

View more issues which are waiting for user interest

@ST-DDT
Copy link
Member

ST-DDT commented Dec 6, 2023

The city names are partially random due to them having patterns.
But the patterns and generated names refer to the selected locale. The default faker instance is EN.
If you need FR city names, use the fakerFR import instead.

https://fakerjs.dev/guide/localization.html

Does that help you?

@ST-DDT ST-DDT added the s: awaiting more info Additional information are requested label Dec 6, 2023
@ST-DDT ST-DDT added the has workaround Workaround provided or linked label Feb 14, 2024
@ST-DDT
Copy link
Member

ST-DDT commented Feb 14, 2024

Closing, because no feedback has been provided.

Please use fakerFR.location.city() instead or please describe why that doesn't help in your case.

@ST-DDT ST-DDT closed this as not planned Won't fix, can't repro, duplicate, stale Feb 14, 2024
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 has workaround Workaround provided or linked s: awaiting more info Additional information are requested s: pending triage Pending Triage s: waiting for user interest Waiting for more users interested in this feature
Projects
None yet
Development

No branches or pull requests

2 participants