That's hilarious! As someone who can understand Galician quite well (I speak both Spanish and Portuguese fluently and Galician is mostly transparent when you know those two) I can't fathom how Google Translate came up with that.
This is probably not going to please you but I've seen worse than this. In production, at companies with big names. Programmers in isolation (no oversight or capable peers) will do the most terrible things.
And on a more positive note: he did write that code, is looking for help from people more capable and eventually will likely figure it out. Check back in a decade or so how he's doing, likely you'll be surprised. Writing terrible code and learning from it is a lot better than not writing code at all.
It's easy enough to forget that at some point in time we were all clueless newbies.