This is something I run into often, and it really is a way to ruin reading. It's jarring.
Basically: no book in english ever gets quotes in spanish right.
For example, I was reading The Eldorado Network
which is a silly but amusing spy-thriller book with subpar pseudo-Heinlein dialog, when out of the blue, I read this: "viva el muerte".
The book's first half is set on civil war Spain, and "viva el muerte" is said to be the motto of a company of moorish riflemen or whatever.
Obviously:
Noone who speaks spanish has ever proofread this book
That is not anyone's motto
It took me 5 minutes to stop feeling annoyed at the carelessness of the publishers and the writer.
You see, in spanish, almost every word has a gender, and you have to keep what's called "concordancia de género", let's call it gender agreement.
What does it mean? That when you use a word of feminie gender, you use feminine pronouns, articles, adjectives, etc.
So, well, muerte is feminine, and el is masculine. So, it disagrees, and it's a mistake no spanish-speaker could ever made, not once, not drunk, not drugged, not asleep.
Sure, there are exceptions, buth to avoid unpleasant sounds.
For example, agua (water) is f., so it would have to be "la agua" but that sounds ugly, so it's "el agua", just like in english you use "an" sometimes instead of "a".
So, it would have to be "viva la muerte".
There is a weird corner case in which "viva el muerte" would be correct, if there was a guy whose nickname was "muerte", since he's a dude, if you cheered for him you would say "viva el muerte", but that's unlikely.
And this happens in every damn book that has quotes from allegedly spanish-speaking characters, and 9 out of every 10 times, it's the same mistake, because english lacks the concept.
Annoying as all hell.