Skip to content

Commit

Permalink
Turkish Names & Last Names Added (#238)
Browse files Browse the repository at this point in the history
* Food module is added.

* Food module changes.

* Turkish personal informations added.
  • Loading branch information
yakupcemilk authored Nov 12, 2023
1 parent 1fb5803 commit b3f167b
Show file tree
Hide file tree
Showing 6 changed files with 180 additions and 3 deletions.
5 changes: 3 additions & 2 deletions include/faker-cxx/types/Language.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ enum class Language
Finnish,
Nepali,
Spanish,
Turkish,
};

const std::vector<Language> languages{
Language::English, Language::Polish, Language::Italian, Language::French, Language::German, Language::Russian,
Language::Romanian, Language::Hindi, Language::Finnish, Language::Nepali, Language::Spanish,
Language::Romanian, Language::Hindi, Language::Finnish, Language::Nepali, Language::Spanish, Language::Turkish
};

inline std::string toString(Language language)
Expand All @@ -31,7 +32,7 @@ inline std::string toString(Language language)
{Language::English, "English"}, {Language::Polish, "Polish"}, {Language::Italian, "Italian"},
{Language::French, "French"}, {Language::German, "German"}, {Language::Russian, "Russian"},
{Language::Romanian, "Romanian"}, {Language::Hindi, "Hindi"}, {Language::Finnish, "Finnish"},
{Language::Nepali, "Nepali"}, {Language::Spanish, "Spanish"},
{Language::Nepali, "Nepali"}, {Language::Spanish, "Spanish"}, {Language::Turkish, "Turkish"},
};

return languageToStringMapping.at(language);
Expand Down
5 changes: 5 additions & 0 deletions src/modules/person/Person.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@
#include "data/spanish/SpanishFirstNamesMales.h"
#include "data/spanish/SpanishLastNames.h"
#include "faker-cxx/Helper.h"
#include "data/turkish/TurkishFirstNamesFemales.h"
#include "data/turkish/TurkishFirstNamesMales.h"
#include "data/turkish/TurkishLastNames.h"
#include "fmt/format.h"

namespace faker
Expand All @@ -63,6 +66,7 @@ const std::map<Language, std::map<Sex, std::vector<std::string>>> languageToFirs
{Language::Finnish, {{Sex::Male, finnishFirstNamesMales}, {Sex::Female, finnishFirstNamesFemales}}},
{Language::Nepali, {{Sex::Male, nepaleseFirstNamesMales}, {Sex::Female, nepaleseFirstNamesFemales}}},
{Language::Spanish, {{Sex::Male, spanishFirstNamesMales}, {Sex::Female, spanishFirstNamesFemales}}},
{Language::Turkish, {{Sex::Male, turkishFirstNamesMales}, {Sex::Female, turkishFirstNamesFemales}}},
};

const std::map<Language, std::map<Sex, std::vector<std::string>>> languageToLastNamesMapping{
Expand All @@ -77,6 +81,7 @@ const std::map<Language, std::map<Sex, std::vector<std::string>>> languageToLast
{Language::Finnish, {{Sex::Male, finnishLastNames}, {Sex::Female, finnishLastNames}}},
{Language::Nepali, {{Sex::Male, nepaleseLastNames}, {Sex::Female, nepaleseLastNames}}},
{Language::Spanish, {{Sex::Male, spanishLastNames}, {Sex::Female, spanishLastNames}}},
{Language::Turkish, {{Sex::Male, turkishLastNames}, {Sex::Female, turkishLastNames}}},
};
}

Expand Down
7 changes: 6 additions & 1 deletion src/modules/person/PersonTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@
#include "src/modules/person/data/nepalese/NepaleseFirstNamesFemales.h"
#include "src/modules/person/data/nepalese/NepaleseFirstNamesMales.h"
#include "src/modules/person/data/nepalese/NepaleseLastNames.h"
#include "data/turkish/TurkishFirstNamesFemales.h"
#include "data/turkish/TurkishFirstNamesMales.h"
#include "data/turkish/TurkishLastNames.h"

using namespace ::testing;
using namespace faker;
Expand All @@ -64,6 +67,7 @@ const std::map<Language, std::map<Sex, std::vector<std::string>>> languageToFirs
{Language::Finnish, {{Sex::Male, finnishFirstNamesMales}, {Sex::Female, finnishFirstNamesFemales}}},
{Language::Nepali, {{Sex::Male, nepaleseFirstNamesMales}, {Sex::Female, nepaleseFirstNamesFemales}}},
{Language::Spanish, {{Sex::Male, spanishFirstNamesMales}, {Sex::Female, spanishFirstNamesFemales}}},
{Language::Turkish, {{Sex::Male, turkishFirstNamesMales}, {Sex::Female, turkishFirstNamesFemales}}},
};

