diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-10-24 12:03:17 +0200 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-10-24 12:03:17 +0200 |
commit | 64a8781e453c40ff144d03405abe2dc1ccfacbe0 (patch) | |
tree | 311473a357e3dedd496e1417293eed9a2a116ad6 /src/Wallabag/CoreBundle/Twig/WallabagExtension.php | |
parent | 9313ea9d440e3f93a6bb2d8c0fb6717364cd27f5 (diff) | |
parent | c64b4941d5222586a82d2c8d6a61969bb9cfe96b (diff) | |
download | wallabag-64a8781e453c40ff144d03405abe2dc1ccfacbe0.tar.gz wallabag-64a8781e453c40ff144d03405abe2dc1ccfacbe0.tar.zst wallabag-64a8781e453c40ff144d03405abe2dc1ccfacbe0.zip |
Merge remote-tracking branch 'origin/master' into 2.2
Diffstat (limited to 'src/Wallabag/CoreBundle/Twig/WallabagExtension.php')
-rw-r--r-- | src/Wallabag/CoreBundle/Twig/WallabagExtension.php | 5 |
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 | ]); |