aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvdigital <vdigital@piwigo.org>2007-02-27 06:22:17 +0000
committervdigital <vdigital@piwigo.org>2007-02-27 06:22:17 +0000
commit7053787d1f4d4500080185af6878835217aa17a5 (patch)
treef98c8f831e4a180ae92fd9d676394220e02abfec
parent47512ce6a64fa356214c162a8313480c6aed41d2 (diff)
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
Diffstat (limited to '')
-rw-r--r--include/functions.inc.php5
-rw-r--r--language/en_UK.iso-8859-1/common.lang.php2
-rw-r--r--language/fr_FR.iso-8859-1/common.lang.php2
-rw-r--r--template/yoga/theme/wipi/theme.css2
4 files changed, 8 insertions, 3 deletions
diff --git a/include/functions.inc.php b/include/functions.inc.php
index 50f247a47..46651c284 100644
--- a/include/functions.inc.php
+++ b/include/functions.inc.php
@@ -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);
}
diff --git a/language/en_UK.iso-8859-1/common.lang.php b/language/en_UK.iso-8859-1/common.lang.php
index dafd1c82d..9541758bb 100644
--- a/language/en_UK.iso-8859-1/common.lang.php
+++ b/language/en_UK.iso-8859-1/common.lang.php
@@ -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),
diff --git a/language/fr_FR.iso-8859-1/common.lang.php b/language/fr_FR.iso-8859-1/common.lang.php
index 31ac85d99..51822c58e 100644
--- a/language/fr_FR.iso-8859-1/common.lang.php
+++ b/language/fr_FR.iso-8859-1/common.lang.php
@@ -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),
diff --git a/template/yoga/theme/wipi/theme.css b/template/yoga/theme/wipi/theme.css
index 75a84ac58..00cd16c26 100644
--- a/template/yoga/theme/wipi/theme.css
+++ b/template/yoga/theme/wipi/theme.css
@@ -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; }