Skip to content

Commit

Permalink
add mexican people names (#291)
Browse files Browse the repository at this point in the history
  • Loading branch information
cieslarmichal authored Nov 20, 2023
1 parent f92f876 commit 908a1db
Show file tree
Hide file tree
Showing 8 changed files with 991 additions and 5 deletions.
5 changes: 3 additions & 2 deletions include/faker-cxx/types/Country.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ enum class Country
China,
Korea,
Canada,
Mexico,
};

const std::vector<Country> countries{
Expand All @@ -49,7 +50,7 @@ const std::vector<Country> countries{
Country::Turkey, Country::Czech, Country::Slovakia, Country::Ukraine, Country::Denmark, Country::Sweden,
Country::Brazil, Country::Norway, Country::Japan, Country::Portugal, Country::Hungary, Country::Croatia,
Country::Greece, Country::Slovenia, Country::Austria, Country::Switzerland, Country::Belgium, Country::Nederlands,
Country::China, Country::Korea, Country::Canada,
Country::China, Country::Korea, Country::Canada, Country::Mexico,
};

inline std::string toString(Country country)
Expand All @@ -71,7 +72,7 @@ inline std::string toString(Country country)
{Country::Austria, "Austria"}, {Country::Switzerland, "Switzerland"},
{Country::Belgium, "Belgium"}, {Country::Nederlands, "Nederlands"},
{Country::China, "China"}, {Country::Korea, "Korea"},
{Country::Canada, "Canada"},
{Country::Canada, "Canada"}, {Country::Mexico, "Mexico"},
};

return countryToStringMapping.at(country);
Expand Down
3 changes: 2 additions & 1 deletion src/modules/person/Person.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include "data/JobTitles.h"
#include "data/korea/KoreanPeopleNames.h"
#include "data/Languages.h"
#include "data/mexico/MexicanPeopleNames.h"
#include "data/Nationalities.h"
#include "data/nederlands/DutchPeopleNames.h"
#include "data/nepal/NepalesePeopleNames.h"
Expand Down Expand Up @@ -70,7 +71,7 @@ const std::map<Country, PeopleNames> countryToPeopleNamesMapping{
{Country::Austria, austrianPeopleNames}, {Country::Switzerland, swissPeopleNames},
{Country::Belgium, belgianPeopleNames}, {Country::Nederlands, dutchPeopleNames},
{Country::China, chinesePeopleNames}, {Country::Korea, koreanPeopleNames},
{Country::Canada, canadianPeopleNames},
{Country::Canada, canadianPeopleNames}, {Country::Mexico, mexicanPeopleNames},
};

std::string middleNameForCountry(Country country, std::optional<Sex> sex);
Expand Down
5 changes: 3 additions & 2 deletions src/modules/person/PersonTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include "data/JobTitles.h"
#include "data/korea/KoreanPeopleNames.h"
#include "data/Languages.h"
#include "data/mexico/MexicanPeopleNames.h"
#include "data/Nationalities.h"
#include "data/nederlands/DutchPeopleNames.h"
#include "data/nepal/NepalesePeopleNames.h"
Expand Down Expand Up @@ -70,7 +71,7 @@ const std::map<Country, PeopleNames> countryToPeopleNamesMapping{
{Country::Austria, austrianPeopleNames}, {Country::Switzerland, swissPeopleNames},
{Country::Belgium, belgianPeopleNames}, {Country::Nederlands, dutchPeopleNames},
{Country::China, chinesePeopleNames}, {Country::Korea, koreanPeopleNames},
{Country::Canada, canadianPeopleNames},
{Country::Canada, canadianPeopleNames}, {Country::Mexico, mexicanPeopleNames},
};

const std::map<Country, std::string> generatedTestName{
Expand All @@ -90,7 +91,7 @@ const std::map<Country, std::string> generatedTestName{
{Country::Austria, "shouldGenerateAustrianName"}, {Country::Switzerland, "shouldGenerateSwissName"},
{Country::Belgium, "shouldGenerateBelgianName"}, {Country::Nederlands, "shouldGenerateDutchName"},
{Country::China, "shouldGenerateChineseName"}, {Country::Korea, "shouldGenerateKoreanName"},
{Country::Canada, "shouldGenerateCanadianName"},
{Country::Canada, "shouldGenerateCanadianName"}, {Country::Mexico, "shouldGenerateMexicanName"},
};
}

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

#include <string>
#include <vector>

