thm / uinames

A simple tool to generate names for use in designs and mockups.
https://uinames.com
Other
754 stars 206 forks source link

Incorrectly assumed that a second name is gender-agnostic #64

Closed adam-lynch closed 9 years ago

adam-lynch commented 9 years ago

In Gaeilge (Irish), my name is Adam Ó Loingsigh whereas as my sister's is Siobhán Loingsigh.

thm commented 9 years ago

You can add exceptions in JSON with basic regex. For example, to swap the first and last name (which currently happens for Vietnamese) you would do:

    "surnames": [],
    "exceptions": [["/^(.*) (.*)$/", "$2 $1"]]
}

I don't know all the exceptions that occur in the Irish language, but for your example you would have to catch and replace "Ó" with "Ní" for female names using "female_exceptions": [["/catch/","replacement"]]

adam-lynch commented 9 years ago

Ah ok you thought of it :wink:.

That would cover it, it's just a little bit painful because the beginning of the second word in the last name might have to change too (depending on what it starts with); so I'd have to create qutie a few exceptions.

But, it's covered :+1:.