Bug: English plural rule is slightly different from French (0 is plural, not in French)

git-svn-id: http://piwigo.org/svn/trunk@1862 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
vdigital
2007-02-27 06:22:17 +00:00
parent 47512ce6a6
commit 7053787d1f
4 changed files with 8 additions and 3 deletions
+5
View File
@@ -1011,6 +1011,11 @@ function l10n($key)
*/
function l10n_dec($singular_fmt_key, $plural_fmt_key, $decimal)
{
global $lang_info;
if ( $lang_info['zero_plural'] and $decimal == 0 )
{
return sprintf(l10n($plural_fmt_key), 0);
}
return sprintf(l10n(($decimal > 1 ? $plural_fmt_key :
$singular_fmt_key)), $decimal);
}
+1 -1
View File
@@ -31,7 +31,7 @@ $lang_info['country'] = 'Great Britain';
$lang_info['charset'] = 'iso-8859-1';
$lang_info['direction'] = 'ltr';
$lang_info['code'] = 'en';
$lang_info['zero_plural'] = true;
$lang_table_translate_ascii7bits = array(
chr( 0) => chr(0),
chr( 1) => chr( 1),
+1 -1
View File
@@ -31,7 +31,7 @@ $lang_info['country'] = 'France';
$lang_info['charset'] = 'iso-8859-1';
$lang_info['direction'] = 'ltr';
$lang_info['code'] = 'fr';
$lang_info['zero_plural'] = false;
$lang_table_translate_ascii7bits = array(
chr( 0) => chr(0),
chr( 1) => chr( 1),
+1 -1
View File
@@ -269,7 +269,7 @@ input#qsearchInput {
}
.zero { display: none }
.one { background: transparent; }
.2nmore { background: transparent; }
.plural { background: transparent; }
.nb-hits { color: #69c; }
.nb-comments { color: #f92; }