Skip to content

Commit

Permalink
add people names from Ghana (#441)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshhn authored Jan 14, 2024
1 parent 175d2c6 commit 9a15ac6
Show file tree
Hide file tree
Showing 6 changed files with 431 additions and 1 deletion.
4 changes: 3 additions & 1 deletion include/faker-cxx/types/Country.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ enum class Country
Malta,
SouthAfrica,
Azerbaijan,
Ghana,
};

const std::vector<Country> countries{
Expand All @@ -80,7 +81,7 @@ const std::vector<Country> countries{
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::Malta, Country::SouthAfrica, Country::Azerbaijan,
Country::Malta, Country::SouthAfrica, Country::Azerbaijan, Country::Ghana,
};

inline std::string toString(Country country)
Expand Down Expand Up @@ -144,6 +145,7 @@ inline std::string toString(Country country)
{Country::Malta, "Malta"},
{Country::SouthAfrica, "South Africa"},
{Country::Azerbaijan, "Azerbaijan"},
{Country::Ghana, "Ghana"},
};

return countryToStringMapping.at(country);
Expand Down
2 changes: 2 additions & 0 deletions src/modules/person/Person.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
#include "data/ukraine/UkrainianPeopleNames.h"
#include "data/usa/UsaPeopleNames.h"
#include "data/vietnam/VietnamesePeopleNames.h"
#include "data/ghana/GhanaianPeopleNames.h"
#include "data/ZodiacSigns.h"
#include "faker-cxx/Helper.h"
#include "faker-cxx/Internet.h"
Expand Down Expand Up @@ -110,6 +111,7 @@ const std::map<Country, PeopleNames> countryToPeopleNamesMapping{
{Country::Monaco, monacanPeopleNames}, {Country::Lebanon, lebanesePeopleNames},
{Country::Syria, syrianPeopleNames}, {Country::Malta, maltesePeopleNames},
{Country::SouthAfrica, southAfricanPeopleNames}, {Country::Azerbaijan, azerbaijaniPeopleNames},
{Country::Ghana, ghanaianPeopleNames},
};

std::string middleNameForCountry(Country country, std::optional<Sex> sex);
Expand Down
3 changes: 3 additions & 0 deletions src/modules/person/PersonTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
#include "data/spain/SpanishPeopleNames.h"
#include "data/sweden/SwedishPeopleNames.h"
#include "data/switzerland/SwissPeopleNames.h"
#include "data/ghana/GhanaianPeopleNames.h"
#include "data/syria/SyrianPeopleNames.h"
#include "data/turkey/TurkishPeopleNames.h"
#include "data/ukraine/UkrainianPeopleNames.h"
Expand Down Expand Up @@ -108,6 +109,7 @@ const std::map<Country, PeopleNames> countryToPeopleNamesMapping{
{Country::Bosnia, bosnianPeopleNames}, {Country::Lebanon, lebanesePeopleNames},
{Country::Syria, syrianPeopleNames}, {Country::Malta, maltesePeopleNames},
{Country::SouthAfrica, southAfricanPeopleNames}, {Country::Azerbaijan, azerbaijaniPeopleNames},
{Country::Ghana, ghanaianPeopleNames},
};

const std::map<Country, std::string> generatedTestName{
Expand Down Expand Up @@ -140,6 +142,7 @@ const std::map<Country, std::string> generatedTestName{
{Country::Bosnia, "shouldGenerateBosnianNames"}, {Country::Lebanon, "shouldGenerateLebaneseName"},
{Country::Syria, "shouldGenerateSyrianName"}, {Country::Malta, "shouldGenerateMalteseName"},
{Country::SouthAfrica, "shouldGenerateSouthAfricanName"}, {Country::Azerbaijan, "shouldGenerateAzerbaijaniName"},
{Country::Ghana, "shouldGenerateGhanaianName"},
};
}

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

#include <string>
#include <vector>