const std::map<Language, std::map<Sex, std::vector<std::string>>> languageToLastNamesMapping{
Expand All @@ -78,6 +82,7 @@ const std::map<Language, std::map<Sex, std::vector<std::string>>> languageToLast
{Language::Finnish, {{Sex::Male, finnishLastNames}, {Sex::Female, finnishLastNames}}},
{Language::Nepali, {{Sex::Male, nepaleseLastNames}, {Sex::Female, nepaleseLastNames}}},
{Language::Spanish, {{Sex::Male, spanishLastNames}, {Sex::Female, spanishLastNames}}},
{Language::Turkish, {{Sex::Male, turkishLastNames}, {Sex::Female, turkishLastNames}}},
};

const std::map<Language, std::string> generatedTestName{
Expand All @@ -86,7 +91,7 @@ const std::map<Language, std::string> generatedTestName{
{Language::Polish, "shouldGeneratePolishName"}, {Language::Russian, "shouldGenerateRussianName"},
{Language::Romanian, "shouldGenerateRomanianName"}, {Language::Hindi, "shouldGenerateIndianName"},
{Language::Finnish, "shouldGenerateFinnishName"}, {Language::Nepali, "shouldGenerateNepaleseName"},
{Language::Spanish, "shouldGenerateSpanishName"},
{Language::Spanish, "shouldGenerateSpanishName"}, {Language::Turkish, "shouldGenerateTurkishName"},
};
}

Expand Down
52 changes: 52 additions & 0 deletions src/modules/person/data/turkish/TurkishFirstNamesFemales.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> turkishFirstNamesFemales = {
"Ayşe",
"Fatma",
"Zeynep",
"Emine",
"Merve",
"Elif",
"Melis",
"Esra",
"İrem",
"Ebru",
"Selma",
"Leyla",
"Selin",
"Gamze",
"Gizem",
"Ceren",
"Deniz",
"Aslı",
"Nazlı",
"Pınar",
"İlayda",
"Dilara",
"Büşra",
"Rabia",
"Yasemin",
"Gül",
"Nur",
"Melek",
"Sude",
"Şeyma",
"Beren",
"Eylül",
"İpek",
"Hande",
"Cansu",
"Özge",
"Hilal",
"Bilge",
"Serra",
"İlknur",
"Cemre",
"Tuğba",
"Yelda",
};
}
53 changes: 53 additions & 0 deletions src/modules/person/data/turkish/TurkishFirstNamesMales.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#pragma once

#include <string>
#include <vector>

namespace faker {
const std::vector<std::string> turkishFirstNamesMales = {
"Ahmet",
"Mehmet",
"Mustafa",
"Ali",
"Emre",
"Burak",
"Can",
"Cem",
"Eren",
"Onur",
"Kaan",
"Serkan",
"Hakan",
"Yusuf",
"Okan",
"Barış",
"Tolga",
"Kerem",
"Deniz",
"Oğuz",
"Umut",
"Gökhan",
"İsmail",
"Metin",
"Orhan",
"İlker",
"Levent",
"Selim",
"Berk",
"Uğur",
"Murat",
"Tarık",
"Cihan",
"Fatih",
"Furkan",
"Yiğit",
"Tarkan",
"Volkan",
"Mert",
"Alp",
"Taylan",
"Burhan",
"Ege",
"Koray",
};
}
61 changes: 61 additions & 0 deletions src/modules/person/data/turkish/TurkishLastNames.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#pragma once

#include <string>
#include <vector>

namespace faker {
const std::vector<std::string> turkishLastNames = {
"Yılmaz",
"Demir",
"Kaya",
"Çelik",
"Yıldız",
"Türk",
"Güneş",
"Ergin",
"Arslan",
"Doğan",
"Kurt",
"Şahin",
"Güler",
"Çetin",
"Aydın",
"Yalçın",
"Kaplan",
"Aksoy",
"Taş",
"Koç",
"Erdoğan",
"Yılmazer",
"Bulut",
"Acar",
"Uçar",
"Kılıç",
"Karahan",
"Tekin",
"Soydan",
"Çalışkan",
"Öztürk",
"Yalın",
"Kara",
"Özkan",
"Akın",
"Aktaş",
"Büyükcengiz",
"Okan",
"Şimşek",
"Keskin",
"Kayabaş",
"Kayabaşı",
"Atalay",
"Ünal",
"Demirci",
"Yaman",
"Gündoğdu",
"Çevik",
"Durmaz",
"Aslan",
"Güzel",
"Kahraman",
};
}

0 comments on commit b3f167b

Please sign in to comment.