<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FluxBB.org Forums - Guests online text + little improvement on user count]]></title>
	<link rel="self" href="http://fluxbb.org/forums/feed/atom/topic/1528/"/>
	<updated>2008-08-02T08:40:56Z</updated>
	<generator>FluxBB</generator>
	<id>http://fluxbb.org/forums/topic/1528/guests-online-text-little-improvement-on-user-count/</id>
		<entry>
			<title type="html"><![CDATA[Re: Guests online text + little improvement on user count]]></title>
			<link rel="alternate" href="http://fluxbb.org/forums/post/12311/#p12311"/>
			<content type="html"><![CDATA[yeah ! merci :)]]></content>
			<author>
				<name><![CDATA[vincent]]></name>
				<uri>http://fluxbb.org/forums/user/901/</uri>
			</author>
			<updated>2008-08-02T08:40:56Z</updated>
			<id>http://fluxbb.org/forums/post/12311/#p12311</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Guests online text + little improvement on user count]]></title>
			<link rel="alternate" href="http://fluxbb.org/forums/post/12308/#p12308"/>
			<content type="html"><![CDATA[I've tinkered with this as much as I'm going to. It should now be ok for most langauges and is more extensible.]]></content>
			<author>
				<name><![CDATA[Paul]]></name>
				<uri>http://fluxbb.org/forums/user/4/</uri>
			</author>
			<updated>2008-08-02T03:30:44Z</updated>
			<id>http://fluxbb.org/forums/post/12308/#p12308</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Guests online text + little improvement on user count]]></title>
			<link rel="alternate" href="http://fluxbb.org/forums/post/12306/#p12306"/>
			<content type="html"><![CDATA[Some of webmasters puts function definitions to language files to solve language specific number|gender variations. Probably, it is unique solution.]]></content>
			<author>
				<name><![CDATA[artoodetoo]]></name>
				<uri>http://fluxbb.org/forums/user/95/</uri>
			</author>
			<updated>2008-08-02T02:39:48Z</updated>
			<id>http://fluxbb.org/forums/post/12306/#p12306</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Guests online text + little improvement on user count]]></title>
			<link rel="alternate" href="http://fluxbb.org/forums/post/12305/#p12305"/>
			<content type="html"><![CDATA[just for example in Russian (latin transliteration):

0 gostej or net gostej (plural #1)
1 gost' (single)
2 gostia (plural #2)
3 gostia
4 gostia
5 gostej (plural #1)
...
21 gost' (is it plural or single?)
22 gostia
... etc. last digit is rule

:)]]></content>
			<author>
				<name><![CDATA[artoodetoo]]></name>
				<uri>http://fluxbb.org/forums/user/95/</uri>
			</author>
			<updated>2008-08-02T02:33:36Z</updated>
			<id>http://fluxbb.org/forums/post/12305/#p12305</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Guests online text + little improvement on user count]]></title>
			<link rel="alternate" href="http://fluxbb.org/forums/post/12298/#p12298"/>
			<content type="html"><![CDATA[Yes.
Which in French does:
[list=1]
[*]0 invité (or aucun invité)[/*]
[*]1 invité[/*]
[*]% invité[u][b]s[/b][/u][/*]
[/list]]]></content>
			<author>
				<name><![CDATA[Pandark]]></name>
				<uri>http://fluxbb.org/forums/user/215/</uri>
			</author>
			<updated>2008-08-02T01:02:37Z</updated>
			<id>http://fluxbb.org/forums/post/12298/#p12298</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Guests online text + little improvement on user count]]></title>
			<link rel="alternate" href="http://fluxbb.org/forums/post/12296/#p12296"/>
			<content type="html"><![CDATA[That's the best solution for i18n: 3 Strings (as reference: Wordpress does it exactly like that):
[list=1]
[*]0 Guests[/*]
[*]1 Guest[/*]
[*]% Guests[/*]
[/list]]]></content>
			<author>
				<name><![CDATA[damaxxed]]></name>
				<uri>http://fluxbb.org/forums/user/201/</uri>
			</author>
			<updated>2008-08-02T00:52:16Z</updated>
			<id>http://fluxbb.org/forums/post/12296/#p12296</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Guests online text + little improvement on user count]]></title>
			<link rel="alternate" href="http://fluxbb.org/forums/post/12288/#p12288"/>
			<content type="html"><![CDATA[hm, so we said the same thing :) but I'm not sure.

Two forms could claim our needs in french (singular/plural) :

[b]singular : [/b]

in french : 
  - "Il y a 0 invité"
  - "Il y a 1 invité"

in English :
  - "There is 0 guest"
  - "There is 1 guest"

[b]plural :[/b]  

in french : 
  - "Il y a X invités"

in English :
  - "There are X guests"


But actually forums display :

[b]singular : [/b]
  - "There is 1 guest"

[b]plural :[/b]  
  - "There are 0 guests"
  - "There are X guests"

In french 0 IS singular NOT plural. So we have a problem.

So for more flexibility and because wikipedia say some languages use pural for zero and other use singular (like in french) I suggest 3 forms :
none/singular/plural

0 = "Il n'y a aucun invité" or "Il y a 0 invité" / "There is no guest" or "There are 0 guests"
1 = "Il y a un invité" or "Il y a 1 invité" / "There is one guest" or "There is 1 guest"
X = "Il y a X invités" / "There are X invité"]]></content>
			<author>
				<name><![CDATA[vincent]]></name>
				<uri>http://fluxbb.org/forums/user/901/</uri>
			</author>
			<updated>2008-08-01T23:17:14Z</updated>
			<id>http://fluxbb.org/forums/post/12288/#p12288</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Guests online text + little improvement on user count]]></title>
			<link rel="alternate" href="http://fluxbb.org/forums/post/12286/#p12286"/>
			<content type="html"><![CDATA[Yes, that's exactly what I said.]]></content>
			<author>
				<name><![CDATA[Smartys]]></name>
				<uri>http://fluxbb.org/forums/user/2/</uri>
			</author>
			<updated>2008-08-01T22:53:33Z</updated>
			<id>http://fluxbb.org/forums/post/12286/#p12286</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Guests online text + little improvement on user count]]></title>
			<link rel="alternate" href="http://fluxbb.org/forums/post/12285/#p12285"/>
			<content type="html"><![CDATA[no, in french we write "Il y a 0 invité" et "Il y a 2 invités" but we prefere wrinting "Il n'y a aucun invité" (for zero guest)]]></content>
			<author>
				<name><![CDATA[vincent]]></name>
				<uri>http://fluxbb.org/forums/user/901/</uri>
			</author>
			<updated>2008-08-01T22:51:50Z</updated>
			<id>http://fluxbb.org/forums/post/12285/#p12285</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Guests online text + little improvement on user count]]></title>
			<link rel="alternate" href="http://fluxbb.org/forums/post/12284/#p12284"/>
			<content type="html"><![CDATA[Zero is plural in many languages
[url]http://en.wikipedia.org/wiki/Plural[/url]
[quote]Languages having only a singular and plural form may still differ in their treatment of zero. For example, in English, German, Dutch, Italian, Spanish and Portuguese, the plural form is used for zero or more than one, and the singular for one thing only. By contrast, in French, the singular form is used for zero.[/quote]]]></content>
			<author>
				<name><![CDATA[Smartys]]></name>
				<uri>http://fluxbb.org/forums/user/2/</uri>
			</author>
			<updated>2008-08-01T22:47:07Z</updated>
			<id>http://fluxbb.org/forums/post/12284/#p12284</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Guests online text + little improvement on user count]]></title>
			<link rel="alternate" href="http://fluxbb.org/forums/post/12283/#p12283"/>
			<content type="html"><![CDATA[yes your right ! I'm not speak English very well and I just past the text from the forum, so I think it is not a feature request but a bug 

because 0 (zero) isn't plural ; isn't it ?

Ce qui est sûr c'est qu'en français "Il y a 0 invités" c'est grammaticalement une erreur également.]]></content>
			<author>
				<name><![CDATA[vincent]]></name>
				<uri>http://fluxbb.org/forums/user/901/</uri>
			</author>
			<updated>2008-08-01T22:37:35Z</updated>
			<id>http://fluxbb.org/forums/post/12283/#p12283</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Guests online text + little improvement on user count]]></title>
			<link rel="alternate" href="http://fluxbb.org/forums/post/12279/#p12279"/>
			<content type="html"><![CDATA[Moved to Feature requests, since this isn't a bug.
You are grammatically incorrect: you don't use a plural verb (are) and a singular object (guest).]]></content>
			<author>
				<name><![CDATA[Smartys]]></name>
				<uri>http://fluxbb.org/forums/user/2/</uri>
			</author>
			<updated>2008-08-01T22:13:07Z</updated>
			<id>http://fluxbb.org/forums/post/12279/#p12279</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Guests online text + little improvement on user count]]></title>
			<link rel="alternate" href="http://fluxbb.org/forums/post/12275/#p12275"/>
			<content type="html"><![CDATA[Hello,

In lang/index.php we have 'Users plural', 'User single' and 'Users none' that's great, but we should also have a 'Guest none'.

Because I think "There are 0 guests and.." shoud be  "There are 0 guest and..." or "There are no guest and..."

Perhaps by replacing this :

[code]<?php (($num_guests != 1) ? printf($lang_index['Guests plural'], forum_number_format($num_guests)) : printf($lang_index['Guest single'], $num_guests)) ?>[/code]

by something like this :

[code]<?php 
    if ($num_guests < 1)
        printf($lang_index['Guest none'], $num_guests);
    elseif ($num_guests == 1)
        printf($lang_index['Guest single'], $num_guests);
    else
        printf($lang_index['Guests plural'], forum_number_format($num_guests));
    ?>[/code]

By the way, I think this piece of code :

[code]<?php ((count($users) > 1) ? printf($lang_index['Users plural'], forum_number_format(count($users))) : printf(((count($users) == 0) ? $lang_index['Users none'] : $lang_index['User single']), count($users))) ?>[/code]

Should be replace by a similare piece than the one for pluralize the guest count. A variable could be added just before 'in_users_online_pre_online_info_output' hook.

[code]
$num_users = count($users);

[...]

<?php 
    if ($num_users < 1)
        printf($lang_index['Users none'], $num_users);
    elseif ($num_users == 1)
        printf($lang_index['User single'], $num_users);
    else
        printf($lang_index['Users plural'], forum_number_format($num_users));
    ?>[/code]

So like this we could have just one count($users) and the possibilty to use this number in previous hook, plus the possibility to use textual for "none" and "one" like "... and one registered user online"]]></content>
			<author>
				<name><![CDATA[vincent]]></name>
				<uri>http://fluxbb.org/forums/user/901/</uri>
			</author>
			<updated>2008-08-01T21:56:39Z</updated>
			<id>http://fluxbb.org/forums/post/12275/#p12275</id>
		</entry>
</feed>