namespace faker
{
const std::vector<std::string> mexicanMalesFirstNames = {
"Aarón", "Abraham",
"Adán", "Agustín",
"Alan", "Alberto",
"Alejandro", "Alexander",
"Alexis", "Alfonso",
"Alfredo", "Andrés",
"Ángel Daniel", "Ángel Gabriel",
"Antonio", "Armando",
"Arturo", "Axel",
"Benito", "Benjamín",
"Bernardo", "Brandon",
"Brayan", "Carlos",
"César", "Claudio",
"Clemente", "Cristian",
"Cristobal", "Damián",
"Daniel", "David",
"Diego", "Eduardo",
"Elías", "Emiliano",
"Emilio", "Emmanuel",
"Enrique", "Erick",
"Ernesto", "Esteban",
"Federico", "Felipe",
"Fernando", "Fernando Javier",
"Francisco", "Francisco Javier",
"Gabriel", "Gael",
"Gerardo", "Germán",
"Gilberto", "Gonzalo",
"Gregorio", "Guillermo",
"Gustavo", "Hernán",
"Homero", "Horacio",
"Hugo", "Ignacio",
"Iker", "Isaac",
"Isaias", "Israel",
"Ivan", "Jacobo",
"Jaime", "Javier",
"Jerónimo", "Jesús",
"Joaquín", "Jorge",
"Jorge Luis", "José",
"José Antonio", "Jose Daniel",
"José Eduardo", "José Emilio",
"José Luis", "José María",
"José Miguel", "Juan",
"Juan Carlos", "Juan Manuel",
"Juan Pablo", "Julio",
"Julio César", "Kevin",
"Leonardo", "Lorenzo",
"Lucas", "Luis",
"Luis Ángel", "Luis Fernando",
"Luis Gabino", "Luis Miguel",
"Manuel", "Marco Antonio",
"Marcos", "Mariano",
"Mario", "Martín",
"Mateo", "Matías",
"Mauricio", "Maximiliano",
"Miguel", "Miguel Ángel",
"Nicolás", "Octavio",
"Óscar", "Pablo",
"Patricio", "Pedro",
"Rafael", "Ramiro",
"Ramón", "Raúl",
"Ricardo", "Roberto",
"Rodrigo", "Rubén",
"Salvador", "Samuel",
"Sancho", "Santiago",
"Saúl", "Sebastian",
"Sergio", "Tadeo",
"Teodoro", "Timoteo",
"Tomás", "Uriel",
"Vicente", "Víctor",
"Victor Manuel",
};

const std::vector<std::string> mexicanFemalesFirstNames = {
"Abigail",
"Abril",
"Adela",
"Adriana",
"Alejandra",
"Alexa",
"Alicia",
"Alondra Romina",
"Amalia",
"Ana Luisa",
"Ana María",
"Ana Sofía",
"Ana Victoria",
"Ana",
"Andrea",
"Ángela",
"Anita",
"Antonia",
"Araceli",
"Ariadna",
"Barbara",
"Beatriz",
"Berta",
"Blanca",
"Camila",
"Caridad",
"Carla",
"Carlota",
"Carmen",
"Carolina",
"Catalina",
"Cecilia",
"Clara",
"Claudia",
"Concepción",
"Conchita",
"Cristina",
"Daniela",
"Débora",
"Diana",
"Dolores",
"Dorotea",
"Dulce María",
"Elena",
"Elisa",
"Elizabeth",
"Eloisa",
"Elsa",
"Elvira",
"Emilia",
"Emily",
"Esmeralda",
"Esperanza",
"Estefanía",
"Estela",
"Ester",
"Eva",
"Evelyn",
"Fatima",
"Florencia",
"Francisca",
"Gabriela",
"Gloria",
"Graciela",
"Guadalupe",
"Guillermina",
"Inés",
"Irene",
"Isabel",
"Isabela",
"Ivanna",
"Jazmin",
"Jennifer",
"Jimena",
"Josefina",
"Juana",
"Julia",
"Julieta",
"Kimberly",
"Laura",
"Leonor",
"Leticia",
"Lilia",
"Liliana",
"Lizbeth",
"Lola",
"Lorena",
"Lourdes",
"Lucia",
"Luisa",
"Luz",
"Magdalena",
"Manuela",
"Marcela",
"Margarita",
"María Cristina",
"María de Jesús",
"María de los Ángeles",
"María del Carmen",
"María Elena",
"María Eugenia",
"María Fernanda",
"María Guadalupe",
"María José",
"María Luisa",
"María Soledad",
"María Teresa",
"María",
"Mariana",
"Maricarmen",
"Marilu",
"Marisol",
"Marta",
"Mayte",
"Melany",
"Melissa",
"Mercedes",
"Micaela",
"Miranda",
"Mónica",
"Monserrat",
"Naomi",
"Natalia",
"Nicole",
"Norma",
"Olivia",
"Paola",
"Patricia",
"Paulina",
"Pilar",
"Ramona",
"Raquel",
"Rebeca",
"Regina",
"Reina",
"Renata",
"Rocio",
"Rosa María",
"Rosa",
"Rosalia",
"Rosario",
"Sara",
"Silvia",
"Sofia",
"Soledad",
"Sonia",
"Susana",
"Teresa",
"Valentina",
"Valeria",
"Vanessa",
"Verónica",
"Victoria",
"Virginia",
"Ximena Guadalupe",
"Ximena",
"Xochitl",
"Yamileth",
"Yaretzi",
"Yolanda",
"Zoe",
};
}
Loading

0 comments on commit 908a1db

Please sign in to comment.