]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Added french translations
authorNicolas Lœuillet <nicolas@loeuillet.org>
Tue, 5 Jan 2016 21:38:09 +0000 (22:38 +0100)
committerNicolas Lœuillet <nicolas@loeuillet.org>
Tue, 5 Jan 2016 21:38:09 +0000 (22:38 +0100)
src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml
src/Wallabag/ImportBundle/Import/PocketImport.php
src/Wallabag/ImportBundle/Import/WallabagV1Import.php
src/Wallabag/ImportBundle/Resources/config/services.yml
src/Wallabag/ImportBundle/Resources/views/Import/index.html.twig
src/Wallabag/ImportBundle/Resources/views/Pocket/index.html.twig
src/Wallabag/ImportBundle/Resources/views/WallabagV1/index.html.twig

index 7b10dea11ef2d414c9efbafa5ef3aa0b44a026af..3140091ca25572718c9c08804d35d4c19d9491b6 100644 (file)
@@ -13,6 +13,7 @@ archive: 'Lus'
 all: 'Tous les articles'
 tags: 'Tags'
 config: 'Configuration'
+import: 'Importer'
 howto: 'Aide'
 logout: 'Déconnexion'
 Filtered: 'Articles filtrés'
@@ -128,3 +129,14 @@ Download: 'Télécharger'
 Does this article appear wrong?: "Est-ce que cet article s'affiche mal ?"
 Problems?: 'Un problème ?'
 Edit title: "Modifier le titre"
+
+# Import
+Welcome 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."
+"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."
+"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\"."
+"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."
+Connect to Pocket and import data: Se connecter à Pocket et importer les données.
+Please 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.
+File: Fichier
+Upload file: Importer le fichier
+Import contents: "Importer les contenus"
\ No newline at end of file
index 267c4af5728c6346b3d972a80a0a7af0337619a4..9b82720a9a0eb7aa3c14a992e34d9aa122db1fa3 100644 (file)
@@ -11,6 +11,7 @@ use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInt
 use Wallabag\CoreBundle\Entity\Entry;
 use Wallabag\CoreBundle\Entity\Tag;
 use Wallabag\CoreBundle\Helper\ContentProxy;
+use Symfony\Component\Translation\TranslatorInterface;
 
 class PocketImport implements ImportInterface
 {
@@ -23,14 +24,16 @@ class PocketImport implements ImportInterface
     private $skippedEntries = 0;
     private $importedEntries = 0;
     protected $accessToken;
+    private $translator;
 
-    public function __construct(TokenStorageInterface $tokenStorage, EntityManager $em, ContentProxy $contentProxy, $consumerKey)
+    public function __construct(TokenStorageInterface $tokenStorage, EntityManager $em, ContentProxy $contentProxy, $consumerKey, TranslatorInterface $translator)
     {
         $this->user = $tokenStorage->getToken()->getUser();
         $this->em = $em;
         $this->contentProxy = $contentProxy;
         $this->consumerKey = $consumerKey;
         $this->logger = new NullLogger();
+        $this->translator = $translator;
     }
 
     public function setLogger(LoggerInterface $logger)
@@ -59,7 +62,7 @@ class PocketImport implements ImportInterface
      */
     public function getDescription()
     {
-        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.';
+        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.");
     }
 
     /**
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.');
     }
 
     /**
index e4dde1003b07087ea33e4154833096fc4c737faf..55348ce7b524c18d097143587567fe03428ced04 100644 (file)
@@ -18,6 +18,7 @@ services:
             - "@doctrine.orm.entity_manager"
             - "@wallabag_core.content_proxy"
             - %pocket_consumer_key%
+            - "@translator"
         calls:
             - [ setClient, [ "@wallabag_import.pocket.client" ] ]
             - [ setLogger, [ "@logger" ]]
@@ -28,6 +29,7 @@ services:
         class: Wallabag\ImportBundle\Import\WallabagV1Import
         arguments:
             - "@doctrine.orm.entity_manager"
+            - "@translator"
         calls:
             - [ setLogger, [ "@logger" ]]
         tags:
index 27baa1e37bc31ba970066afe95efa22a971dae5c..1f0addca907dc8044b7fda5b2a6723da6f1cfe7a 100644 (file)
@@ -11,7 +11,7 @@
                     <li>
                         <h5>{{ import.name }}</h5>
                         <blockquote>{{ import.description|raw }}</blockquote>
-                        <p><a class="waves-effect waves-light btn" href="{{ path(import.url) }}">Import contents</a></p>
+                        <p><a class="waves-effect waves-light btn" href="{{ path(import.url) }}">{% trans %}Import contents{% endtrans %}</a></p>
                     </li>
                 {% endfor %}
             </ul>
index 9803896cb0e800c6d2e891793e762cd3d89a8dd0..58053780cba81c7924bce2b6e09bb29752fc7b7c 100644 (file)
@@ -9,7 +9,7 @@
             <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>
             <form method="post" action="{{ path('import_pocket_auth') }}">
                 <button class="btn waves-effect waves-light" type="submit" name="action">
-                    Connect to Pocket and import data
+                    {% trans %}Connect to Pocket and import data{% endtrans %}
                 </button>
             </form>
         </div>
index 23d3e146562aa29923f3be59e87ff11db647a57e..afc5722662f8f2bc4788d63f02122aa36307fb57 100644 (file)
@@ -15,7 +15,7 @@
                             <div class="file-field input-field col s12">
                                 {{ form_errors(form.file) }}
                                 <div class="btn">
-                                    <span>File</span>
+                                    <span>{% trans %}File{% endtrans %}</span>
                                     {{ form_widget(form.file) }}
                                 </div>
                                 <div class="file-path-wrapper">