]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/ImportBundle/Import/WallabagV1Import.php
Added french translations
[github/wallabag/wallabag.git] / src / Wallabag / ImportBundle / Import / WallabagV1Import.php
index 0866ebe97d532b523de257092dddb7d7b257a410..68f0574fb2005963053539d0c339290efe720601 100644 (file)
@@ -5,6 +5,7 @@ namespace Wallabag\ImportBundle\Import;
 use Psr\Log\LoggerInterface;
 use Psr\Log\NullLogger;
 use Doctrine\ORM\EntityManager;
+use Symfony\Component\Translation\TranslatorInterface;
 use Wallabag\CoreBundle\Entity\Entry;
 use Wallabag\UserBundle\Entity\User;
 use Wallabag\CoreBundle\Tools\Utils;
@@ -17,11 +18,13 @@ class WallabagV1Import implements ImportInterface
     private $skippedEntries = 0;
     private $importedEntries = 0;
     private $filepath;
+    private $translator;
 
-    public function __construct(EntityManager $em)
+    public function __construct(EntityManager $em, TranslatorInterface $translator)
     {
         $this->em = $em;
         $this->logger = new NullLogger();
+        $this->translator = $translator;
     }
 
     public function setLogger(LoggerInterface $logger)
@@ -47,7 +50,7 @@ class WallabagV1Import implements ImportInterface
      */
     public function getName()
     {
-        return 'Wallabag v1';
+        return 'wallabag v1';
     }
 
     /**
@@ -63,7 +66,7 @@ class WallabagV1Import implements ImportInterface
      */
     public function getDescription()
     {
-        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.';
+        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.');
     }
 
     /**