diff options
Diffstat (limited to 'src/Wallabag/ImportBundle/Import/PocketImport.php')
-rw-r--r-- | src/Wallabag/ImportBundle/Import/PocketImport.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Wallabag/ImportBundle/Import/PocketImport.php b/src/Wallabag/ImportBundle/Import/PocketImport.php index 267c4af5..9b82720a 100644 --- a/src/Wallabag/ImportBundle/Import/PocketImport.php +++ b/src/Wallabag/ImportBundle/Import/PocketImport.php | |||
@@ -11,6 +11,7 @@ use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInt | |||
11 | use Wallabag\CoreBundle\Entity\Entry; | 11 | use Wallabag\CoreBundle\Entity\Entry; |
12 | use Wallabag\CoreBundle\Entity\Tag; | 12 | use Wallabag\CoreBundle\Entity\Tag; |
13 | use Wallabag\CoreBundle\Helper\ContentProxy; | 13 | use Wallabag\CoreBundle\Helper\ContentProxy; |
14 | use Symfony\Component\Translation\TranslatorInterface; | ||
14 | 15 | ||
15 | class PocketImport implements ImportInterface | 16 | class PocketImport implements ImportInterface |
16 | { | 17 | { |
@@ -23,14 +24,16 @@ class PocketImport implements ImportInterface | |||
23 | private $skippedEntries = 0; | 24 | private $skippedEntries = 0; |
24 | private $importedEntries = 0; | 25 | private $importedEntries = 0; |
25 | protected $accessToken; | 26 | protected $accessToken; |
27 | private $translator; | ||
26 | 28 | ||
27 | public function __construct(TokenStorageInterface $tokenStorage, EntityManager $em, ContentProxy $contentProxy, $consumerKey) | 29 | public function __construct(TokenStorageInterface $tokenStorage, EntityManager $em, ContentProxy $contentProxy, $consumerKey, TranslatorInterface $translator) |
28 | { | 30 | { |
29 | $this->user = $tokenStorage->getToken()->getUser(); | 31 | $this->user = $tokenStorage->getToken()->getUser(); |
30 | $this->em = $em; | 32 | $this->em = $em; |
31 | $this->contentProxy = $contentProxy; | 33 | $this->contentProxy = $contentProxy; |
32 | $this->consumerKey = $consumerKey; | 34 | $this->consumerKey = $consumerKey; |
33 | $this->logger = new NullLogger(); | 35 | $this->logger = new NullLogger(); |
36 | $this->translator = $translator; | ||
34 | } | 37 | } |
35 | 38 | ||
36 | public function setLogger(LoggerInterface $logger) | 39 | public function setLogger(LoggerInterface $logger) |
@@ -59,7 +62,7 @@ class PocketImport implements ImportInterface | |||
59 | */ | 62 | */ |
60 | public function getDescription() | 63 | public function getDescription() |
61 | { | 64 | { |
62 | return 'This importer will import all your <a href="https://getpocket.com">Pocket</a> data. Pocket doesn\'t allow us to retrieve content from their service, so the readable content of each article will be re-fetched by Wallabag.'; | 65 | return $this->translator->trans("This importer will import all your <a href=\"https://getpocket.com\">Pocket</a> data. Pocket doesn't allow us to retrieve content from their service, so the readable content of each article will be re-fetched by wallabag."); |
63 | } | 66 | } |
64 | 67 | ||
65 | /** | 68 | /** |