summaryrefslogtreecommitdiffstats
path: root/lib/template
diff options
context:
space:
mode:
authorkondou <kondou@ts.unde.re>2013-08-09 20:37:18 +0200
committerkondou <kondou@ts.unde.re>2013-08-09 20:37:18 +0200
commit9549bd3e68aa32bb9fa1a9a54bda84fa5070966f (patch)
treee8464e5679053e1b75e358682ece102ea959836a /lib/template
parent4c0ec974b9a8b97625695edd136e1f805af0bf31 (diff)
downloadnextcloud-server-9549bd3e68aa32bb9fa1a9a54bda84fa5070966f.tar.gz
nextcloud-server-9549bd3e68aa32bb9fa1a9a54bda84fa5070966f.zip
Use plural translations
Diffstat (limited to 'lib/template')
-rw-r--r--lib/template/functions.php10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/template/functions.php b/lib/template/functions.php
index 2d43cae1c0c..717e197c1cb 100644
--- a/lib/template/functions.php
+++ b/lib/template/functions.php
@@ -78,15 +78,13 @@ function relative_modified_date($timestamp) {
$diffmonths = round($diffdays/31);
if($timediff < 60) { return $l->t('seconds ago'); }
- else if($timediff < 120) { return $l->t('1 minute ago'); }
- else if($timediff < 3600) { return $l->t('%d minutes ago', $diffminutes); }
- else if($timediff < 7200) { return $l->t('1 hour ago'); }
- else if($timediff < 86400) { return $l->t('%d hours ago', $diffhours); }
+ else if($timediff < 3600) { return $l->n('%n minute ago', '%n minutes ago', $diffminutes); }
+ else if($timediff < 86400) { return $l->n('%n hour ago', '%n hours ago', $diffhours); }
else if((date('G')-$diffhours) > 0) { return $l->t('today'); }
else if((date('G')-$diffhours) > -24) { return $l->t('yesterday'); }
- else if($timediff < 2678400) { return $l->t('%d days ago', $diffdays); }
+ else if($timediff < 2678400) { return $l->n('%n day go', '%n days ago', $diffdays); }
else if($timediff < 5184000) { return $l->t('last month'); }
- else if((date('n')-$diffmonths) > 0) { return $l->t('%d months ago', $diffmonths); }
+ else if((date('n')-$diffmonths) > 0) { return $l->n('%n month ago', '%n months ago', $diffmonths); }
else if($timediff < 63113852) { return $l->t('last year'); }
else { return $l->t('years ago'); }
}