Page 1 of 1

notification auto replacement

Posted: 06 June 2020, 12:30
by Ralchimist
Hi!

I'm trying to log that one player doubles his score.
So I'm using:

Code: Select all

self::notifyAllPlayers( "blank", clienttranslate('${player_name} doubles his score'), array("player_name" => $player['name']) ); 

In the log, ${player_name} is correctly replace.
BUT:
"his" becomes "their" ...

How can I avoid it?

Thanks for your help!

Re: notification auto replacement

Posted: 06 June 2020, 12:33
by Een
If you define your gender in your player profile, the correct pronoun will be used (if no gender is set, singular "they" is used as the default).

Re: notification auto replacement

Posted: 07 June 2020, 00:01
by shadowphiar
Is there any way to get explicit control of pronoun substitution? Some of the messages in my game mention more than one of the players (overriding format_string_recursive to add colour formatting for "$other_player_name"). If I were to include a pronoun that happened to mean $other_player_id, it would not be great to change it based on what is in $player_id's profile...

Re: notification auto replacement

Posted: 07 June 2020, 12:16
by Een
No, this is baked in into the framework. Managing player gender in translations can get really complex really fast. We actually manage only the simplest cases, so indeed if there are multiple subjects in a sentence, better to use the singular "their" directly in the original string (safe choice, this is never substituted) or to avoid pronouns altogether (even safer).

Re: notification auto replacement

Posted: 24 August 2020, 04:25
by piratelarry
I agree completely! So why do so many games still default to male pronouns (he/his/him) in English? I would love to see the standard become gender-neutral or no pronouns. I know that means re-codng many games, but I think this change would be wildly appreciated by many (and largely unnoticed by the rest)!