Move translate function so it's accessible from all admin parts. Correctly change $l->translate() calls to it

This commit is contained in:
Flavio Copes
2015-08-14 15:05:33 +02:00
parent e0675355e2
commit b80678c74b
3 changed files with 36 additions and 25 deletions

View File

@@ -118,7 +118,7 @@ class Popularity
$data = array();
foreach ($chart_data as $date => $count) {
$labels[] = self::getGrav()['grav']['language']->translate(['PLUGIN_ADMIN.' . strtoupper(date('D', strtotime($date)))]);
$labels[] = self::getGrav()['grav']['admin']->translate(['PLUGIN_ADMIN.' . strtoupper(date('D', strtotime($date)))]);
$data[] = $count;
}