summaryrefslogtreecommitdiffstats
path: root/lib/template
diff options
context:
space:
mode:
authorGeorg Ehrke <developer@georgehrke.com>2013-08-14 20:56:44 +0200
committerGeorg Ehrke <developer@georgehrke.com>2013-08-14 20:56:44 +0200
commit4b5fb08c2cda4a13a1b81699f308d21b89f1723b (patch)
treea1f40bb6c6bcaf4e9093c2153d0a32fefecf2b79 /lib/template
parente5761d90ef223a04205ad93eea7706439ef0b60e (diff)
parent994537a5b94826294e61231768f27964bc736ced (diff)
downloadnextcloud-server-4b5fb08c2cda4a13a1b81699f308d21b89f1723b.tar.gz
nextcloud-server-4b5fb08c2cda4a13a1b81699f308d21b89f1723b.zip
Merge master into oc_preview
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 a892e310362..501f8081bff 100644
--- a/lib/template/functions.php
+++ b/lib/template/functions.php
@@ -94,15 +94,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'); }
}