Skip to content

Commit

Permalink
add maltese people names (#436)
Browse files Browse the repository at this point in the history
  • Loading branch information
cieslarmichal authored Jan 12, 2024
1 parent a319464 commit 2192152
Show file tree
Hide file tree
Showing 6 changed files with 99 additions and 20 deletions.
7 changes: 5 additions & 2 deletions include/faker-cxx/types/Country.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ enum class Country
Bosnia,
Lebanon,
Syria,
Malta,
};

const std::vector<Country> countries{
Expand All @@ -76,7 +77,8 @@ const std::vector<Country> countries{
Country::Australia, Country::Serbia, Country::Macedonia, Country::Albania, Country::Latvia,
Country::Ireland, Country::Belarus, Country::Estonia, Country::Iran, Country::Bulgaria,
Country::Moldova, Country::Lithuania, Country::Iceland, Country::Palestine, Country::Israel,
Country::Vietnam, Country::Monaco, Country::Bosnia, Country::Lebanon, Country::Syria
Country::Vietnam, Country::Monaco, Country::Bosnia, Country::Lebanon, Country::Syria,
Country::Malta,
};

inline std::string toString(Country country)
Expand Down Expand Up @@ -136,7 +138,8 @@ inline std::string toString(Country country)
{Country::Monaco, "Monaco"},
{Country::Bosnia, "Bosnia"},
{Country::Lebanon, "Lebanon"},
{Country::Syria, "Syria"}
{Country::Syria, "Syria"},
{Country::Malta, "Malta"},
};

return countryToStringMapping.at(country);
Expand Down
21 changes: 11 additions & 10 deletions src/modules/person/Person.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,20 @@
#include "data/korea/KoreanPeopleNames.h"
#include "data/Languages.h"
#include "data/latvia/LatvianPeopleNames.h"
#include "data/monaco/MonacanPeopleNames.h"
#include "data/lebanon/LebanesePeopleNames.h"
#include "data/lithuania/LithuanianPeopleNames.h"
#include "data/macedonia/MacedonianPeopleNames.h"
#include "data/malta/MaltesePeopleNames.h"
#include "data/mexico/MexicanPeopleNames.h"
#include "data/moldova/MoldovanPeopleNames.h"
#include "data/monaco/MonacanPeopleNames.h"
#include "data/Nationalities.h"
#include "data/nepal/NepalesePeopleNames.h"
#include "data/netherlands/DutchPeopleNames.h"
#include "data/norway/NorwegianPeopleNames.h"
#include "data/poland/PolishPeopleNames.h"
#include "data/palestine/PalestinianPeopleNames.h"
#include "data/poland/PolishPeopleNames.h"
#include "data/portugal/PortuguesePeopleNames.h"
#include "data/vietnam/VietnamesePeopleNames.h"
#include "data/romania/RomanianPeopleNames.h"
#include "data/russia/RussianPeopleNames.h"
#include "data/serbia/SerbianPeopleNames.h"
Expand All @@ -62,11 +63,11 @@
#include "data/SsnFormats.h"
#include "data/sweden/SwedishPeopleNames.h"
#include "data/switzerland/SwissPeopleNames.h"
#include "data/syria/SyrianPeopleNames.h"
#include "data/turkey/TurkishPeopleNames.h"
#include "data/ukraine/UkrainianPeopleNames.h"
#include "data/usa/UsaPeopleNames.h"
#include "data/lebanon/LebanesePeopleNames.h"
#include "data/syria/SyrianPeopleNames.h"
#include "data/vietnam/VietnamesePeopleNames.h"
#include "data/ZodiacSigns.h"
#include "faker-cxx/Helper.h"
#include "faker-cxx/Internet.h"
Expand Down Expand Up @@ -101,11 +102,11 @@ const std::map<Country, PeopleNames> countryToPeopleNamesMapping{
{Country::Belarus, belarusianPeopleNames}, {Country::Estonia, estonianPeopleNames},
{Country::Albania, albanianPeopleNames}, {Country::Iran, persianPeopleNames},
{Country::Bulgaria, bulgarianPeopleNames}, {Country::Moldova, moldovanPeopleNames},
{Country::Bosnia, bosnianPeopleNames}, {Country::Bosnia, bosnianPeopleNames},
{Country::Lithuania, lithuanianPeopleNames}, {Country::Iceland, icelandicPeopleNames},
{Country::Palestine, palestinianPeopleNames}, {Country::Israel, israeliPeopleNames},
{Country::Vietnam, vietnamesePeopleNames}, {Country::Monaco, monacanPeopleNames},
{Country::Lebanon, lebanesePeopleNames}, {Country::Syria, syrianPeopleNames}
{Country::Bosnia, bosnianPeopleNames}, {Country::Lithuania, lithuanianPeopleNames},
{Country::Iceland, icelandicPeopleNames}, {Country::Palestine, palestinianPeopleNames},
{Country::Israel, israeliPeopleNames}, {Country::Vietnam, vietnamesePeopleNames},
{Country::Monaco, monacanPeopleNames}, {Country::Lebanon, lebanesePeopleNames},
{Country::Syria, syrianPeopleNames}, {Country::Malta, maltesePeopleNames},
};

