X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FImportBundle%2FController%2FWallabagV2Controller.php;h=3e6428a049903c72c094be73df5341feb970565a;hb=4204a06b7726597dc84fe34b39c53f1534a86140;hp=6dcd204a7240a6d15f0fc84f035c4a254e663869;hpb=4f9cf232f8d4d750d39aca83406b8a6d5e17a6c9;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/ImportBundle/Controller/WallabagV2Controller.php b/src/Wallabag/ImportBundle/Controller/WallabagV2Controller.php index 6dcd204a..3e6428a0 100644 --- a/src/Wallabag/ImportBundle/Controller/WallabagV2Controller.php +++ b/src/Wallabag/ImportBundle/Controller/WallabagV2Controller.php @@ -31,11 +31,14 @@ class WallabagV2Controller extends Controller ->setMarkAsRead($markAsRead) ->import(); - $message = 'Import failed, please try again.'; + $message = 'flashes.import.notice.failed'; if (true === $res) { $summary = $wallabag->getSummary(); - $message = 'Import summary: '.$summary['imported'].' imported, '.$summary['skipped'].' already saved.'; + $message = $this->get('translator')->trans('flashes.import.notice.summary', array( + '%imported%' => $summary['imported'], + '%skipped%' => $summary['skipped'], + )); unlink($this->getParameter('wallabag_import.resource_dir').'/'.$name); } @@ -49,7 +52,7 @@ class WallabagV2Controller extends Controller } else { $this->get('session')->getFlashBag()->add( 'notice', - 'Error while processing import. Please verify your import file.' + 'flashes.import.notice.failed_on_file' ); } }