Fix translation for graph time selection and display
This commit is contained in:
@@ -100,6 +100,18 @@ angular.module('Application').filter('prettyDiskSize', function () {
|
||||
return function (size, fallback) { return prettyByteSize(size, fallback) || 'Not available yet'; };
|
||||
});
|
||||
|
||||
angular.module('Application').filter('trKeyFromPeriod', function () {
|
||||
return function (period) {
|
||||
if (period === 6) return 'app.graphs.period.6h';
|
||||
if (period === 12) return 'app.graphs.period.12h';
|
||||
if (period === 24) return 'app.graphs.period.24h';
|
||||
if (period === 24*7) return 'app.graphs.period.7d';
|
||||
if (period === 24*30) return 'app.graphs.period.30d';
|
||||
|
||||
return '';
|
||||
};
|
||||
});
|
||||
|
||||
angular.module('Application').filter('prettyDate', function () {
|
||||
// http://ejohn.org/files/pretty.js
|
||||
return function prettyDate(utc) {
|
||||
|
||||
Reference in New Issue
Block a user