Skip to content

Commit

Permalink
fix(locale): update cell_phone format, default timezone and state abb…
Browse files Browse the repository at this point in the history
…r for en-PAK locale
  • Loading branch information
wonderer007 authored and thdaraujo committed Jan 7, 2025
1 parent 789251c commit 0754377
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
26 changes: 26 additions & 0 deletions lib/locales/en-PAK.yml
Original file line number Diff line number Diff line change
Expand Up @@ -344,11 +344,23 @@ en-PAK:
- Federally Administered Tribal Areas
- Azad Jammu and Kashmir
- Gilgit-Baltistan
state_abbr:
- PK-BA
- PK-KP
- PK-PB
- PK-SD
- PK-IS
- PK-TA
- PK-JK
- PK-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 +388,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 0754377

Please sign in to comment.