]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Translated first page of exported article
authorNicolas Lœuillet <nicolas@loeuillet.org>
Sun, 8 Oct 2017 06:55:30 +0000 (08:55 +0200)
committerJeremy Benoist <jeremy.benoist@gmail.com>
Wed, 11 Oct 2017 08:43:19 +0000 (10:43 +0200)
14 files changed:
src/Wallabag/CoreBundle/Helper/EntriesExport.php
src/Wallabag/CoreBundle/Resources/config/services.yml
src/Wallabag/CoreBundle/Resources/translations/messages.da.yml
src/Wallabag/CoreBundle/Resources/translations/messages.de.yml
src/Wallabag/CoreBundle/Resources/translations/messages.en.yml
src/Wallabag/CoreBundle/Resources/translations/messages.es.yml
src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml
src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml
src/Wallabag/CoreBundle/Resources/translations/messages.it.yml
src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml
src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml
src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml
src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml
src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml

index 838b97342eb171ed8ee671f75b70549720e7ee32..3e1cd5220fd846f45a1917f28cc8b484306822f2 100644 (file)
@@ -8,6 +8,7 @@ use JMS\Serializer\SerializerBuilder;
 use PHPePub\Core\EPub;
 use PHPePub\Core\Structure\OPF\DublinCore;
 use Symfony\Component\HttpFoundation\Response;
+use Symfony\Component\Translation\TranslatorInterface;
 use Wallabag\CoreBundle\Entity\Entry;
 
 /**
@@ -17,6 +18,7 @@ class EntriesExport
 {
     private $wallabagUrl;
     private $logoPath;
+    private $translator;
     private $title = '';
     private $entries = [];
     private $author = 'wallabag';
@@ -30,10 +32,11 @@ class EntriesExport
      * @param string $wallabagUrl Wallabag instance url
      * @param string $logoPath    Path to the logo FROM THE BUNDLE SCOPE
      */
