Skip to content

Commit 3a65e1e

Browse files
Merge pull request #3024 from wonderer007/update-cell-phone-format-default-time-zone-and-state-abbr-for-en-pak-locale
Add Cell Phone, Default Time Zone and State Abbreviation translation for en-PAK locale
2 parents 3b56a73 + 72c6c1b commit 3a65e1e

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed

lib/locales/en-PAK.yml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,14 +341,23 @@ en-PAK:
341341
- Punjab
342342
- Sindh
343343
- Islamabad Capital Territory
344-
- Federally Administered Tribal Areas
345344
- Azad Jammu and Kashmir
346345
- Gilgit-Baltistan
346+
state_abbr:
347+
- BA
348+
- KPK
349+
- PB
350+
- SD
351+
- ICT
352+
- AJK
353+
- GB
347354
default_country:
348355
- Pakistan
349356
- Islamic Republic of Pakistan
350357
default_country_code:
351358
- PK
359+
default_time_zone:
360+
- Asia/Karachi
352361
internet:
353362
domain_suffix:
354363
- pk
@@ -376,3 +385,17 @@ en-PAK:
376385
- "##########"
377386
- "### #######"
378387
- 03##-#######
388+
cell_phone:
389+
formats:
390+
- "0311#######"
391+
- "0312#######"
392+
- "0313#######"
393+
- "0314#######"
394+
- "0315#######"
395+
- "0300#######"
396+
- "0301#######"
397+
- "0321#######"
398+
- "0322#######"
399+
- "0345#######"
400+
- "0346#######"
401+
- "0346#######"

test/test_en_pak_locale.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ def teardown
1414

1515
def test_en_pak_methods
1616
assert_kind_of String, Faker::Address.state
17+
assert_kind_of String, Faker::Address.state_abbr
1718
assert_kind_of String, Faker::Address.default_country
19+
assert_kind_of String, Faker::Address.default_time_zone
1820
assert_kind_of String, Faker::Address.postcode
1921
assert_match(/\A(Pakistan|Islamic Republic of Pakistan)\z/, Faker::Address.default_country)
2022
end
@@ -33,4 +35,10 @@ def test_en_pak_name_methods
3335
assert_kind_of String, Faker::Name.last_name
3436
assert_kind_of String, Faker::Name.name_with_middle
3537
end
38+
39+
def test_en_pak_cell_phone_is_valid
40+
mobile = Faker::PhoneNumber.cell_phone
41+
42+
assert_match(/03\d{2}\d{7}/, mobile)
43+
end
3644
end

0 commit comments

Comments
 (0)