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 Cell Phone, Default Time Zone and State Abbreviation translation for en-PAK locale #3024

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

wonderer007
Copy link
Contributor

Motivation / Background

en-PAK locale missing cell phone format. The existing Faker::PhoneNumber.phone_number generator mixes both landline and mobile (even though that too is wrong per Pakistan format). This PR adds cell phone format for the en-PAK locale.

It also includes state abbreviations and default time zones.

Additional information

  1. https://en.wikipedia.org/wiki/Abbreviations_of_administrative_units_of_Pakistan
  2. https://en.wikipedia.org/wiki/List_of_telecommunication_companies_in_Pakistan

Checklist

Before submitting the PR make sure the following are checked:

  • This Pull Request is related to one change. Changes that are unrelated should be opened in separate PRs.
  • Commit message has a detailed description of what changed and why. If this PR fixes a related issue include it in the commit message. Ex: [Fix #issue-number]
  • Tests are added or updated if you fix a bug, refactor something, or add a feature.
  • Tests and Rubocop are passing before submitting your proposed changes.

If you're proposing a new generator or locale:

  • Double-check the existing generators documentation to make sure the new generator you want to add doesn't already exist.
  • You've reviewed and followed the Contributing guidelines.

@wonderer007
Copy link
Contributor Author

Here is the output that I have now in the console:

3.2.2 :021 > Faker::Config.locale = 'en-PAK'
 => "en-PAK" 
3.2.2 :022 > Faker::PhoneNumber.cell_phone
 => "0321-5631055" 
3.2.2 :023 > Faker::PhoneNumber.cell_phone
 => "0346-6844205" 
3.2.2 :024 > Faker::PhoneNumber.cell_phone
 => "0301-8081558" 
3.2.2 :025 > Faker::Address.default_time_zone
 => "Asia/Karachi" 
3.2.2 :026 > Faker::Address.state_abbr
 => "PK-JK" 
3.2.2 :027 > Faker::Address.state_abbr
 => "PK-SD" 
3.2.2 :028 > Faker::Address.state_abbr
 => "PK-TA" 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant