Call gettext() on insults when displayed, not when declared.

This commit is contained in:
Todd C. Miller
2024-04-22 08:15:39 -06:00
parent 8666c66ff1
commit 78699a8f7a
6 changed files with 61 additions and 61 deletions

View File

@@ -231,7 +231,7 @@ pass_warn(void)
#ifdef INSULT #ifdef INSULT
if (def_insults) if (def_insults)
warning = INSULT; warning = _(INSULT);
#endif #endif
sudo_printf(SUDO_CONV_ERROR_MSG|SUDO_CONV_PREFER_TTY, "%s\n", warning); sudo_printf(SUDO_CONV_ERROR_MSG|SUDO_CONV_PREFER_TTY, "%s\n", warning);

View File

@@ -23,13 +23,13 @@
* HAL insults (paraphrased) from 2001. * HAL insults (paraphrased) from 2001.
*/ */
_("Just what do you think you're doing Dave?"), N_("Just what do you think you're doing Dave?"),
_("It can only be attributed to human error."), N_("It can only be attributed to human error."),
_("That's something I cannot allow to happen."), N_("That's something I cannot allow to happen."),
_("My mind is going. I can feel it."), N_("My mind is going. I can feel it."),
_("Sorry about this, I know it's a bit silly."), N_("Sorry about this, I know it's a bit silly."),
_("Take a stress pill and think things over."), N_("Take a stress pill and think things over."),
_("This mission is too important for me to allow you to jeopardize it."), N_("This mission is too important for me to allow you to jeopardize it."),
_("I feel much better now."), N_("I feel much better now."),
#endif /* SUDOERS_INS_2001_H */ #endif /* SUDOERS_INS_2001_H */

View File

@@ -23,13 +23,13 @@
* Insults from the original sudo(8). * Insults from the original sudo(8).
*/ */
_("Wrong! You cheating scum!"), N_("Wrong! You cheating scum!"),
_("And you call yourself a Rocket Scientist!"), N_("And you call yourself a Rocket Scientist!"),
_("Where did you learn to type?"), N_("Where did you learn to type?"),
_("Are you on drugs?"), N_("Are you on drugs?"),
_("My pet ferret can type better than you!"), N_("My pet ferret can type better than you!"),
_("You type like i drive."), N_("You type like i drive."),
_("Do you think like you type?"), N_("Do you think like you type?"),
_("Your mind just hasn't been the same since the electro-shock, has it?"), N_("Your mind just hasn't been the same since the electro-shock, has it?"),
#endif /* SUDOERS_INS_CLASSIC_H */ #endif /* SUDOERS_INS_CLASSIC_H */

View File

@@ -24,14 +24,14 @@
* CSOps insults (may be site dependent). * CSOps insults (may be site dependent).
*/ */
_("Maybe if you used more than just two fingers..."), N_("Maybe if you used more than just two fingers..."),
_("BOB says: You seem to have forgotten your passwd, enter another!"), N_("BOB says: You seem to have forgotten your passwd, enter another!"),
_("stty: unknown mode: doofus"), N_("stty: unknown mode: doofus"),
_("I can't hear you -- I'm using the scrambler."), N_("I can't hear you -- I'm using the scrambler."),
_("The more you drive -- the dumber you get."), N_("The more you drive -- the dumber you get."),
_("Listen, broccoli brains, I don't have time to listen to this trash."), N_("Listen, broccoli brains, I don't have time to listen to this trash."),
_("I've seen penguins that can type better than that."), N_("I've seen penguins that can type better than that."),
_("Have you considered trying to match wits with a rutabaga?"), N_("Have you considered trying to match wits with a rutabaga?"),
_("You speak an infinite deal of nothing"), N_("You speak an infinite deal of nothing"),
#endif /* SUDOERS_INS_CSOPS_H */ #endif /* SUDOERS_INS_CSOPS_H */

View File

@@ -23,28 +23,28 @@
* Insults from the "Goon Show." * Insults from the "Goon Show."
*/ */
_("You silly, twisted boy you."), N_("You silly, twisted boy you."),
_("He has fallen in the water!"), N_("He has fallen in the water!"),
_("We'll all be murdered in our beds!"), N_("We'll all be murdered in our beds!"),
_("You can't come in. Our tiger has got flu"), N_("You can't come in. Our tiger has got flu"),
_("I don't wish to know that."), N_("I don't wish to know that."),
_("What, what, what, what, what, what, what, what, what, what?"), N_("What, what, what, what, what, what, what, what, what, what?"),
_("You can't get the wood, you know."), N_("You can't get the wood, you know."),
_("You'll starve!"), N_("You'll starve!"),
_("... and it used to be so popular..."), N_("... and it used to be so popular..."),
_("Pauses for audience applause, not a sausage"), N_("Pauses for audience applause, not a sausage"),
_("Hold it up to the light --- not a brain in sight!"), N_("Hold it up to the light --- not a brain in sight!"),
_("Have a gorilla..."), N_("Have a gorilla..."),
_("There must be cure for it!"), N_("There must be cure for it!"),
_("There's a lot of it about, you know."), N_("There's a lot of it about, you know."),
_("You do that again and see what happens..."), N_("You do that again and see what happens..."),
_("Ying Tong Iddle I Po"), N_("Ying Tong Iddle I Po"),
_("Harm can come to a young lad like that!"), N_("Harm can come to a young lad like that!"),
_("And with that remarks folks, the case of the Crown vs yourself was proven."), N_("And with that remarks folks, the case of the Crown vs yourself was proven."),
_("Speak English you fool --- there are no subtitles in this scene."), N_("Speak English you fool --- there are no subtitles in this scene."),
_("You gotta go owwwww!"), N_("You gotta go owwwww!"),
_("I have been called worse."), N_("I have been called worse."),
_("It's only your word against mine."), N_("It's only your word against mine."),
_("I think ... err ... I think ... I think I'll go home"), N_("I think ... err ... I think ... I think I'll go home"),
#endif /* SUDOERS_INS_GOONS_H */ #endif /* SUDOERS_INS_GOONS_H */

View File

@@ -23,17 +23,17 @@
* Insults from "Monty Python's Flying Circus" and family. * Insults from "Monty Python's Flying Circus" and family.
*/ */
_("That is no basis for supreme executive power!"), N_("That is no basis for supreme executive power!"),
_("You empty-headed animal food trough wiper!"), N_("You empty-headed animal food trough wiper!"),
_("I fart in your general direction!"), N_("I fart in your general direction!"),
_("Your mother was a hamster and your father smelt of elderberries!"), N_("Your mother was a hamster and your father smelt of elderberries!"),
_("You must cut down the mightiest tree in the forest... with... a herring!"), N_("You must cut down the mightiest tree in the forest... with... a herring!"),
_("I wave my private parts at your aunties!"), N_("I wave my private parts at your aunties!"),
_("He's not the Messiah, he's a very naughty boy!"), N_("He's not the Messiah, he's a very naughty boy!"),
_("I wish to make a complaint."), N_("I wish to make a complaint."),
_("When you're walking home tonight, and some homicidal maniac comes after you with a bunch of loganberries, don't come crying to me!"), N_("When you're walking home tonight, and some homicidal maniac comes after you with a bunch of loganberries, don't come crying to me!"),
_("This man, he doesn't know when he's beaten! He doesn't know when he's winning, either. He has no... sort of... sensory apparatus..."), N_("This man, he doesn't know when he's beaten! He doesn't know when he's winning, either. He has no... sort of... sensory apparatus..."),
_("There's nothing wrong with you that an expensive operation can't prolong."), N_("There's nothing wrong with you that an expensive operation can't prolong."),
_("I'm very sorry, but I'm not allowed to argue unless you've paid."), N_("I'm very sorry, but I'm not allowed to argue unless you've paid."),
#endif /* SUDOERS_INS_PYTHON_H */ #endif /* SUDOERS_INS_PYTHON_H */