Fixed gentranslation to deal with empty strings.