-    public function __construct($wallabagUrl, $logoPath)
+    public function __construct($wallabagUrl, $logoPath, TranslatorInterface $translator)
     {
         $this->wallabagUrl = $wallabagUrl;
         $this->logoPath = $logoPath;
+        $this->translator = $translator;
     }
 
     /**
@@ -451,7 +454,9 @@ class EntriesExport
      */
     private function getExportInformation($type)
     {
-        $info = str_replace('%EXPORT_METHOD%', $type, $this->footerTemplate);
+        $info = $this->translator->trans('export.footer_template', [
+            '%method%' => $type,
+        ]);
 
         if ('tcpdf' === $type) {
             return str_replace('%IMAGE%', '<img src="' . $this->logoPath . '" />', $info);
index e09b0f1859ceb972a6e3561c9e79de5a96c3d81a..6f8c47e17128914b17ae3c2c056937d4df2c70c1 100644 (file)
@@ -134,6 +134,7 @@ services:
         arguments:
             - '%domain_name%'
             - src/Wallabag/CoreBundle/Resources/public/themes/_global/img/appicon/apple-touch-icon-152.png
+            - "@translator"
 
     wallabag.operator.array.matches:
         class: Wallabag\CoreBundle\Operator\PHP\Matches
index 5e5bbde2f0a4739043cdf7176753858ed5381def..d0a38f7e3b25b6321f59f72fa1b39d2b5d697fbe 100644 (file)
@@ -397,6 +397,9 @@ tag:
         # add: 'Add'
         # placeholder: 'You can add several tags, separated by a comma.'
 
+# export:
+#     footer_template: '<div style="text-align:center;"><p>Produced by wallabag with %method%</p><p>Please open <a href="https://github.com/wallabag/wallabag/issues">an issue</a> if you have trouble with the display of this E-Book on your device.</p></div>'
+
 import:
     # page_title: 'Import'
     # page_description: 'Welcome to wallabag importer. Please select your previous service that you want to migrate.'
index 360bf57163c4b88334978d88dc67c218156ba68e..158762a97b6a2d7a57b6f5f7e2beb1d84792d2f9 100644 (file)
@@ -397,6 +397,9 @@ tag:
         add: 'Hinzufügen'
         placeholder: 'Du kannst verschiedene Tags, getrennt von einem Komma, hinzufügen.'
 
+export:
+    footer_template: '<div style="text-align:center;"><p>Generiert von wallabag mit Hilfe von %method%</p><p>Bitte öffne <a href="https://github.com/wallabag/wallabag/issues">ein Ticket</a> wenn du ein Problem mit der Darstellung von diesem E-Book auf deinem Gerät hast.</p></div>'
+
 import:
     page_title: 'Importieren'
     page_description: 'Willkommen beim wallabag-Importer. Wähle deinen vorherigen Service aus, von dem du die Daten migrieren willst.'
index f41a7c8532ef08b4ac0decbfdb2b0f5bb7b5f527..de3e11fe27bd1b1994f0141a6dabd6091f0a5344 100644 (file)
@@ -397,6 +397,9 @@ tag:
         add: 'Add'
         placeholder: 'You can add several tags, separated by a comma.'
 
+export:
+    footer_template: '<div style="text-align:center;"><p>Produced by wallabag with %method%</p><p>Please open <a href="https://github.com/wallabag/wallabag/issues">an issue</a> if you have trouble with the display of this E-Book on your device.</p></div>'
+
 import:
     page_title: 'Import'
     page_description: 'Welcome to wallabag importer. Please select your previous service from which you want to migrate.'
index ea4d84ba51d20380169a4f00ad12eba5164a8102..6dfc1525e2892130bb47f020910b7cf160ba824a 100644 (file)
@@ -397,6 +397,9 @@ tag:
         add: 'Añadir'
         placeholder: 'Puedes añadir varias etiquetas, separadas por una coma.'
 
+# export:
+#     footer_template: '<div style="text-align:center;"><p>Produced by wallabag with %method%</p><p>Please open <a href="https://github.com/wallabag/wallabag/issues">an issue</a> if you have trouble with the display of this E-Book on your device.</p></div>'
+
 import:
     page_title: 'Importar'
     page_description: 'Bienvenido a la herramienta de importación de wallabag. Seleccione el servicio desde el que desea migrar.'
index 11047e830029833611751804625f9c7610e2065d..ffc48933a09378d6146b848471d2f4764cb97e1e 100644 (file)
@@ -397,6 +397,9 @@ tag:
         # add: 'Add'
         # placeholder: 'You can add several tags, separated by a comma.'
 
+# export:
+#     footer_template: '<div style="text-align:center;"><p>Produced by wallabag with %method%</p><p>Please open <a href="https://github.com/wallabag/wallabag/issues">an issue</a> if you have trouble with the display of this E-Book on your device.</p></div>'
+
 import:
     page_title: 'درون‌ریزی'
     page_description: 'به درون‌ریز wallabag خوش آمدید. لطفاً سرویس قبلی خود را که می‌خواهید از آن مهاجرت کنید انتخاب کنید.'
index 246add86de7db9754439b7cc0c1cabb2489431dc..c9d95e2bcdc6708e0f95b5762e946bb8f5eccc9b 100644 (file)
@@ -397,6 +397,9 @@ tag:
         add: "Ajouter"
         placeholder: "Vous pouvez ajouter plusieurs tags, séparés par une virgule."
 
+export:
+    footer_template: '<div style="text-align:center;"><p>Généré par wallabag with %method%</p><p>Merci d''ouvrir <a href="https://github.com/wallabag/wallabag/issues">un ticket</a> si vous rencontrez des soucis d''affichage avec ce document sur votre support.</p></div>'
+
 import:
     page_title: "Importer"
     page_description: "Bienvenue dans l’outil de migration de wallabag. Choisissez ci-dessous le service depuis lequel vous souhaitez migrer."
index 0de8bed7fec5807d8ad5c2be645217bc7ec8205a..c53266ca360fc548d9ac873d4b991a75b0b68218 100644 (file)
@@ -397,6 +397,9 @@ tag:
         add: 'Aggiungi'
         placeholder: 'Puoi aggiungere varie etichette, separate da una virgola.'
 
+# export:
+#     footer_template: '<div style="text-align:center;"><p>Produced by wallabag with %method%</p><p>Please open <a href="https://github.com/wallabag/wallabag/issues">an issue</a> if you have trouble with the display of this E-Book on your device.</p></div>'
+
 import:
     page_title: 'Importa'
     page_description: "Benvenuto nell'importatore di wallabag. Seleziona il servizio da cui vuoi trasferire i contenuti."
index 455d47d12f41e2bd0db64dab237fbb1c13a7737a..3ae64c49f73e7f8c69fd0e1660f7ea16a417f3e3 100644 (file)
@@ -397,6 +397,9 @@ tag:
         add: 'Ajustar'
         placeholder: "Podètz ajustar mai qu'una etiqueta, separadas per de virgula."
 
+# export:
+#     footer_template: '<div style="text-align:center;"><p>Produced by wallabag with %method%</p><p>Please open <a href="https://github.com/wallabag/wallabag/issues">an issue</a> if you have trouble with the display of this E-Book on your device.</p></div>'
+
 import:
     page_title: 'Importar'
     page_description: "Benvenguda sus l'aisina de migracion de wallabag. Causissètz çai-jos lo servici dempuèi lo qual volètz migrar."
index c8e6cf6c78ea578eb27f1d0b7b08dfa093a092d5..70e15c70b2d43761c1cd1d042f7e3266411033d1 100644 (file)
@@ -397,6 +397,9 @@ tag:
         add: 'Dodaj'
         placeholder: 'Możesz dodać kilka tagów, oddzielając je przecinkami.'
 
+# export:
+#     footer_template: '<div style="text-align:center;"><p>Produced by wallabag with %method%</p><p>Please open <a href="https://github.com/wallabag/wallabag/issues">an issue</a> if you have trouble with the display of this E-Book on your device.</p></div>'
+
 import:
     page_title: 'Import'
     page_description: 'Witaj w importerze Wallabag. Wybierz swoją poprzednią usługę, z której chcesz migrować.'
index 5c1ae0584470324b088cf8c115fbf1870f9d53eb..9b3fea6b0e1dae9957f138cff2dda6858138f8a7 100644 (file)
@@ -397,6 +397,9 @@ tag:
         # add: 'Add'
         # placeholder: 'You can add several tags, separated by a comma.'
 
+# export:
+#     footer_template: '<div style="text-align:center;"><p>Produced by wallabag with %method%</p><p>Please open <a href="https://github.com/wallabag/wallabag/issues">an issue</a> if you have trouble with the display of this E-Book on your device.</p></div>'
+
 import:
     page_title: 'Importar'
     page_description: 'Bem-vindo ao importador do wallabag. Por favo selecione o serviço do qual deseja migrar.'
index 0d6f5f8e38fd4433052b8c6c91e150480c66196b..673ca183a87273c80bfc95e93201f8938bf3a58a 100644 (file)
@@ -397,6 +397,9 @@ tag:
         # add: 'Add'
         # placeholder: 'You can add several tags, separated by a comma.'
 
+# export:
+#     footer_template: '<div style="text-align:center;"><p>Produced by wallabag with %method%</p><p>Please open <a href="https://github.com/wallabag/wallabag/issues">an issue</a> if you have trouble with the display of this E-Book on your device.</p></div>'
+
 import:
     # page_title: 'Import'
     # page_description: 'Welcome to wallabag importer. Please select your previous service that you want to migrate.'
index 87b5e20043614e15b458a92e03019811f83e35dd..563bc50b05a6d4bc0ffe56fb70c1d1fd87cb34d9 100644 (file)
@@ -395,6 +395,9 @@ tag:
         # add: 'Add'
         # placeholder: 'You can add several tags, separated by a comma.'
 
+# export:
+#     footer_template: '<div style="text-align:center;"><p>Produced by wallabag with %method%</p><p>Please open <a href="https://github.com/wallabag/wallabag/issues">an issue</a> if you have trouble with the display of this E-Book on your device.</p></div>'
+
 import:
     page_title: 'İçe Aktar'
     page_description: 'wallabag içe aktarma aracına hoşgeldiniz. Lütfen içe aktarmak istediğiiz önceki servisinizi seçin.'