diff options
Diffstat (limited to 'src/Wallabag/ImportBundle/Import')
-rw-r--r-- | src/Wallabag/ImportBundle/Import/PocketImport.php | 6 | ||||
-rw-r--r-- | src/Wallabag/ImportBundle/Import/WallabagV1Import.php | 7 |
2 files changed, 4 insertions, 9 deletions
diff --git a/src/Wallabag/ImportBundle/Import/PocketImport.php b/src/Wallabag/ImportBundle/Import/PocketImport.php index 9b82720a..cdcec1e2 100644 --- a/src/Wallabag/ImportBundle/Import/PocketImport.php +++ b/src/Wallabag/ImportBundle/Import/PocketImport.php | |||
@@ -11,7 +11,6 @@ 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; | ||
15 | 14 | ||
16 | class PocketImport implements ImportInterface | 15 | class PocketImport implements ImportInterface |
17 | { | 16 | { |
@@ -26,14 +25,13 @@ class PocketImport implements ImportInterface | |||
26 | protected $accessToken; | 25 | protected $accessToken; |
27 | private $translator; | 26 | private $translator; |
28 | 27 | ||
29 | public function __construct(TokenStorageInterface $tokenStorage, EntityManager $em, ContentProxy $contentProxy, $consumerKey, TranslatorInterface $translator) | 28 | public function __construct(TokenStorageInterface $tokenStorage, EntityManager $em, ContentProxy $contentProxy, $consumerKey) |
30 | { | 29 | { |
31 | $this->user = $tokenStorage->getToken()->getUser(); | 30 | $this->user = $tokenStorage->getToken()->getUser(); |
32 | $this->em = $em; | 31 | $this->em = $em; |
33 | $this->contentProxy = $contentProxy; | 32 | $this->contentProxy = $contentProxy; |
34 | $this->consumerKey = $consumerKey; | 33 | $this->consumerKey = $consumerKey; |
35 | $this->logger = new NullLogger(); | 34 | $this->logger = new NullLogger(); |
36 | $this->translator = $translator; | ||
37 | } | 35 | } |
38 | 36 | ||
39 | public function setLogger(LoggerInterface $logger) | 37 | public function setLogger(LoggerInterface $logger) |
@@ -62,7 +60,7 @@ class PocketImport implements ImportInterface | |||
62 | */ | 60 | */ |
63 | public function getDescription() | 61 | public function getDescription() |
64 | { | 62 | { |
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 | return 'This importer will import all your Pocket 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.'; |
66 | } | 64 | } |
67 | 65 | ||
68 | /** | 66 | /** |
diff --git a/src/Wallabag/ImportBundle/Import/WallabagV1Import.php b/src/Wallabag/ImportBundle/Import/WallabagV1Import.php index 68f0574f..393089d6 100644 --- a/src/Wallabag/ImportBundle/Import/WallabagV1Import.php +++ b/src/Wallabag/ImportBundle/Import/WallabagV1Import.php | |||
@@ -5,7 +5,6 @@ namespace Wallabag\ImportBundle\Import; | |||
5 | use Psr\Log\LoggerInterface; | 5 | use Psr\Log\LoggerInterface; |
6 | use Psr\Log\NullLogger; | 6 | use Psr\Log\NullLogger; |
7 | use Doctrine\ORM\EntityManager; | 7 | use Doctrine\ORM\EntityManager; |
8 | use Symfony\Component\Translation\TranslatorInterface; | ||
9 | use Wallabag\CoreBundle\Entity\Entry; | 8 | use Wallabag\CoreBundle\Entity\Entry; |
10 | use Wallabag\UserBundle\Entity\User; | 9 | use Wallabag\UserBundle\Entity\User; |
11 | use Wallabag\CoreBundle\Tools\Utils; | 10 | use Wallabag\CoreBundle\Tools\Utils; |
@@ -18,13 +17,11 @@ class WallabagV1Import implements ImportInterface | |||
18 | private $skippedEntries = 0; | 17 | private $skippedEntries = 0; |
19 | private $importedEntries = 0; | 18 | private $importedEntries = 0; |
20 | private $filepath; | 19 | private $filepath; |
21 | private $translator; | ||
22 | 20 | ||
23 | public function __construct(EntityManager $em, TranslatorInterface $translator) | 21 | public function __construct(EntityManager $em) |
24 | { | 22 | { |
25 | $this->em = $em; | 23 | $this->em = $em; |
26 | $this->logger = new NullLogger(); | 24 | $this->logger = new NullLogger(); |
27 | $this->translator = $translator; | ||
28 | } | 25 | } |
29 | 26 | ||
30 | public function setLogger(LoggerInterface $logger) | 27 | public function setLogger(LoggerInterface $logger) |
@@ -66,7 +63,7 @@ class WallabagV1Import implements ImportInterface | |||
66 | */ | 63 | */ |
67 | public function getDescription() | 64 | public function getDescription() |
68 | { | 65 | { |
69 | return $this->translator->trans('This importer will import all your wallabag v1 articles. On your config page, click on "JSON export" in the "Export your wallabag data" section. You will have a "wallabag-export-1-xxxx-xx-xx.json" file.'); | 66 | return 'This importer will import all your wallabag v1 articles. On your config page, click on "JSON export" in the "Export your wallabag data" section. You will have a "wallabag-export-1-xxxx-xx-xx.json" file.'; |
70 | } | 67 | } |
71 | 68 | ||
72 | /** | 69 | /** |