Skip to content

Commit

Permalink
fix(acp): #9009 no-users-browsing untranslated on dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
psychobunny committed Nov 30, 2020
1 parent 9004319 commit 286243c
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions public/src/admin/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -500,10 +500,14 @@ define('admin/dashboard', ['Chart', 'translator', 'benchpress'], function (Chart

function updateTopicsGraph(topics) {
if (!topics.length) {
topics = [{
title: '[[admin/dashboard:no-users-browsing]]',
count: 1,
}];
translator.translate('[[admin/dashboard:no-users-browsing]]', function (translated) {
topics = [{
title: translated,
count: 1,
}];
updateTopicsGraph(topics);
});
return;
}

graphs.topics.data.labels = [];
Expand Down

0 comments on commit 286243c

Please sign in to comment.