aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/Wallabag/CoreBundle/Twig/WallabagExtension.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Wallabag/CoreBundle/Twig/WallabagExtension.php b/src/Wallabag/CoreBundle/Twig/WallabagExtension.php
index 783cde3e..a305c53f 100644
--- a/src/Wallabag/CoreBundle/Twig/WallabagExtension.php
+++ b/src/Wallabag/CoreBundle/Twig/WallabagExtension.php
@@ -138,8 +138,11 @@ class WallabagExtension extends \Twig_Extension implements \Twig_Extension_Globa
138 $interval = $user->getCreatedAt()->diff(new \DateTime('now')); 138 $interval = $user->getCreatedAt()->diff(new \DateTime('now'));
139 $nbDays = (int) $interval->format('%a') ?: 1; 139 $nbDays = (int) $interval->format('%a') ?: 1;
140 140
141 // force setlocale for date translation
142 setlocale(LC_TIME, strtolower($user->getConfig()->getLanguage()).'_'.strtoupper(strtolower($user->getConfig()->getLanguage())));
143
141 return $this->translator->trans('footer.stats', [ 144 return $this->translator->trans('footer.stats', [
142 '%user_creation%' => $user->getCreatedAt()->format('F jS, Y'), 145 '%user_creation%' => strftime('%e %B %Y', $user->getCreatedAt()->getTimestamp()),
143 '%nb_archives%' => $nbArchives, 146 '%nb_archives%' => $nbArchives,
144 '%per_day%' => round($nbArchives / $nbDays, 2), 147 '%per_day%' => round($nbArchives / $nbDays, 2),
145 ]); 148 ]);