Skip to content

Commit

Permalink
Merge pull request #3024 from wonderer007/update-cell-phone-format-de…
Browse files Browse the repository at this point in the history
…fault-time-zone-and-state-abbr-for-en-pak-locale

Add Cell Phone, Default Time Zone and State Abbreviation translation for en-PAK locale
  • Loading branch information
stefannibrasil authored Feb 11, 2025
2 parents 3b56a73 + 72c6c1b commit 3a65e1e
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
25 changes: 24 additions & 1 deletion lib/locales/en-PAK.yml
Original file line number Diff line number Diff line change
Expand Up @@ -341,14 +341,23 @@ en-PAK:
- Punjab
- Sindh
- Islamabad Capital Territory
- Federally Administered Tribal Areas
- Azad Jammu and Kashmir
- Gilgit-Baltistan
state_abbr:
- BA
- KPK
- PB
- SD
- ICT
- AJK
- GB
default_country:
- Pakistan
- Islamic Republic of Pakistan
default_country_code:
- PK
default_time_zone:
- Asia/Karachi
internet:
domain_suffix:
- pk
Expand Down Expand Up @@ -376,3 +385,17 @@ en-PAK:
- "##########"
- "### #######"
- 03##-#######
cell_phone:
formats:
- "0311#######"
- "0312#######"
- "0313#######"
- "0314#######"
- "0315#######"
- "0300#######"
- "0301#######"
- "0321#######"
- "0322#######"
- "0345#######"
- "0346#######"
- "0346#######"
8 changes: 8 additions & 0 deletions test/test_en_pak_locale.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ def teardown

def test_en_pak_methods
assert_kind_of String, Faker::Address.state
assert_kind_of String, Faker::Address.state_abbr
assert_kind_of String, Faker::Address.default_country
assert_kind_of String, Faker::Address.default_time_zone
assert_kind_of String, Faker::Address.postcode
assert_match(/\A(Pakistan|Islamic Republic of Pakistan)\z/, Faker::Address.default_country)
end
Expand All @@ -33,4 +35,10 @@ def test_en_pak_name_methods
assert_kind_of String, Faker::Name.last_name
assert_kind_of String, Faker::Name.name_with_middle
end

def test_en_pak_cell_phone_is_valid
mobile = Faker::PhoneNumber.cell_phone

assert_match(/03\d{2}\d{7}/, mobile)
end
end

0 comments on commit 3a65e1e

Please sign in to comment.