std::string middleNameForCountry(Country country, std::optional<Sex> sex);
Expand Down
17 changes: 9 additions & 8 deletions src/modules/person/PersonTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include "data/england/EnglishPeopleNames.h"
#include "data/estonia/EstonianPeopleNames.h"
#include "data/finland/FinnishPeopleNames.h"
#include "data/palestine/PalestinianPeopleNames.h"
#include "data/france/FrenchPeopleNames.h"
#include "data/Gender.h"
#include "data/germany/GermanPeopleNames.h"
Expand All @@ -39,15 +38,18 @@
#include "data/korea/KoreanPeopleNames.h"
#include "data/Languages.h"
#include "data/latvia/LatvianPeopleNames.h"
#include "data/lebanon/LebanesePeopleNames.h"
#include "data/lithuania/LithuanianPeopleNames.h"
#include "data/macedonia/MacedonianPeopleNames.h"
#include "data/monaco/MonacanPeopleNames.h"
#include "data/malta/MaltesePeopleNames.h"
#include "data/mexico/MexicanPeopleNames.h"
#include "data/moldova/MoldovanPeopleNames.h"
#include "data/monaco/MonacanPeopleNames.h"
#include "data/Nationalities.h"
#include "data/nepal/NepalesePeopleNames.h"
#include "data/netherlands/DutchPeopleNames.h"
#include "data/norway/NorwegianPeopleNames.h"
#include "data/palestine/PalestinianPeopleNames.h"
#include "data/poland/PolishPeopleNames.h"
#include "data/portugal/PortuguesePeopleNames.h"
#include "data/romania/RomanianPeopleNames.h"
Expand All @@ -58,11 +60,10 @@
#include "data/spain/SpanishPeopleNames.h"
#include "data/sweden/SwedishPeopleNames.h"
#include "data/switzerland/SwissPeopleNames.h"
#include "data/vietnam/VietnamesePeopleNames.h"
#include "data/syria/SyrianPeopleNames.h"
#include "data/turkey/TurkishPeopleNames.h"
#include "data/ukraine/UkrainianPeopleNames.h"
#include "data/lebanon/LebanesePeopleNames.h"
#include "data/syria/SyrianPeopleNames.h"
#include "data/vietnam/VietnamesePeopleNames.h"
#include "data/ZodiacSigns.h"
#include "src/modules/person/data/brazil/BrazilianPeopleNames.h"
#include "src/modules/person/data/PeopleNames.h"
Expand Down Expand Up @@ -102,8 +103,8 @@ const std::map<Country, PeopleNames> countryToPeopleNamesMapping{
{Country::Lithuania, lithuanianPeopleNames}, {Country::Iceland, icelandicPeopleNames},
{Country::Palestine, palestinianPeopleNames}, {Country::Israel, israeliPeopleNames},
{Country::Vietnam, vietnamesePeopleNames}, {Country::Monaco, monacanPeopleNames},
{Country::Bosnia, bosnianPeopleNames}, {Country::Lebanon, lebanesePeopleNames},
{Country::Syria, syrianPeopleNames},
{Country::Bosnia, bosnianPeopleNames}, {Country::Lebanon, lebanesePeopleNames},
{Country::Syria, syrianPeopleNames}, {Country::Malta, maltesePeopleNames},
};

const std::map<Country, std::string> generatedTestName{
Expand Down Expand Up @@ -134,7 +135,7 @@ const std::map<Country, std::string> generatedTestName{
{Country::Palestine, "shouldGeneratePalestinianName"}, {Country::Israel, "shouldGenerateIsraeliName"},
{Country::Vietnam, "shouldGenerateVietnameseName"}, {Country::Monaco, "shouldGenerateMonacanName"},
{Country::Bosnia, "shouldGenerateBosnianNames"}, {Country::Lebanon, "shouldGenerateLebaneseName"},
{Country::Syria, "shouldGenerateSyrianName"},
{Country::Syria, "shouldGenerateSyrianName"}, {Country::Malta, "shouldGenerateMalteseName"},
};
}

Expand Down
37 changes: 37 additions & 0 deletions src/modules/person/data/malta/MalteseFirstNames.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#pragma once

#include <string>
#include <vector>