namespace faker
{
const std::vector<std::string> ghanaianMalesFirstNames = {
"Aaron",
"Abeiku",
"Adam",
"Adrian",
"Akwesi",
"Albert",
"Alex",
"Alexander",
"Andrew",
"Anthony",
"Antony",
"Arthur",
"Ben",
"Benjamin",
"Bernard",
"Bless",
"Blessing",
"Bruce",
"Carl",
"Charles",
"Christian",
"Clifford",
"Colins",
"Daniel",
"Danny",
"David",
"Denis",
"Dennis",
"Derrick",
"Dominic",
"Donald",
"Douglas",
"Duncan",
"Edward",
"Ekow",
"Elliot",
"Elliott",
"Eyram",
"Eric",
"Fiifi",
"Francis",
"Frank",
"Frederick",
"George",
"Gerald",
"Gordon",
"Graham",
"Gregory",
"Harry",
"Henry",
"Howard",
"Isaac",
"Akwasi",
"Jack",
"Jacob",
"Jake",
"James",
"Jason",
"Jeffrey",
"Jeremy",
"Joe",
"Joel",
"John",
"Jonathan",
"Joojo",
"Joseph",
"Josh",
"Joshua",
"Josiah",
"Julian",
"Justin",
"Karl",
"Kenneth",
"Kevin",
"Kofi",
"Kojo",
"Kujoe",
"Kwabena",
"Kwadwo",
"Kwaku",
"Kwame",
"Kwamena",
"Kwasi",
"Kweku",
"Kwesi",
"Kyle",
"Lawrence",
"Leslie",
"Louis",
"Luke",
"Malcolm",
"Marcus",
"Mark",
"Martin",
"Mathew",
"Matthew",
"Max",
"Michael",
"Nathan",
"Nicholas",
"Nigel",
"Oliver",
"Patrick",
"Paul",
"Peter",
"Philip",
"Phillip",
"Promise",
"Raymond",
"Richard",
"Robert",
"Roger",
"Ronald",
"Russell",
"Sam",
"Samuel",
"Shaun",
"Simon",
"Stanley",
"Stephen",
"Steven",
"Terence",
"Thomas",
"Timothy",
"Thank God",
"Thy Will Be Done",
"Tom",
"Tony",
"Victor",
"Vincent",
"William",
"Yaw",
};

const std::vector<std::string> ghanaianFemalesFirstNames = {
"Aba",
"Abena",
"Abigail",
"Adwoa",
"Afia",
"Afua",
"Akos",
"Akofa",
"Akorfa",
"Akosua",
"Akua",
"Akumaa",
"Alice",
"Ama",
"Amanda",
"Amber",
"Amelia",
"Angela",
"Ann",
"Annette",
"Awesi",
"Baaba",
"Barbara",
"Beatrice",
"COmfort",
"Caroline",
"Catherine",
"Charlotte",
"Christina",
"Comfort",
"Constance",
"Danielle",
"Deborah",
"Debra",
"Denise",
"Dora",
"Dorcas",
"Dorothy",
"Eliabeth",
"Elizabeth",
"Emily",
"Emma",
"Ernestina",
"Esi",
"Eunice",
"Eyram",
"Felicia",
"Francesca",
"Gemma",
"Georgia",
"Georgina",
"Gifty",
"Grace",
"Hannabel",
"Hannah",
"Harriet",
"Helen",
"Irene",
"Janet",
"Janice",
"Jasmine",
"Jennifer",
"Jessica",
"Jill",
"Joanna",
"Josephine",
"Joyce",
"Judith",
"Julia",
"Juliana",
"Julie",
"Karen",
"Kate",
"Katherine",
"Katy",
"Lawrencia",
"Linda",
"Lisa",
"Lorraine",
"Lucy",
"Lydia",
"Mandy",
"Margaret",
"Maria",
"Marian",
"Marilyn",
"Mary",
"Maureen",
"Mawuena",
"Mawusi",
"Michelle",
"Millicent",
"Nana Ama",
"Naomi",
"Natalie",
"Natasha",
"Nicola",
"Nimakoah",
"Olivia",
"Pamela",
"Patricia",
"Paula",
"Priscilla",
"Rachael",
"Rachel",
"Rebecca",
"Regina",
"Rita",
"Roselyn",
"Rosemary",
"Ruth",
"Salomey",
"Samantha",
"Sandra",
"Sarah",
"Sena",
"Sharon",
"Sheila",
"Shirley",
"Stephanie",
"Susan",
"Sylvia",
"Teresa",
"Tina",
"Tracy",
"Vanessa",
"Veronica",
"Victoria",
"Vida",
"Wendy",
"Yaa",
"Yvonne",
};
}
Loading

0 comments on commit 9a15ac6

Please sign in to comment.