mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
reports don't work when default_locale != en + some missing translations
This commit is contained in:
parent
a5a97f88cd
commit
b97a3c8d34
2 changed files with 10 additions and 2 deletions
|
@ -7,7 +7,7 @@
|
|||
Handlebars.registerHelper('valueAtDaysAgo', function(property, i) {
|
||||
var data = Ember.Handlebars.get(this, property);
|
||||
if( data ) {
|
||||
var wantedDate = Date.create(i + ' days ago').format('{yyyy}-{MM}-{dd}');
|
||||
var wantedDate = Date.create(i + ' days ago', 'en').format('{yyyy}-{MM}-{dd}');
|
||||
var item = data.find( function(d, i, arr) { return d.x === wantedDate; } );
|
||||
if( item ) {
|
||||
return item.y;
|
||||
|
@ -26,7 +26,7 @@ Handlebars.registerHelper('valueAtDaysAgo', function(property, i) {
|
|||
Handlebars.registerHelper('sumLast', function(property, numDays) {
|
||||
var data = Ember.Handlebars.get(this, property);
|
||||
if( data ) {
|
||||
var earliestDate = Date.create(numDays + ' days ago');
|
||||
var earliestDate = Date.create(numDays + ' days ago', 'en');
|
||||
var sum = 0;
|
||||
data.each(function(d){
|
||||
if(Date.create(d.x) >= earliestDate) {
|
||||
|
|
|
@ -245,12 +245,20 @@ en:
|
|||
reports:
|
||||
visits:
|
||||
title: "Users Visits"
|
||||
xaxis: "Day"
|
||||
yaxis: "Number of visits"
|
||||
signups:
|
||||
title: "New Users"
|
||||
xaxis: "Day"
|
||||
yaxis: "Number of new users"
|
||||
topics:
|
||||
title: "New Topics"
|
||||
xaxis: "Day"
|
||||
yaxis: "Number of new topics"
|
||||
posts:
|
||||
title: "New Posts"
|
||||
xaxis: "Day"
|
||||
yaxis: "Number of new posts"
|
||||
|
||||
site_settings:
|
||||
default_locale: "The default language of this Discourse instance (ISO 639-1 Code)"
|
||||
|
|
Loading…
Reference in a new issue