Boys & Girls

Post

Posted
Rating:
#1387 (In Topic #295)
Avatar
Standard member
moimaim is in the usergroup ‘Community saint’

Gender issue

Hi there :)

In English most nouns are invariable whether masculine or feminine. In many (most?) other languages, they're not.
And that makes inventing stuff like usergroup titles extremely complicated. 
On the forum, having the photo of a woman, with a woman's first name under it, and then a male title is just wrong.
Since 2005 i've put up with it, convinced I just had to, and tried to be "creative" when naming my groups. It is a real usability issue. A big one.

And today……. :party:

Today I found this :

{1} {1|day|days} ago , hiding in the language strings.

If I understand right, the script is smart enough to output "day" if there's a 1 in front of it, and "days" if it's anything else except 1.

Based on the same principle, could sthing like this work:
{M|vendangeur|vendangeuse} so it outputs "vendangeur" if there's an M in the gender field of the member's profile and "vendangeuse" if it's anything else. Or something similar.

That would make a very nice Xmas gift.

 

precorp.fr
lddp.eu


Last one to leave the country, please turn off the lights.
Online now: No Back to the top

Post

Posted
Rating:
#1389
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
Hi,

I'll see if I can sort this for you.

But first a couple of points/questions…

1) The syntax isn't quite what you think. The '1' is actually referring to the first parameter. It's a coincidence that we then look to see if the number is 1 or not to decide plurality expression (e.g. 1 is singular, any other number including zero is plural, 0 balloons, 1 balloon, 2 balloons). It's hard-coded to English in the hope other European languages at least use the same rule.

2) Can you give a more concrete example of your problem. Is it like under your avatar here, if "Standard member" was French, it would get gendered based on whether you were male or female, even though it's a standalone sentence?


Become a fan of Composr on Facebook or add me as a friend. Add me on on Twitter. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top

Post

Posted
Rating:
#1392
Avatar
Standard member
moimaim is in the usergroup ‘Community saint’

Chris Graham said

But first a couple of points/questions…

2) Can you give a more concrete example of your problem. Is it like under your avatar here, if "Standard member" was French, it would get gendered based on whether you were male or female, even though it's a standalone sentence?



Precisely.

A bit like you joining a site on movies, and having Chris Graham, your photo, and actress underneath it. It wouldn't look right.
Actor/actress is a bit of an exception, most nouns are invariable in English. It's the opposite for latin languages.
When you get the gender wrong, men feel insulted, and women feel disregarded. 
So we try to find a workaround that is acceptable for both. Imagine you have to find ranks but only use nouns that have different M/F forms. Not impossible, but challenging…

Ranking system is an obvious candidate, I'll let you know when (if) I find others.

I know there's an italian translation, it would be nice to here what they make of this…

 

Chris Graham said

But first a couple of points/questions…

2) Can you give a more concrete example of your problem. Is it like under your avatar here, if "Standard member" was French, it would get gendered based on whether you were male or female, even though it's a standalone sentence?



Precisely.

A bit like you joining a site on movies, and having Chris Graham, your photo, and actress underneath it. It wouldn't look right.
Actor/actress is a bit of an exception, most nouns are invariable in English. It's the opposite for latin languages.
When you get the gender wrong, men feel insulted, and women feel disregarded. 
So we try to find a workaround that is acceptable for both. Imagine you have to find ranks but only use nouns that have different M/F forms. Not impossible, but challenging…

Ranking system is an obvious candidate, I'll let you know when (if) I find others.

I know there's an italian translation, it would be nice to here what they make of this…

 

precorp.fr
lddp.eu


Last one to leave the country, please turn off the lights.
Online now: No Back to the top

Post

Posted
Rating:
#1395
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
I mulled it over (like wine  :christmas: ), and decided that is better to do this with a template edit than trying to force in a new syntax that somehow knows member genders (even though we don't have a default gender field).

So here's what we're adding to our docs, to explain how to do the edit…

Gendered-descriptors

Some languages may require stock phrases to be gendered. One known example is the member usergroup titles in French, which would need to be written as masculine or feminine based on the gender of the member being displayed. For example, the default title of a usergroup (given to members within it) is "Standard member" in English, but needs to be gendered on a french website.
A solution to this can be implemented via a template edit. We can edit the CNS_TOPIC_POST.tpl template to change:

Code

   {+START,IF_NON_EMPTY,{POSTER_TITLE}}<div class="cns_topic_poster_title">{POSTER_TITLE*}</div>{+END}
to:

Code

   {+START,IF_NON_EMPTY,{POSTER_TITLE}}
      <div class="cns_topic_poster_title">
         {+START,CASES,{$CPF_VALUE,Gender}}
         Mâle=Un mâle
         Femelle=Une femelle
         ={POSTER_TITLE*}
         {+END}
      </div>
   {+END}
   {+START,IF_NON_EMPTY,{RANK_IMAGES}}<div class="cns_topic_poster_rank_images">{RANK_IMAGES}</div>{+END}
This assumes we have created a custom profile field titled "Gender" with the optiosn of "Mâle" and "Femelle". If filled in, it will remap their usergroup's title to either "Un mâle" or "Une femelle" accordingly. If not set, it will just use the regular usergroup title.
Of course this system is hard-coding gender-specific labels into a template, so it is not perfect. However, sites could use more elaborate Tempcode if they need to preserve the feature of having different labels for different usergroups. We'll give such an example in the next section.

Alternatively, you could just remove {+START,IF_NON_EMPTY,{POSTER_TITLE}}<div class="cns_topic_poster_title">{POSTER_TITLE*}</div>{+END} entirely if you don't require the feature at all.

Elaborate example

Using additional Tempcode, we could do additional deep remapping.

Code

   {+START,IF_NON_EMPTY,{POSTER_TITLE}}
      <div class="cns_topic_poster_title">
         {+START,IF,{$EQ,{POSTER_TITLE},Acteur}
            {+START,CASES,{$CPF_VALUE,Gender}}
            Mâle=Acteur
            Femelle=Actrice
            ={POSTER_TITLE*}
            {+END}
         {+END}
         {+START,IF,{$EQ,{POSTER_TITLE},Policier}
            {+START,CASES,{$CPF_VALUE,Gender}}
            Mâle=Policier
            Femelle=Policière
            ={POSTER_TITLE*}
            {+END}
         {+END}
      </div>
   {+END}
   {+START,IF_NON_EMPTY,{RANK_IMAGES}}<div class="cns_topic_poster_rank_images">{RANK_IMAGES}</div>{+END}

This will remap the title based on what it already is. For each of the possible values ("Acteur" and "Policier" in our example) it will provide the gendered options for it.

Last edit: by Chris Graham



Become a fan of Composr on Facebook or add me as a friend. Add me on on Twitter. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top

Post

Posted
Rating:
#1396
Avatar
Standard member
moimaim is in the usergroup ‘Community saint’
Keep mulling, your french is improving… ;)

I'll give it a go tonight and keep you posted.

Thx

precorp.fr
lddp.eu


Last one to leave the country, please turn off the lights.
Online now: No Back to the top
1 guest and 0 members have just viewed this.

Statistics

Users online:

Philip, deepu_ms, MVLipwig, Salman, mytracker, Manu, gabriel58, amit.nigam

Forum statistics:
  • 1,064 topics, 5,138 posts, 5,981 members
  • Our newest member is narjisinfotech
Birthdays:
Back to Top