Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Vietnamese people names 🇻🇳 #418

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion include/faker-cxx/types/Country.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ enum class Country
Iceland,
Palestine,
Israel,
Vietnam,
Monaco,
};

Expand All @@ -72,7 +73,7 @@ const std::vector<Country> countries{
Country::Australia, Country::Serbia, Country::Macedonia, Country::Albania, Country::Latvia,
Country::Ireland, Country::Belarus, Country::Estonia, Country::Iran, Country::Bulgaria,
Country::Moldova, Country::Lithuania, Country::Iceland, Country::Palestine, Country::Israel,
Country::Monaco,
Country::Vietnam, Country::Monaco,
};

inline std::string toString(Country country)
Expand Down Expand Up @@ -128,6 +129,7 @@ inline std::string toString(Country country)
{Country::Iceland, "Iceland"},
{Country::Palestine, "Palestine"},
{Country::Israel, "Israel"},
{Country::Vietnam, "Vietnam"},
{Country::Monaco, "Monaco"},
};

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 @@ -51,6 +51,7 @@
#include "data/poland/PolishPeopleNames.h"
#include "data/palestine/PalestinianPeopleNames.h"
#include "data/portugal/PortuguesePeopleNames.h"
#include "data/vietnam/VietnamesePeopleNames.h"
#include "data/romania/RomanianPeopleNames.h"
#include "data/russia/RussianPeopleNames.h"
#include "data/serbia/SerbianPeopleNames.h"
Expand Down Expand Up @@ -99,7 +100,7 @@ const std::map<Country, PeopleNames> countryToPeopleNamesMapping{
{Country::Bulgaria, bulgarianPeopleNames}, {Country::Moldova, moldovanPeopleNames},
{Country::Lithuania, lithuanianPeopleNames}, {Country::Iceland, icelandicPeopleNames},
{Country::Palestine, palestinianPeopleNames}, {Country::Israel, israeliPeopleNames},
{Country::Monaco, monacanPeopleNames},
{Country::Vietnam, vietnamesePeopleNames}, {Country::Monaco, monacanPeopleNames},
};

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 @@ -57,6 +57,7 @@
#include "data/spain/SpanishPeopleNames.h"
#include "data/sweden/SwedishPeopleNames.h"
#include "data/switzerland/SwissPeopleNames.h"
#include "data/vietnam/VietnamesePeopleNames.h"
#include "data/turkey/TurkishPeopleNames.h"
#include "data/ukraine/UkrainianPeopleNames.h"
#include "data/ZodiacSigns.h"
Expand Down Expand Up @@ -97,7 +98,7 @@ const std::map<Country, PeopleNames> countryToPeopleNamesMapping{
{Country::Bulgaria, bulgarianPeopleNames}, {Country::Moldova, moldovanPeopleNames},
{Country::Lithuania, lithuanianPeopleNames}, {Country::Iceland, icelandicPeopleNames},
{Country::Palestine, palestinianPeopleNames}, {Country::Israel, israeliPeopleNames},
{Country::Monaco, monacanPeopleNames},
{Country::Vietnam, vietnamesePeopleNames}, {Country::Monaco, monacanPeopleNames},
};

const std::map<Country, std::string> generatedTestName{
Expand Down Expand Up @@ -126,7 +127,7 @@ const std::map<Country, std::string> generatedTestName{
{Country::Bulgaria, "shouldGenerateBulgarianName"}, {Country::Moldova, "shouldGenerateMoldovanName"},
{Country::Lithuania, "shouldGenerateLithuanianName"}, {Country::Iceland, "shouldGenerateIcelandicName"},
{Country::Palestine, "shouldGeneratePalestinianName"}, {Country::Israel, "shouldGenerateIsraeliName"},
{Country::Monaco, "shouldGenerateMonacanName"},
{Country::Vietnam, "shouldGenerateVietnameseName"}, {Country::Monaco, "shouldGenerateMonacanName"},
};
}

Expand Down
Loading