Skip to content

Commit

Permalink
add people names from Azerbaijan
Browse files Browse the repository at this point in the history
  • Loading branch information
joshhn committed Jan 13, 2024
1 parent 037dce8 commit 7e4c22a
Show file tree
Hide file tree
Showing 6 changed files with 182 additions and 4 deletions.
4 changes: 3 additions & 1 deletion include/faker-cxx/types/Country.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ enum class Country
Syria,
Malta,
SouthAfrica,
Azerbaijan,
};

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

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

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 @@ -42,6 +42,7 @@
#include "data/latvia/LatvianPeopleNames.h"
#include "data/lebanon/LebanesePeopleNames.h"
#include "data/lithuania/LithuanianPeopleNames.h"
#include "data/azerbaijan/AzerbaijaniPeopleNames.h"
#include "data/macedonia/MacedonianPeopleNames.h"
#include "data/malta/MaltesePeopleNames.h"
#include "data/mexico/MexicanPeopleNames.h"
Expand Down Expand Up @@ -108,7 +109,7 @@ const std::map<Country, PeopleNames> countryToPeopleNamesMapping{
{Country::Israel, israeliPeopleNames}, {Country::Vietnam, vietnamesePeopleNames},
{Country::Monaco, monacanPeopleNames}, {Country::Lebanon, lebanesePeopleNames},
{Country::Syria, syrianPeopleNames}, {Country::Malta, maltesePeopleNames},
{Country::SouthAfrica, southAfricanPeopleNames},
{Country::SouthAfrica, southAfricanPeopleNames}, {Country::Azerbaijan, azerbaijaniPeopleNames},
};

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 @@ -43,6 +43,7 @@
#include "data/macedonia/MacedonianPeopleNames.h"
#include "data/malta/MaltesePeopleNames.h"
#include "data/mexico/MexicanPeopleNames.h"
#include "data/azerbaijan/AzerbaijaniPeopleNames.h"
#include "data/moldova/MoldovanPeopleNames.h"
#include "data/monaco/MonacanPeopleNames.h"
#include "data/Nationalities.h"
Expand Down Expand Up @@ -106,7 +107,7 @@ const std::map<Country, PeopleNames> countryToPeopleNamesMapping{
{Country::Vietnam, vietnamesePeopleNames}, {Country::Monaco, monacanPeopleNames},
{Country::Bosnia, bosnianPeopleNames}, {Country::Lebanon, lebanesePeopleNames},
{Country::Syria, syrianPeopleNames}, {Country::Malta, maltesePeopleNames},
{Country::SouthAfrica, southAfricanPeopleNames},
{Country::SouthAfrica, southAfricanPeopleNames}, {Country::Azerbaijan, azerbaijaniPeopleNames},
};

const std::map<Country, std::string> generatedTestName{
Expand Down Expand Up @@ -138,7 +139,7 @@ const std::map<Country, std::string> generatedTestName{
{Country::Vietnam, "shouldGenerateVietnameseName"}, {Country::Monaco, "shouldGenerateMonacanName"},
{Country::Bosnia, "shouldGenerateBosnianNames"}, {Country::Lebanon, "shouldGenerateLebaneseName"},
{Country::Syria, "shouldGenerateSyrianName"}, {Country::Malta, "shouldGenerateMalteseName"},
{Country::SouthAfrica, "shouldGenerateSouthAfricanName"},
{Country::SouthAfrica, "shouldGenerateSouthAfricanName"}, {Country::Azerbaijan, "shouldGenerateAzerbaijaniName"},
};
}

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

#include <string>
#include <vector>

namespace faker
{
const std::vector<std::string> azerbaijaniMalesFirstNames = {
"Anar",
"Amid",
"Afəl",
"Abbas",
"Abdulla",
"Adil",
"Akif",
"Aqil",
"Bəhram",
"Nurlan",
"Rafiq",
"Tərlan",
"Zaur",
"Emin",
"Emil",
"Kamran",
"Elnur",
"Natiq",
"Rəşad",
"Rəşid",
"Tahir",
"Əhməd",
"Zahir",
"İlham",
"İlqar",
"Nahid",
"Nihad",
"Faiq",
"İxtiyar",
"Şəhriyar",
"Şaiq",
"Bəxtiyar",
"Bəhruz",
"Tunar",
"Nadir",
};

const std::vector<std::string> azerbaijaniFemalesFirstNames = {
"Anna",
"Adeliya",
"Afaq",
"Afət",
"Afərim",
"Aidə",
"Aygün",
"Aynur",
"Alsu",
"Ayan",
"Aytən",
"Aygül",
"Aydan",
"Aylin",
"Bahar",
"Banu",
"Bəyaz",
"Billurə",
"Cansu",
"Ceyla",
"Damla",
"Dəniz",
"Diana",
"Dilarə",
"Ella",
"Elza",
"Elyanora",
"Ellada",
"Elvira",
"Elnarə",
"Esmira",
"Estella",
"Fatimə",
"Fəxriyyə",
"Fərəh",
"Fərqanə",
"Fidan",
"Firuzə",
"Gövhər",
"Günay",
"Gülay",
"Gülçin",
"Gülər",
"Gülsüm",
"Humay",
"Hüriyə",
"Hülya",
"Jalə",
"Jasmin",
"Kübra",
"Ləman",
"Lamiyə",
"Lalə",
"Liliya",
"Laura",
"Leyla",
"Maya",
"Mehriban",
"Mələk",
"Nuray",
"Nurgün",
"Nərgiz",
"Nigar",
"Ofelya",
"Pəri",
"Röya",
"Səbinə",
"Selcan",
"Tansu",
"Tuba",
"Ülviyyə",
"Ulduz",
"Ülkər",
};
}
33 changes: 33 additions & 0 deletions src/modules/person/data/azerbaijan/AzerbaijaniLastNames.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#pragma once

#include <string>
#include <vector>

namespace faker
{
const std::vector<std::string> azerbaijaniMalesLastNames = {
"Əhmədov",
"Ələkbərov",
"Əliyev",
"Vəliyev",
"Soltanov",
"Quliyev",
"Məmmədov",
"Xəlilov",
"Nəzərov",
"Rəhimov",
};

const std::vector<std::string> azerbaijaniFemalesLastNames = {
"Qasımova",
"Əfəndiyeva",
"Soltanova",
"Abdullayeva",
"Rəşidova",
"Ələkbərova",
"Əliyeva",
"Tahirova",
"Seyidova",
"Vəsiyeva",
};
}
20 changes: 20 additions & 0 deletions src/modules/person/data/azerbaijan/AzerbaijaniPeopleNames.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#pragma once

#include "../NameFormats.h"
#include "../PeopleNames.h"
#include "AzerbaijaniFirstNames.h"
#include "AzerbaijaniLastNames.h"

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

const PeopleNames azerbaijaniPeopleNames{
{azerbaijaniMalesFirstNames, {}, azerbaijaniMalesLastNames, {}, {}},
{azerbaijaniFemalesFirstNames, {}, azerbaijaniFemalesLastNames, {}, {}},
azerbaijaniPersonNameFormats};

}

0 comments on commit 7e4c22a

Please sign in to comment.