summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2013-08-14 10:23:19 -0700
committerJörn Friedrich Dreyer <jfd@butonic.de>2013-08-14 10:23:19 -0700
commit8f3f47e868805078b92334e087b21f07425e8846 (patch)
tree1e4094d9fdadbe76087df00605f571a199de0ae0 /lib
parentb3b2b2d64c626f9c6725be979d200c509b080365 (diff)
parent400249194726e7cf6fc79d5fe7e92ccca8539244 (diff)
downloadnextcloud-server-8f3f47e868805078b92334e087b21f07425e8846.tar.gz
nextcloud-server-8f3f47e868805078b92334e087b21f07425e8846.zip
Merge pull request #4376 from owncloud/use_plurals
Use plural translations
Diffstat (limited to 'lib')
-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'); }
}