summaryrefslogtreecommitdiffstats
path: root/files
diff options
context:
space:
mode:
authorMichael Gapczynski <GapczynskiM@gmail.com>2011-08-28 11:44:33 -0400
committerMichael Gapczynski <GapczynskiM@gmail.com>2011-08-28 11:44:33 -0400
commit0c0435615d58d44d5f2d33aa2760f49ce0ca2c1e (patch)
tree62de73f6823f7e7dc1341d4bc10126f291d3b67e /files
parent04eebccc39f974a2df754aa41ffea94c90935f63 (diff)
downloadnextcloud-server-0c0435615d58d44d5f2d33aa2760f49ce0ca2c1e.tar.gz
nextcloud-server-0c0435615d58d44d5f2d33aa2760f49ce0ca2c1e.zip
Support translations for modified date column in files
Diffstat (limited to 'files')
-rw-r--r--files/js/files.js20
1 files changed, 10 insertions, 10 deletions
diff --git a/files/js/files.js b/files/js/files.js
index 82cfc34acc6..5770285cfbd 100644
--- a/files/js/files.js
+++ b/files/js/files.js
@@ -398,19 +398,19 @@ function relative_modified_date(timestamp) {
var diffdays = Math.round(diffhours/24);
var diffmonths = Math.round(diffdays/31);
var diffyears = Math.round(diffdays/365);
- if(timediff < 60) { return 'seconds ago'; }
- else if(timediff < 120) { return '1 minute ago'; }
- else if(timediff < 3600) { return diffminutes+' minutes ago'; }
+ if(timediff < 60) { return t('files','seconds ago'); }
+ else if(timediff < 120) { return '1 '+t('files','minute ago'); }
+ else if(timediff < 3600) { return diffminutes+' '+t('files','minutes ago'); }
//else if($timediff < 7200) { return '1 hour ago'; }
//else if($timediff < 86400) { return $diffhours.' hours ago'; }
- else if(timediff < 86400) { return 'today'; }
- else if(timediff < 172800) { return 'yesterday'; }
- else if(timediff < 2678400) { return diffdays+' days ago'; }
- else if(timediff < 5184000) { return 'last month'; }
+ else if(timediff < 86400) { return t('files','today'); }
+ else if(timediff < 172800) { return t('files','yesterday'); }
+ else if(timediff < 2678400) { return diffdays+' '+t('files','days ago'); }
+ else if(timediff < 5184000) { return t('files','last month'); }
//else if($timediff < 31556926) { return $diffmonths.' months ago'; }
- else if(timediff < 31556926) { return 'months ago'; }
- else if(timediff < 63113852) { return 'last year'; }
- else { return diffyears+' years ago'; }
+ else if(timediff < 31556926) { return t('files','months ago'); }
+ else if(timediff < 63113852) { return t('files','last year'); }
+ else { return diffyears+' '+t('files','years ago'); }
}
function getMimeIcon(mime){