aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag')
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml12
-rw-r--r--src/Wallabag/ImportBundle/Import/PocketImport.php7
-rw-r--r--src/Wallabag/ImportBundle/Import/WallabagV1Import.php9
-rw-r--r--src/Wallabag/ImportBundle/Resources/config/services.yml2
-rw-r--r--src/Wallabag/ImportBundle/Resources/views/Import/index.html.twig2
-rw-r--r--src/Wallabag/ImportBundle/Resources/views/Pocket/index.html.twig2
-rw-r--r--src/Wallabag/ImportBundle/Resources/views/WallabagV1/index.html.twig2
7 files changed, 28 insertions, 8 deletions
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml
index 7b10dea1..3140091c 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml
@@ -13,6 +13,7 @@ archive: 'Lus'
13all: 'Tous les articles' 13all: 'Tous les articles'
14tags: 'Tags' 14tags: 'Tags'
15config: 'Configuration' 15config: 'Configuration'
16import: 'Importer'
16howto: 'Aide' 17howto: 'Aide'
17logout: 'Déconnexion' 18logout: 'Déconnexion'
18Filtered: 'Articles filtrés' 19Filtered: 'Articles filtrés'
@@ -128,3 +129,14 @@ Download: 'Télécharger'
128Does this article appear wrong?: "Est-ce que cet article s'affiche mal ?" 129Does this article appear wrong?: "Est-ce que cet article s'affiche mal ?"
129Problems?: 'Un problème ?' 130Problems?: 'Un problème ?'
130Edit title: "Modifier le titre" 131Edit title: "Modifier le titre"
132
133# Import
134Welcome on wallabag importer. Please select your previous service that you want to migrate.: "Bienvenue dans l'outil de migration de wallabag. Choisissez ci-dessous le service depuis lequel vous souhaitez migrer."
135"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.": "Cet outil va importer toutes vos données de <a href=\"https://getpocket.com\">Pocket</a>. Pocket ne nous autorise pas à récupérer le contenu depuis leur service, donc wallabag doit reparcourir chaque article pour récupérer son contenu."
136"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.": "Cet outil va importer toutes vos données de wallabag v1. Sur votre page de configuration de wallabag v1, cliquez sur \"Export JSON\" dans la section \"Exporter vos données de wallabag\". Vous allez récupérer un fichier \"wallabag-export-1-xxxx-xx-xx.json\"."
137"You can import your data from your Pocket account. You just have to click on the below button and authorize the application to connect to getpocket.com.": "Vous pouvez importer vos données depuis votre compte Pocket. Vous n'avez qu'à cliquer sur le bouton ci-dessous et à autoriser wallabag à se connecter à getpocket.com."
138Connect to Pocket and import data: Se connecter à Pocket et importer les données.
139Please select your wallabag export and click on the below button to upload and import it.: Choisissez le fichier de votre export wallabag v1 et cliquez sur le bouton ci-dessous pour l'importer.
140File: Fichier
141Upload file: Importer le fichier
142Import contents: "Importer les contenus" \ No newline at end of file
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
11use Wallabag\CoreBundle\Entity\Entry; 11use Wallabag\CoreBundle\Entity\Entry;
12use Wallabag\CoreBundle\Entity\Tag; 12use Wallabag\CoreBundle\Entity\Tag;
13use Wallabag\CoreBundle\Helper\ContentProxy; 13use Wallabag\CoreBundle\Helper\ContentProxy;
14use Symfony\Component\Translation\TranslatorInterface;
14 15
15class PocketImport implements ImportInterface 16class 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 /**
diff --git a/src/Wallabag/ImportBundle/Import/WallabagV1Import.php b/src/Wallabag/ImportBundle/Import/WallabagV1Import.php
index 0866ebe9..68f0574f 100644
--- a/src/Wallabag/ImportBundle/Import/WallabagV1Import.php
+++ b/src/Wallabag/ImportBundle/Import/WallabagV1Import.php
@@ -5,6 +5,7 @@ namespace Wallabag\ImportBundle\Import;
5use Psr\Log\LoggerInterface; 5use Psr\Log\LoggerInterface;
6use Psr\Log\NullLogger; 6use Psr\Log\NullLogger;
7use Doctrine\ORM\EntityManager; 7use Doctrine\ORM\EntityManager;
8use Symfony\Component\Translation\TranslatorInterface;
8use Wallabag\CoreBundle\Entity\Entry; 9use Wallabag\CoreBundle\Entity\Entry;
9use Wallabag\UserBundle\Entity\User; 10use Wallabag\UserBundle\Entity\User;
10use Wallabag\CoreBundle\Tools\Utils; 11use Wallabag\CoreBundle\Tools\Utils;
@@ -17,11 +18,13 @@ class WallabagV1Import implements ImportInterface
17 private $skippedEntries = 0; 18 private $skippedEntries = 0;
18 private $importedEntries = 0; 19 private $importedEntries = 0;
19 private $filepath; 20 private $filepath;
21 private $translator;
20 22
21 public function __construct(EntityManager $em) 23 public function __construct(EntityManager $em, TranslatorInterface $translator)
22 { 24 {
23 $this->em = $em; 25 $this->em = $em;
24 $this->logger = new NullLogger(); 26 $this->logger = new NullLogger();
27 $this->translator = $translator;
25 } 28 }
26 29
27 public function setLogger(LoggerInterface $logger) 30 public function setLogger(LoggerInterface $logger)
@@ -47,7 +50,7 @@ class WallabagV1Import implements ImportInterface
47 */ 50 */
48 public function getName() 51 public function getName()
49 { 52 {
50 return 'Wallabag v1'; 53 return 'wallabag v1';
51 } 54 }
52 55
53 /** 56 /**
@@ -63,7 +66,7 @@ class WallabagV1Import implements ImportInterface
63 */ 66 */
64 public function getDescription() 67 public function getDescription()
65 { 68 {
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.'; 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.');
67 } 70 }
68 71
69 /** 72 /**
diff --git a/src/Wallabag/ImportBundle/Resources/config/services.yml b/src/Wallabag/ImportBundle/Resources/config/services.yml
index e4dde100..55348ce7 100644
--- a/src/Wallabag/ImportBundle/Resources/config/services.yml
+++ b/src/Wallabag/ImportBundle/Resources/config/services.yml
@@ -18,6 +18,7 @@ services:
18 - "@doctrine.orm.entity_manager" 18 - "@doctrine.orm.entity_manager"
19 - "@wallabag_core.content_proxy" 19 - "@wallabag_core.content_proxy"
20 - %pocket_consumer_key% 20 - %pocket_consumer_key%
21 - "@translator"
21 calls: 22 calls:
22 - [ setClient, [ "@wallabag_import.pocket.client" ] ] 23 - [ setClient, [ "@wallabag_import.pocket.client" ] ]
23 - [ setLogger, [ "@logger" ]] 24 - [ setLogger, [ "@logger" ]]
@@ -28,6 +29,7 @@ services:
28 class: Wallabag\ImportBundle\Import\WallabagV1Import 29 class: Wallabag\ImportBundle\Import\WallabagV1Import
29 arguments: 30 arguments:
30 - "@doctrine.orm.entity_manager" 31 - "@doctrine.orm.entity_manager"
32 - "@translator"
31 calls: 33 calls:
32 - [ setLogger, [ "@logger" ]] 34 - [ setLogger, [ "@logger" ]]
33 tags: 35 tags:
diff --git a/src/Wallabag/ImportBundle/Resources/views/Import/index.html.twig b/src/Wallabag/ImportBundle/Resources/views/Import/index.html.twig
index 27baa1e3..1f0addca 100644
--- a/src/Wallabag/ImportBundle/Resources/views/Import/index.html.twig
+++ b/src/Wallabag/ImportBundle/Resources/views/Import/index.html.twig
@@ -11,7 +11,7 @@
11 <li> 11 <li>
12 <h5>{{ import.name }}</h5> 12 <h5>{{ import.name }}</h5>
13 <blockquote>{{ import.description|raw }}</blockquote> 13 <blockquote>{{ import.description|raw }}</blockquote>
14 <p><a class="waves-effect waves-light btn" href="{{ path(import.url) }}">Import contents</a></p> 14 <p><a class="waves-effect waves-light btn" href="{{ path(import.url) }}">{% trans %}Import contents{% endtrans %}</a></p>
15 </li> 15 </li>
16 {% endfor %} 16 {% endfor %}
17 </ul> 17 </ul>
diff --git a/src/Wallabag/ImportBundle/Resources/views/Pocket/index.html.twig b/src/Wallabag/ImportBundle/Resources/views/Pocket/index.html.twig
index 9803896c..58053780 100644
--- a/src/Wallabag/ImportBundle/Resources/views/Pocket/index.html.twig
+++ b/src/Wallabag/ImportBundle/Resources/views/Pocket/index.html.twig
@@ -9,7 +9,7 @@
9 <p>{% trans %}You can import your data from your Pocket account. You just have to click on the below button and authorize the application to connect to getpocket.com.{% endtrans %}</p> 9 <p>{% trans %}You can import your data from your Pocket account. You just have to click on the below button and authorize the application to connect to getpocket.com.{% endtrans %}</p>
10 <form method="post" action="{{ path('import_pocket_auth') }}"> 10 <form method="post" action="{{ path('import_pocket_auth') }}">
11 <button class="btn waves-effect waves-light" type="submit" name="action"> 11 <button class="btn waves-effect waves-light" type="submit" name="action">
12 Connect to Pocket and import data 12 {% trans %}Connect to Pocket and import data{% endtrans %}
13 </button> 13 </button>
14 </form> 14 </form>
15 </div> 15 </div>
diff --git a/src/Wallabag/ImportBundle/Resources/views/WallabagV1/index.html.twig b/src/Wallabag/ImportBundle/Resources/views/WallabagV1/index.html.twig
index 23d3e146..afc57226 100644
--- a/src/Wallabag/ImportBundle/Resources/views/WallabagV1/index.html.twig
+++ b/src/Wallabag/ImportBundle/Resources/views/WallabagV1/index.html.twig
@@ -15,7 +15,7 @@
15 <div class="file-field input-field col s12"> 15 <div class="file-field input-field col s12">
16 {{ form_errors(form.file) }} 16 {{ form_errors(form.file) }}
17 <div class="btn"> 17 <div class="btn">
18 <span>File</span> 18 <span>{% trans %}File{% endtrans %}</span>
19 {{ form_widget(form.file) }} 19 {{ form_widget(form.file) }}
20 </div> 20 </div>
21 <div class="file-path-wrapper"> 21 <div class="file-path-wrapper">