diff --git a/lib/locales/de-AT.yml b/lib/locales/de-AT.yml index 1ed3d6d6c1..ce697fd1bc 100644 --- a/lib/locales/de-AT.yml +++ b/lib/locales/de-AT.yml @@ -49,6 +49,8 @@ de-AT: - "#{first_name} #{last_name} #{last_name}" - "#{first_name} #{last_name} #{last_name}" + country_code: ['43'] + phone_number: formats: ['01 #######', '01#######', '1-#######', '1#######', '0#### ####', '0#########', '####-####', '########'] diff --git a/lib/locales/de-CH.yml b/lib/locales/de-CH.yml index 05ad8c2245..4e39a23838 100644 --- a/lib/locales/de-CH.yml +++ b/lib/locales/de-CH.yml @@ -1708,5 +1708,7 @@ de-CH: internet: domain_suffix: [com, net, biz, ch, de, li, at, ch, ch] + country_code: ['49'] + phone_number: formats: ['0800 ### ###', '0800 ## ## ##', '0## ### ## ##', '0## ### ## ##', '## ### ## ##', '0900 ### ###', '076 ### ## ##', '78 ### ## ##', '0041 79 ### ## ##'] diff --git a/lib/locales/de.yml b/lib/locales/de.yml index 1212f300af..df53c181fb 100644 --- a/lib/locales/de.yml +++ b/lib/locales/de.yml @@ -107,6 +107,8 @@ de: material: [Stahl, Holz, Beton, Plastik, Baumwoll, Granit, Gummi, Leder, Seiden, Wolle, Leinen, Marmor, Eisen, Bronze, Kupfer, Aluminium, Papier] product: [Stuhl, Auto, Computer, Handschuh, Hose, Hemd, Tisch, Schuh, Hut, Teller, Messer, Flasche, Mantel, Lampe, Tastatur, Tasche, Bank, Uhr, Armbanduhr, Geldbörse] + country_code: ['49'] + phone_number: formats: ['(0###) #########', '(0####) #######', '###-#######', '####-########'] diff --git a/lib/locales/en-NEP.yml b/lib/locales/en-NEP.yml index 14a6e3a48d..13d0f00f14 100644 --- a/lib/locales/en-NEP.yml +++ b/lib/locales/en-NEP.yml @@ -45,5 +45,8 @@ en-NEP: domain_suffix: ['np', 'com', 'info', 'net', 'org'] company: suffix: ['Pvt Ltd', 'Group', 'Ltd', 'Limited'] + + country_code: ['977'] + phone_number: formats: ['##-#######', '#-#######', '########'] diff --git a/lib/locales/en-NZ.yml b/lib/locales/en-NZ.yml index 3d06844805..0ef75714c2 100644 --- a/lib/locales/en-NZ.yml +++ b/lib/locales/en-NZ.yml @@ -150,6 +150,8 @@ en-NZ: - "#{street_address}, #{community}, #{city} #{postcode}" - "#{mail_box} #{community} #{postcode}" - "#{mail_box}, #{community}, #{city} #{postcode}" + + country_code: ['64'] phone_number: formats: ['0# ### ####', '# ### ####'] cell_phone: diff --git a/lib/locales/en-PAK.yml b/lib/locales/en-PAK.yml index c83ce3c935..6bafbc576e 100644 --- a/lib/locales/en-PAK.yml +++ b/lib/locales/en-PAK.yml @@ -14,5 +14,6 @@ en-PAK: domain_suffix: [pk, com, com.pk, name, net, org, html, edu] company: suffix: [Pvt Ltd, Limited, Ltd, and Sons, Corp, Group, Brothers, CO] + country_code: ['92'] phone_number: formats: ['##########', '### #######', '03##-#######'] diff --git a/lib/locales/en-SG.yml b/lib/locales/en-SG.yml index dbe62e4c72..4d867ac671 100644 --- a/lib/locales/en-SG.yml +++ b/lib/locales/en-SG.yml @@ -29,6 +29,7 @@ en-SG: street_address: - "#{building_number} #{street_name}" default_country: [Singapore] + country_code: ['65'] phone_number: formats: ['6### ####', '9### ####', '8### ####'] vehicle: diff --git a/lib/locales/en-au-ocker.yml b/lib/locales/en-au-ocker.yml index f1eb296fc5..cdfcdf72eb 100644 --- a/lib/locales/en-au-ocker.yml +++ b/lib/locales/en-au-ocker.yml @@ -27,6 +27,7 @@ en-au-ocker: building_number: ['####', '###', '##'] street_suffix: [Avenue, Boulevard, Circle, Circuit, Court, Crescent, Crest, Drive, Estate Dr, Grove, Hill, Island, Junction, Knoll, Lane, Loop, Mall, Manor, Meadow, Mews, Parade, Parkway, Pass, Place, Plaza, Ridge, Road, Run, Square, Station St, Street, Summit, Terrace, Track, Trail, View Rd, Way] default_country: [Australia] + country_code: ['61'] phone_number: formats: ['0# #### ####', '# #### ####', '4## ### ###'] #iOS AUS phone formats cell_phone: diff --git a/lib/locales/fr.yml b/lib/locales/fr.yml index e288ac6124..a2f1744605 100644 --- a/lib/locales/fr.yml +++ b/lib/locales/fr.yml @@ -97,6 +97,9 @@ fr: - "#{first_name} #{last_name} #{last_name}" - "#{first_name} #{last_name} #{last_name}" - "#{first_name} #{last_name} #{last_name}" + + country_code: ['33'] + phone_number: formats: ['01########', '02########', '03########', '04########', '05########', '09########', '1########', '2########', '3########', '4########', '5########', '9########', '01 ## ## ## ##', '02 ## ## ## ##', '03 ## ## ## ##', '04 ## ## ## ##', '05 ## ## ## ##', '09 ## ## ## ##', '1 ## ## ## ##', '2 ## ## ## ##', '3 ## ## ## ##', '4 ## ## ## ##', '5 ## ## ## ##', '9 ## ## ## ##'] diff --git a/lib/locales/it.yml b/lib/locales/it.yml index ab1b7d6833..1b897dba5d 100644 --- a/lib/locales/it.yml +++ b/lib/locales/it.yml @@ -60,6 +60,7 @@ it: - "#{first_name} #{last_name} #{last_name}" - "#{first_name} #{last_name} #{last_name}" - "#{first_name} #{last_name} #{last_name}" + country_code: ['39'] phone_number: formats: ['### ## ## ####', '## #######', '## ########', '### #######', '### ########', '#### #######', '#### ########', '0## ### ####', '0## ### ###', '3## ### ###', '3## ### ###'] subscription: diff --git a/lib/locales/nb-NO.yml b/lib/locales/nb-NO.yml index 15145b15ed..04d6d67b1a 100644 --- a/lib/locales/nb-NO.yml +++ b/lib/locales/nb-NO.yml @@ -55,6 +55,8 @@ nb-NO: - "#{first_name} #{last_name} #{last_name}" - "#{first_name} #{last_name} #{last_name}" + country_code: ['47'] + phone_number: formats: ["########", "## ## ## ##", "### ## ###", "## ## ## ##"] diff --git a/lib/locales/pt.yml b/lib/locales/pt.yml index 432a0c841a..1db9eb45f3 100644 --- a/lib/locales/pt.yml +++ b/lib/locales/pt.yml @@ -62,5 +62,7 @@ pt: - "#{first_name} #{last_name} #{last_name}" - "#{first_name} #{last_name} #{last_name}" + country_code: ['351'] + phone_number: formats: ["(##) ###-####", "(##) ###-####", "884 ###-###"] diff --git a/lib/locales/ru.yml b/lib/locales/ru.yml index b548acaa3e..611431ef8b 100644 --- a/lib/locales/ru.yml +++ b/lib/locales/ru.yml @@ -51,6 +51,8 @@ ru: name_with_middle: - "#{first_name} #{last_name} #{last_name}" + country_code: ['7'] + phone_number: formats: ['(9##)###-##-##'] diff --git a/lib/locales/sk.yml b/lib/locales/sk.yml index 112b403a2a..e171cad1d6 100644 --- a/lib/locales/sk.yml +++ b/lib/locales/sk.yml @@ -73,6 +73,8 @@ sk: first_name: - "#{male_first_name}" - "#{female_first_name}" - + + country_code: ['421'] + phone_number: formats: ['09## ### ###', '0## #### ####', '0# #### ####', '### ### ###'] diff --git a/test/test_de_at_locale.rb b/test/test_de_at_locale.rb index 4d352c8447..5ff2d081b9 100644 --- a/test/test_de_at_locale.rb +++ b/test/test_de_at_locale.rb @@ -48,6 +48,6 @@ def test_de_at_name_methods end def test_de_at_phone_number_methods - assert_match(/(43)|(06)|(436)[\d\s]+$/, Faker::PhoneNumber.cell_phone) + assert_match(/(43)|(06)|(436)[\d\s]+$/, Faker::PhoneNumber.cell_phone_with_country_code) end end diff --git a/test/test_de_locale.rb b/test/test_de_locale.rb index 16d829fac6..adb0a254b5 100644 --- a/test/test_de_locale.rb +++ b/test/test_de_locale.rb @@ -127,8 +127,8 @@ def test_de_space_methods end def test_de_cell_phone_countrycode - mobile = Faker::PhoneNumber.cell_phone.gsub(/\D/, '') - assert_equal '4', mobile[0] - assert_equal '9', mobile[1] + mobile = Faker::PhoneNumber.cell_phone_with_country_code.gsub(/\D/, '') + + assert_match(/^(0|49)/, mobile) end end diff --git a/test/test_fr_locale.rb b/test/test_fr_locale.rb index 71e2eb47e9..7d75b9755e 100644 --- a/test/test_fr_locale.rb +++ b/test/test_fr_locale.rb @@ -122,7 +122,7 @@ def test_fr_phone_format def test_fr_cell_phone_format mobile = Faker::PhoneNumber.cell_phone.gsub(/\D/, '') - assert_match(/^(0|33)(6|7)\d{8}$/, mobile) + assert_match(/^(6|7)\d{8}$/, mobile) end def test_fr_pokemon_methods