namespace faker
{
const std::vector<std::string> malteseMalesFirstNames = {
"Joseph", "John", "Mark", "Mario", "David", "Paul", "Michael", "Anthony", "Joe",
"Charles", "Matthew", "Robert", "Daniel", "Chris", "George", "Andrew", "Peter", "Kevin",
"Adrian", "Stephen", "Jonathan", "James", "Martin", "Simon", "Ray", "Steven", "Alfred",
"Victor", "Raymond", "Karl", "Brian", "Alex", "Ivan", "Patrick", "Tony", "Christopher",
"Keith", "Edward", "Ian", "Jason", "Pierre", "Christian", "Kenneth", "Philip", "Alan",
"Ryan", "Luke", "Albert", "Louis", "Antoine", "Lawrence", "Stefan", "Roderick", "Vincent",
"Malcolm", "Richard", "Josef", "Darren", "Emanuel", "Nicholas", "Manuel", "Marco", "Alexander",
"Frank", "Kurt", "Andre", "Anton", "Gordon", "Thomas", "Sandro", "Etienne", "Charlie",
"Reuben", "Aaron", "Lino", "Justin", "William", "Julian", "Bernard", "Ronald", "Eric",
"Sean", "Neville", "Silvio", "Godwin", "Emmanuel", "Johann", "Neil", "Franco", "Clayton",
"Edwin", "Oliver", "Aldo", "Gilbert", "Jeffrey", "Duncan", "Jeremy", "Glenn", "Henry",
"Clive",
};

const std::vector<std::string> malteseFemalesFirstNames = {
"Maria", "Anna", "Mary", "Carmen", "Rita", "Noel", "Claire", "Sarah", "Stephanie",
"Daniela", "Christine", "Michelle", "Josephine", "Carmel", "Jean", "Sandra", "Ruth", "Joanne",
"Elaine", "Josette", "Sharon", "Charmaine", "Charlene", "Caroline", "Mariella", "Roberta", "Miriam",
"Rachel", "Francesca", "Amanda", "Joanna", "Andrea", "Marie", "Alison", "Pauline", "Elizabeth",
"Marisa", "Jessica", "Lara", "Denise", "Doris", "Rebecca", "Louise", "Karen", "Francis",
"Catherine", "Graziella", "Lorraine", "Vanessa", "Doreen", "Diane", "Patricia", "Rose", "Jane",
"Monica", "Victoria", "Margaret", "Romina", "Simone", "Alexia", "Melanie", "Fiona", "Lisa",
"Audrey", "Antoinette", "Nadia", "Emma", "Anne", "Jennifer", "Angela", "Nathalie", "Marlene",
"Grace", "Tania", "Natasha", "Laura", "Claudia", "Jacqueline", "Dennis", "Nicole", "Joan",
"Ann", "Alexandra", "Isabelle", "Antonella", "Helen", "Janice", "Joyce", "Nadine", "Natalie",
"Sue", "Marica", "Tiziana", "Christina", "Marion", "Therese", "Elena", "Abigail", "Cynthia",
"Susan",
};
}
22 changes: 22 additions & 0 deletions src/modules/person/data/malta/MalteseLastNames.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#pragma once

#include <string>
#include <vector>

namespace faker
{
const std::vector<std::string> malteseLastNames = {
"Borg", "Vella", "Camilleri", "Farrugia", "Zammit", "Galea", "Micallef", "Grech", "Attard",
"Cassar", "Spiteri", "Azzopardi", "Mifsud", "Caruana", "Muscat", "Agius", "Pace", "Fenech",
"Schembri", "Abela", "Sammut", "Gatt", "Gauci", "Debono", "Bugeja", "Vassallo", "Bonnici",
"Aquilina", "Portelli", "Calleja", "Scicluna", "Cutajar", "Falzon", "Grima", "Mallia", "Ellul",
"Saliba", "Bonello", "Cachia", "Mizzi", "Xuereb", "Buttigieg", "Scerri", "Busuttil", "Tabone",
"Cauchi", "Sciberras", "Bartolo", "Mercieca", "Baldacchino", "Buhagiar", "Briffa", "Formosa", "Brincat",
"Zahra", "Bezzina", "Sultana", "Mangion", "Chetcuti", "Dimech", "Darmanin", "Pisani", "Psaila",
"Cilia", "Cini", "Debattista", "Tanti", "Sant", "Mamo", "Zerafa", "Ciantar", "Magro",
"Said", "Chircop", "Zarb", "Barbara", "Dalli", "Curmi", "Frendo", "Tonna", "Cuschieri",
"Abdilla", "Deguara", "Magri", "Hili", "Cremona", "Cardona", "Xerri", "Balzan", "Degiorgio",
"Grixti", "Bajada", "Catania", "Pullicino", "Cordina", "Callus", "Meli", "Ebejer", "Anastasi",
"Theuma",
};
}
15 changes: 15 additions & 0 deletions src/modules/person/data/malta/MaltesePeopleNames.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#pragma once

#include "../NameFormats.h"
#include "../PeopleNames.h"
#include "MalteseFirstNames.h"
#include "MalteseLastNames.h"

namespace faker
{
const NameFormats maltesePersonNameFormats{{"{firstName} {lastName}", 1}};

const PeopleNames maltesePeopleNames{{malteseMalesFirstNames, {}, malteseLastNames, {}, {}},
{malteseFemalesFirstNames, {}, malteseLastNames, {}, {}},
maltesePersonNameFormats};
}

0 comments on commit 2192152

Please sign in to comment.