Skip to content

Commit

Permalink
Fix nonsensical name prefixes and suffixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
peterwald committed Dec 2, 2015
1 parent f481f84 commit 89d2a8f
Show file tree
Hide file tree
Showing 7 changed files with 893 additions and 213 deletions.
1,069 changes: 864 additions & 205 deletions data.go

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion data/en/female_name_prefixes
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
Mrs. Ms. Miss
Mrs.
Ms.
Miss
10 changes: 9 additions & 1 deletion data/en/female_name_suffixes
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
I II III IV V MD DDS PhD DVM
I
II
III
IV
V
MD
DDS
PhD
DVM
3 changes: 2 additions & 1 deletion data/en/male_name_prefixes
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
Mr. Dr.
Mr.
Dr.
12 changes: 11 additions & 1 deletion data/en/male_name_suffixes
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
Jr. Sr. I II III IV V MD DDS PhD DVM
Jr.
Sr.
I
II
III
IV
V
MD
DDS
PhD
DVM
2 changes: 1 addition & 1 deletion fake.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func Seed(seed int64) {
// GetLangs returns a slice of available languages
func GetLangs() []string {
var langs []string
for k, v := range data {
for k, v := range _escData {
if v.isDir && k != "/" && k != "/data" {
langs = append(langs, strings.Replace(k, "/data/", "", 1))
}
Expand Down
6 changes: 3 additions & 3 deletions names.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,19 +102,19 @@ func fullNameWithSuffix(gender string) string {
// MaleFullNameWithSuffix generates suffixed male full name
// if suffixes for the given language are available
func MaleFullNameWithSuffix() string {
return fullNameWithPrefix("male")
return fullNameWithSuffix("male")
}

// FemaleFullNameWithSuffix generates suffixed female full name
// if suffixes for the given language are available
func FemaleFullNameWithSuffix() string {
return fullNameWithPrefix("female")
return fullNameWithSuffix("female")
}

// FullNameWithSuffix generates suffixed full name
// if suffixes for the given language are available
func FullNameWithSuffix() string {
return fullNameWithPrefix(randGender())
return fullNameWithSuffix(randGender())
}

func fullName(gender string) string {
Expand Down

0 comments on commit 89d2a8f

Please sign in to comment.