Skip to content

Commit

Permalink
Add Albania people names (#326)
Browse files Browse the repository at this point in the history
* Add Albanian males first names

* Add Albanian first and last names

* Add Albania to the "Country" vector

* Add Albania to "CountryToPeopleMapping" map

* Add Albania to PersonTest
  • Loading branch information
MikelKokoshi authored Nov 23, 2023
1 parent 28cd5e9 commit adef940
Show file tree
Hide file tree
Showing 6 changed files with 99 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 @@ -46,6 +46,7 @@ enum class Country
Australia,
Serbia,
Macedonia,
Albania,
Latvia,
Ireland,
Belarus,
Expand All @@ -60,7 +61,7 @@ const std::vector<Country> countries{
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::Mexico, Country::Argentina,
Country::Australia, Country::Serbia, Country::Macedonia, Country::Latvia, Country::Ireland,
Country::Australia, Country::Serbia, Country::Macedonia, Country::Albania, Country::Latvia, Country::Ireland,
Country::Belarus, Country::Estonia,
};

Expand Down Expand Up @@ -105,6 +106,7 @@ inline std::string toString(Country country)
{Country::Australia, "Australia"},
{Country::Serbia, "Serbia"},
{Country::Macedonia, "Macedonia"},
{Country::Albania, "Albania"},
{Country::Latvia, "Latvia"},
{Country::Ireland, "Ireland"},
{Country::Belarus, "Belarus"},
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 @@ -5,6 +5,7 @@
#include <set>

#include "../../common/FormatHelper.h"
#include "data/albania/AlbanianPeopleNames.h"
#include "data/argentina/ArgentinianPeopleNames.h"
#include "data/australia/AustralianPeopleNames.h"
#include "data/austria/AustrianPeopleNames.h"
Expand Down Expand Up @@ -84,6 +85,7 @@ const std::map<Country, PeopleNames> countryToPeopleNamesMapping{
{Country::Serbia, serbianPeopleNames}, {Country::Macedonia, macedonianPeopleNames},
{Country::Latvia, latvianPeopleNames}, {Country::Ireland, irishPeopleNames},
{Country::Belarus, belarusianPeopleNames}, {Country::Estonia, estonianPeopleNames},
{Country::Albania, albanianPeopleNames},
};

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 @@ -5,6 +5,7 @@
#include "gtest/gtest.h"

#include "../../common/StringHelper.h"
#include "data/albania/AlbanianPeopleNames.h"
#include "data/argentina/ArgentinianPeopleNames.h"
#include "data/australia/AustralianPeopleNames.h"
#include "data/austria/AustrianPeopleNames.h"
Expand Down Expand Up @@ -84,6 +85,7 @@ const std::map<Country, PeopleNames> countryToPeopleNamesMapping{
{Country::Serbia, serbianPeopleNames}, {Country::Macedonia, macedonianPeopleNames},
{Country::Latvia, latvianPeopleNames}, {Country::Ireland, irishPeopleNames},
{Country::Belarus, belarusianPeopleNames}, {Country::Estonia, estonianPeopleNames},
{Country::Albania, albanianPeopleNames},
};

const std::map<Country, std::string> generatedTestName{
Expand All @@ -108,6 +110,7 @@ const std::map<Country, std::string> generatedTestName{
{Country::Serbia, "shouldGenerateSerbianName"}, {Country::Macedonia, "shouldGenerateMacedonianName"},
{Country::Latvia, "shouldGenerateLatvianName"}, {Country::Ireland, "shouldGenerateIrishName"},
{Country::Belarus, "shouldGenerateBelarusianName"}, {Country::Estonia, "shouldGenerateEstonianName"},
{Country::Albania, "shouldGenerateAlbanianName"},
};
}

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

#include <string>
#include <vector>

namespace faker
{
const std::vector<std::string> albanianMalesFirstNames = {
"Adriatik", "Afrim", "Agim", "Agron", "Alban", "Altin", "Andi", "Artion",
"Asim", "Arbnor", "Arber", "Ardian", "Ardit", "Armend", "Arlind", "Astrit",
"Avni", "Bamir", "Bardh", "Bardhyl", "Bashkim", "Besart", "Besim", "Besmir",
"Besnik", "Niko", "Bekim", "Betim", "Bledar", "Bledian", "Blendi", "Blerim",
"Bujar", "Bukurosh", "Burim", "Clirim", "Halit", "Hysen", "Ilir", "Ismail",
"Jonuz", "Julian", "Kadri", "Dashamir", "Dardan", "Dash", "Dëfrim", "Dëshir",
"Diell", "Drilon", "Dritan", "Durim", "Endrit", "Endri", "Enkel", "Erin",
"Eris", "Erion", "Erjon", "Ergys", "Erkand", "Ermir", "Elton", "Ervin", "Ermal",
"Erzen", "Fatlum", "Fatos", "Festim", "Fidan", "Fisnik", "Flamur", "FLorent",
"Florenc", "Lorenc", "Lorik", "Mërgim", "Gash", "Gaz", "Gazmend", "Gent",
"Gentian", "Gëzim", "Gramoz", "Gjergj", "Gjergji", "Gjin", "Gjon", "Hekuran",
"Jetmir", "Jon", "Kastriot", "Kristaq", "Klajd", "KLajdi", "Klevis", "Klodian",
"Korab", "Kujtim", "Lavdim", "Ledian", "Lek", "Liridon", "Lirim", "Lisian",
"Luan", "Lul", "Lulëzim", "Marash", "Medon", "Mentor", "Migjen", "Mirlind",
"Mikel", "Ndriçim", "Nart", "Oltian", "Oltion", "Orges", "Orgest", "Pandi",
"Qemal", "Pajtim", "Pëllumb", "Përparim", "Pirro", "Petrit", "Redon", "Rexhep",
"Serxhio", "Rinor", "Saimir", "Samir", "Skënder", "Shqiprim", "Sokol", "Spartak",
"Shkëlqim", "Shkëmb", "Shkumbin", "Shpend", "Shkumbin", "Taulant", "Tomor", "Trim",
"Urim", "Valdet", "Valmir", "Vedat", "Xhevdet", "Xhevahir", "Zef", "Vath", "Vidan",
"Vullnet", "Ylber", "Zamir"
};


const std::vector<std::string> albanianFemalesFirstNames = {
"Adelina", "Aferdita", "Agnesa", "Albana", "Aldona", "Aleksandra", "Alketa",
"Alma", "Altina", "Amanda", "Anastasia", "Anda", "Andela", "Ardiana", "Ardita",
"Arlinda", "Arta", "Artemisa", "Artiola", "Arxhela", "Asja", "Astritana",
"Aulona", "Aurela", "Aurora", "Balina", "Besa", "Besiana", "Besjana", "Blenda",
"Blerina", "Bora", "Bukurije", "Dafina", "Dajana", "Dalina", "Dardana", "Davina",
"Dea", "Dhurata", "Diana", "Diona", "Dita", "Dorentina", "Drita", "Duljeta",
"Edlira", "Ela", "Elda", "Elena", "Elira", "Elona", "Elsa", "Elvana", "Elvira",
"Ema", "Embla", "Eneida", "Era", "Erëblina", "Erilda", "Eriona", "Erjona", "Ersa",
"Esmeralda", "Estela", "Eva", "Evelina", "Flaka", "Fjolla", "Florina", "Frida",
"Gentiana", "Gresa", "Hana", "Ilda", "Ira", "Irena", "Jeta", "Joana", "Jonida",
"Klea", "Klina", "Krenare", "Kriselda", "Larisa", "Laura", "Lavdi", "Lea", "Ledia",
"Lena", "Leonora", "Lila", "Linda", "Liridona", "Lirona", "Lisjana", "Liza", "Lorenta",
"Luljeta", "Majlinda", "Manjola", "Margarita", "Mariola", "Merita", "Migena", "Mimoza",
"Miranda", "Monika", "Nada", "Naima", "Nertila", "Njomza", "Oltita", "Olsa", "Oltita",
"Oriana", "Rina", "Rita", "Romina", "Rovena", "Sara", "Shpresa", "Sidita",
"Silva", "Simona", "Sonila", "Tea", "Teuta", "Valbona", "Valentina", "Vanessa", "Vera",
"Verona", "Vesa", "Veselina", "Viona", "Vjollca", "Xhensila", "Zamira", "Zana",
};

}
24 changes: 24 additions & 0 deletions src/modules/person/data/albania/AlbanianLastNames.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#pragma once

#include <string>
#include <vector>

namespace faker
{
const std::vector<std::string> albanianLastNames = {
"Agolli", "Ahmeti", "Aliaj", "Aliu", "Arifi", "Avdullahu", "Bajrami", "Balaj", "Basha", "Begolli",
"Berisha", "Bilalli", "Brahimi", "Bytyqi", "Cakuli", "Cela", "Cenaj", "Dedvukaj", "Dervishi", "Domgjonaj",
"Dreshaj", "Driza", "Duka", "Duraku", "Dushku", "Elezi", "Fazliu", "Ferizi", "Gashi", "Gega",
"Gjinaj", "Gjokaj", "Gjoka", "Gjonaj", "Gjoni", "Gjuraj", "Gruda", "Hadergjonaj", "Hajdari", "Hajzeri",
"Haliti", "Hamiti", "Hasani", "Hyseni", "Ibrahimi", "Ismaili", "Jashari", "Jusufi", "Kadriu", "Kajtazi",
"Kapllani", "Karaj", "Kastrati", "Kavaja", "Kazazi", "Kelmendi", "Kicaj", "Kola", "Krasniqi", "Kukaj",
"Kulla", "Kurti", "Kusari", "Leka", "Leka", "Lushi", "Majko", "Marku", "Maxhuni", "Mazreku",
"Meta", "Miftari", "Muharremi", "Murati", "Murtishi", "Mustafa", "Ndoj", "Nimani", "Nikçi", "Nuhiu",
"Osmani", "Pacuku", "Pajaziti", "Paloka", "Peci", "Përmeti", "Prenkaj", "Qerimi", "Rama", "Rrahmani",
"Rrudhani", "Rugova", "Rustemi", "Sahiti", "Salihu", "Shala", "Shala", "Shkreli", "Shoshi", "Shuaipi",
"Sopi", "Spahiu", "Statovci", "Sula", "Sylaj", "Thaçi", "Thaqi", "Topalli", "Topi", "Tushi",
"Ujkani", "Ulqini", "Useni", "Vehapi", "Vejseli", "Veliaj", "Vocaj", "Vokshi", "Vula", "Vukaj",
"Xhaferi", "Xhemajli", "Xhemalaj", "Xhemshiti", "Xhokli", "Xhufi", "Ylli", "Zeka", "Zeqiri", "Zhubi",
"Zogaj", "Zogu", "Zeka", "Zefi", "Zeka", "Zekaj", "Zhubi", "Zhuta", "Ziu", "Zogiani"
};
}
15 changes: 15 additions & 0 deletions src/modules/person/data/albania/AlbanianPeopleNames.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#pragma once

#include "../NameFormats.h"
#include "../PeopleNames.h"
#include "AlbanianFirstNames.h"
#include "AlbanianLastNames.h"

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

const PeopleNames albanianPeopleNames{{albanianMalesFirstNames, {}, albanianLastNames, {}, {}},
{albanianFemalesFirstNames, {}, albanianLastNames, {}, {}},
albanianPersonNameFormats};
}

0 comments on commit adef940

Please sign in to comment.