mirror of
https://github.com/wallabag/wallabag.git
synced 2025-07-12 16:58:37 +00:00
Add flashes messages
This commit is contained in:
parent
4f9cf232f8
commit
4204a06b77
11 changed files with 94 additions and 40 deletions
|
@ -52,8 +52,9 @@ class PocketController extends Controller
|
|||
*/
|
||||
public function callbackAction()
|
||||
{
|
||||
$message = 'Import failed, please try again.';
|
||||
$message = 'flashes.import.notice.failed';
|
||||
$pocket = $this->get('wallabag_import.pocket.import');
|
||||
|
||||
$markAsRead = $this->get('session')->get('mark_as_read');
|
||||
$this->get('session')->remove('mark_as_read');
|
||||
|
||||
|
@ -69,7 +70,10 @@ class PocketController extends Controller
|
|||
|
||||
if (true === $pocket->setMarkAsRead($markAsRead)->import()) {
|
||||
$summary = $pocket->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'],
|
||||
));
|
||||
}
|
||||
|
||||
$this->get('session')->getFlashBag()->add(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue