FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » FUDforum 3.0+ » Suggestion: code to output singular/plural when needed
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Suggestion: code to output singular/plural when needed [message #1688] Sat, 20 April 2002 23:57 Go to next message
basse is currently offline  basse   Finland
Messages: 164
Registered: March 2002
Location: Ã…bo, Finland
Karma: 0
Senior Member
In English, plural forms are quite elegant. You just put an s at the end of the word and voilá. In other languages, the case is not that simple.

For example: the row that show how many members and how many guests are browsing the forum looks like this in Swedish.
Vi har 1 medlem(mar), 0 osynlig(a) medlem(mar) och 0 gäst(er) på besök just nu.


This is not very elegant. Therefore I suggest that you write code that knows when to output the singular form and when to print the plural.

In that way, the example line would look like this:
Vi har 1 medlem, 0 osynliga medlemmar och 0 gäster på besök just nu.


Another time it may look like this:
Vi har 3 medlemmar, 1 osynlig medlem och 4 gäster på besök just nu.


What do you think?
Re: Suggestion: code to output singular/plural when needed [message #1689 is a reply to message #1688] Sun, 21 April 2002 00:02 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
That is why everyone should use english Twisted Evil

*kidding*

I'll look into our code to see what would it take to make that work...

In the meanwhile, if you can give me a list of the pages that have such issues so that I know just how many pages I gotta deal with.


FUDforum Core Developer
Re: Suggestion: code to output singular/plural when needed [message #1691 is a reply to message #1689] Sun, 21 April 2002 00:15 Go to previous messageGo to next message
basse is currently offline  basse   Finland
Messages: 164
Registered: March 2002
Location: Ã…bo, Finland
Karma: 0
Senior Member
prottoss wrote on Sun, 21 April 2002 3:02 AM


In the meanwhile, if you can give me a list of the pages that have such issues so that I know just how many pages I gotta deal with.


I can't find any other instances than the one I already mentioned - the list of how many members and guest the forum has. If I come up with more I'll post them here.
Re: Suggestion: code to output singular/plural when needed [message #1909 is a reply to message #1688] Wed, 24 April 2002 17:40 Go to previous messageGo to next message
basse is currently offline  basse   Finland
Messages: 164
Registered: March 2002
Location: Ã…bo, Finland
Karma: 0
Senior Member
Have you given this idea any thought? Would it be very hard to change the code in this manner?
Re: Suggestion: code to output singular/plural when needed [message #1910 is a reply to message #1909] Wed, 24 April 2002 17:43 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
djupsjob wrote on Wed, 24 April 2002 1:40 PM

Have you given this idea any thought? Would it be very hard to change the code in this manner?


This will probably be done, since it oocurs in just 1 place.

I have a few things that a higher priority that I want to finish, but this will definately be done by 1.9.8 Release.


FUDforum Core Developer
Re: Suggestion: code to output singular/plural when needed [message #1913 is a reply to message #1910] Wed, 24 April 2002 19:35 Go to previous messageGo to next message
basse is currently offline  basse   Finland
Messages: 164
Registered: March 2002
Location: Ã…bo, Finland
Karma: 0
Senior Member
Take your time, no hurry. I just wanted to know whether to put more pressure on you or not... Smile
Re: Suggestion: code to output singular/plural when needed [message #1925 is a reply to message #1688] Thu, 25 April 2002 08:28 Go to previous message
basse is currently offline  basse   Finland
Messages: 164
Registered: March 2002
Location: Ã…bo, Finland
Karma: 0
Senior Member
I found another place - the string that show how many votes yet in a poll. It should IMO read either "0 votes", "1 vote" or "x votes" (where x > 1).
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Bug report: automatic setting of locale fails
Next Topic: User/Group Management
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Dec 05 02:09:01 GMT 2024

Total time taken to generate the page: 0.02347 seconds