Page 1 of 1

Gender-specific dialog

Posted: 27 Nov 2017, 15:40
by gumi
Topic split from: https://forums.themanaworld.org/viewtop ... 22#p156522

honestly that whole gender thing got too messy; I believe we should always address the player in a gender-neutral manner, no matter their actual gender

Re: The great typo hunt

Posted: 29 Nov 2017, 09:53
by WildX
gumi wrote:honestly that whole gender thing got too messy; I believe we should always address the player in a gender-neutral manner, no matter their actual gender
I would agree that it's much simpler that way, but could it not also cause problems when the text is translated in other languages? Not all languages allow gender neutrality.

Re: Gender-specific dialog

Posted: 29 Nov 2017, 17:21
by glag
According to this Wikipedia page, French is supposed to be a language raising problems when you try to speak in a gender-neutral way. However, I am confident that I can always find a way to translate a text into French in a gender-neutral fashion (I can completely transform the text while maintaining the same meaning). I don't know if it is the same with the other languages.

I don't know if gender should be removed from the dialog system. Removing it has the advantage of simplification. But keeping it improves the expression power. For instance, without it, an NPC can not display a sexist behavior toward the player.

In my opinion, the right thing to do (keeping or removing gender specific speech) depends on the amount of workforce we have :
- if there is not enough people working on tmw, go for simplicity and remove gender speech
- if there is enough people working on tmw, go for features and create three types of dialogs (gender-neutral for non-binary players, female, and male)

We could also go for flexibility, by allowing the "lg" function to take either one or three arguments. If only one argument is given, it's a gender-neutral dialog. If three arguments are given, the first is the gender-neutral dialog, the second is the female dialog, the third is the male dialog. With this system, the first step of development is to write a working code with only one version of dialog. Then, when it works, if someone wants to improve the dialogs, they can do it by adding female and male specific dialogs.

Another thing I would like to point out : in the translation system (Transifex), the identifier of a sentence is the English sentence itself. This means that if the same sentence appears two times in NPC dialogs, it has to be translated the same way in both cases. This is not good, because the same sentence can have several meanings, depending on context. So we should be able to translate every sentence as we wish, even if that exact English sentence is already used in another dialog. This is not entirely off-topic, because translation "freedom" makes it more easy to rephrase sentences in a gender-neutral manner while keeping the same meaning.

Re: Gender-specific dialog

Posted: 29 Nov 2017, 17:46
by gumi
Something else I'd wanna do is wrap l() in a sprintf() so that we can use standard printf syntax, which, among other things, allows to reorder arguments. This would be very useful in romance languages, ie:

with the old system:
bring me a @@ @@ => bring me a blue chair
apportez-moi une @@ de couleur @@ => apportez-moi une bleue de couleur chaise

with printf:
bring me a %s %s => bring me a blue chair
apportez-moi une %2$s de couleur %1$s => apportez-moi une chaise de couleur bleue


%2$s is much uglier than @@, but it's much more flexible

Re: Gender-specific dialog

Posted: 01 Dec 2017, 08:44
by WildX
glag wrote: - if there is not enough people working on tmw, go for simplicity and remove gender speech
The thing is that we have to think of the future as well. Right now there is definitely not enough people, at some point there might be enough, but that time won't last forever either. Simplicity is always a safe bet at least.
gumi wrote:apportez-moi une bleue de couleur chaise
tbh chair has always been my favourite colour

Re: Gender-specific dialog

Posted: 02 Dec 2017, 22:50
by Reid
Correct gender-specific dialog is indeed quite time consuming, although, it is not something we much care of when we write a script. We usually do something that is OK-ish, and then on the translation process or through player comments we fix lines that are messy.
gumi wrote:Something else I'd wanna do is wrap l() in a sprintf() so that we can use standard printf syntax, which, among other things, allows to reorder arguments. This would be very useful in romance languages, ie:

with the old system:
bring me a @@ @@ => bring me a blue chair
apportez-moi une @@ de couleur @@ => apportez-moi une bleue de couleur chaise

with printf:
bring me a %s %s => bring me a blue chair
apportez-moi une %2$s de couleur %1$s => apportez-moi une chaise de couleur bleue


%2$s is much uglier than @@, but it's much more flexible
Indeed it would be cleaner, although I would prefer to keep a one letter function name instead of something long like sprintf. Remember that the most a variable is used, the least its length should be.

Re: Gender-specific dialog

Posted: 02 Dec 2017, 23:50
by Amarynthus
Isn't the logic a bit backwards there. The more you use a variable or function, the better of you would be to give it a short name. That is not the same as saying you would be better off using a function more often because it's name is shorter.

In any case, just wrap sprintf or use a function pointer to sprintf with a one-letter name if you really want to.

Re: Gender-specific dialog

Posted: 04 Dec 2017, 00:39
by Reid
Amarynthus wrote:Isn't the logic a bit backwards there. The more you use a variable or function, the better of you would be to give it a short name. That is not the same as saying you would be better off using a function more often because it's name is shorter.

In any case, just wrap sprintf or use a function pointer to sprintf with a one-letter name if you really want to.
Isn't it what I said? :)

Re: Gender-specific dialog

Posted: 15 Feb 2018, 18:56
by gumi
I have implemented the changes in evol/evol-hercules@68886b5. You can use l() like before and it will work for both the legacy @@ format and the printf format.

Code: Select all

l("bring me a @@ @@", "blue", "chair"); // => bring me a blue chair
l("bring me a %s %s", "blue", "chair"); // => bring me a blue chair

l("apportez-moi une @@ de couleur @@", "bleue", "chaise"); // => apportez-moi une bleue de couleur chaise
l("apportez-moi une %s de couleur %s", "bleue", "chaise"); // => apportez-moi une bleue de couleur chaise
l("apportez-moi une %2$s de couleur %1$s", "bleue", "chaise"); // => apportez-moi une chaise de couleur bleue