From b1428a1cf8cad5002b51d97271da66c67aa3638a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nicolas=20L=C5=93uillet?= Date: Sun, 8 Oct 2017 08:55:30 +0200 Subject: [PATCH] Translated first page of exported article --- src/Wallabag/CoreBundle/Helper/EntriesExport.php | 9 +++++++-- src/Wallabag/CoreBundle/Resources/config/services.yml | 1 + .../CoreBundle/Resources/translations/messages.da.yml | 3 +++ .../CoreBundle/Resources/translations/messages.de.yml | 3 +++ .../CoreBundle/Resources/translations/messages.en.yml | 3 +++ .../CoreBundle/Resources/translations/messages.es.yml | 3 +++ .../CoreBundle/Resources/translations/messages.fa.yml | 3 +++ .../CoreBundle/Resources/translations/messages.fr.yml | 3 +++ .../CoreBundle/Resources/translations/messages.it.yml | 3 +++ .../CoreBundle/Resources/translations/messages.oc.yml | 3 +++ .../CoreBundle/Resources/translations/messages.pl.yml | 3 +++ .../CoreBundle/Resources/translations/messages.pt.yml | 3 +++ .../CoreBundle/Resources/translations/messages.ro.yml | 3 +++ .../CoreBundle/Resources/translations/messages.tr.yml | 3 +++ 14 files changed, 44 insertions(+), 2 deletions(-) diff --git a/src/Wallabag/CoreBundle/Helper/EntriesExport.php b/src/Wallabag/CoreBundle/Helper/EntriesExport.php index 838b9734..3e1cd522 100644 --- a/src/Wallabag/CoreBundle/Helper/EntriesExport.php +++ b/src/Wallabag/CoreBundle/Helper/EntriesExport.php @@ -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%', '', $info); diff --git a/src/Wallabag/CoreBundle/Resources/config/services.yml b/src/Wallabag/CoreBundle/Resources/config/services.yml index e09b0f18..6f8c47e1 100644 --- a/src/Wallabag/CoreBundle/Resources/config/services.yml +++ b/src/Wallabag/CoreBundle/Resources/config/services.yml @@ -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 diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml index 5e5bbde2..d0a38f7e 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml @@ -397,6 +397,9 @@ tag: # add: 'Add' # placeholder: 'You can add several tags, separated by a comma.' +# export: +# footer_template: '

Produced by wallabag with %method%

Please open an issue if you have trouble with the display of this E-Book on your device.

' + import: # page_title: 'Import' # page_description: 'Welcome to wallabag importer. Please select your previous service that you want to migrate.' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml index 360bf571..158762a9 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml @@ -397,6 +397,9 @@ tag: add: 'Hinzufügen' placeholder: 'Du kannst verschiedene Tags, getrennt von einem Komma, hinzufügen.' +export: + footer_template: '

Generiert von wallabag mit Hilfe von %method%

Bitte öffne ein Ticket wenn du ein Problem mit der Darstellung von diesem E-Book auf deinem Gerät hast.

' + import: page_title: 'Importieren' page_description: 'Willkommen beim wallabag-Importer. Wähle deinen vorherigen Service aus, von dem du die Daten migrieren willst.' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml index f41a7c85..de3e11fe 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml @@ -397,6 +397,9 @@ tag: add: 'Add' placeholder: 'You can add several tags, separated by a comma.' +export: + footer_template: '

Produced by wallabag with %method%

Please open an issue if you have trouble with the display of this E-Book on your device.

' + import: page_title: 'Import' page_description: 'Welcome to wallabag importer. Please select your previous service from which you want to migrate.' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml index ea4d84ba..6dfc1525 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml @@ -397,6 +397,9 @@ tag: add: 'Añadir' placeholder: 'Puedes añadir varias etiquetas, separadas por una coma.' +# export: +# footer_template: '

Produced by wallabag with %method%

Please open an issue if you have trouble with the display of this E-Book on your device.

' + import: page_title: 'Importar' page_description: 'Bienvenido a la herramienta de importación de wallabag. Seleccione el servicio desde el que desea migrar.' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml index 11047e83..ffc48933 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml @@ -397,6 +397,9 @@ tag: # add: 'Add' # placeholder: 'You can add several tags, separated by a comma.' +# export: +# footer_template: '

Produced by wallabag with %method%

Please open an issue if you have trouble with the display of this E-Book on your device.

' + import: page_title: 'درون‌ریزی' page_description: 'به درون‌ریز wallabag خوش آمدید. لطفاً سرویس قبلی خود را که می‌خواهید از آن مهاجرت کنید انتخاب کنید.' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml index 246add86..c9d95e2b 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml @@ -397,6 +397,9 @@ tag: add: "Ajouter" placeholder: "Vous pouvez ajouter plusieurs tags, séparés par une virgule." +export: + footer_template: '

Généré par wallabag with %method%

Merci d''ouvrir un ticket si vous rencontrez des soucis d''affichage avec ce document sur votre support.

' + import: page_title: "Importer" page_description: "Bienvenue dans l’outil de migration de wallabag. Choisissez ci-dessous le service depuis lequel vous souhaitez migrer." diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml index 0de8bed7..c53266ca 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml @@ -397,6 +397,9 @@ tag: add: 'Aggiungi' placeholder: 'Puoi aggiungere varie etichette, separate da una virgola.' +# export: +# footer_template: '

Produced by wallabag with %method%

Please open an issue if you have trouble with the display of this E-Book on your device.

' + import: page_title: 'Importa' page_description: "Benvenuto nell'importatore di wallabag. Seleziona il servizio da cui vuoi trasferire i contenuti." diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml index 455d47d1..3ae64c49 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml @@ -397,6 +397,9 @@ tag: add: 'Ajustar' placeholder: "Podètz ajustar mai qu'una etiqueta, separadas per de virgula." +# export: +# footer_template: '

Produced by wallabag with %method%

Please open an issue if you have trouble with the display of this E-Book on your device.

' + 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." diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml index c8e6cf6c..70e15c70 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml @@ -397,6 +397,9 @@ tag: add: 'Dodaj' placeholder: 'Możesz dodać kilka tagów, oddzielając je przecinkami.' +# export: +# footer_template: '

Produced by wallabag with %method%

Please open an issue if you have trouble with the display of this E-Book on your device.

' + import: page_title: 'Import' page_description: 'Witaj w importerze Wallabag. Wybierz swoją poprzednią usługę, z której chcesz migrować.' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml index 5c1ae058..9b3fea6b 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml @@ -397,6 +397,9 @@ tag: # add: 'Add' # placeholder: 'You can add several tags, separated by a comma.' +# export: +# footer_template: '

Produced by wallabag with %method%

Please open an issue if you have trouble with the display of this E-Book on your device.

' + import: page_title: 'Importar' page_description: 'Bem-vindo ao importador do wallabag. Por favo selecione o serviço do qual deseja migrar.' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml index 0d6f5f8e..673ca183 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml @@ -397,6 +397,9 @@ tag: # add: 'Add' # placeholder: 'You can add several tags, separated by a comma.' +# export: +# footer_template: '

Produced by wallabag with %method%

Please open an issue if you have trouble with the display of this E-Book on your device.

' + import: # page_title: 'Import' # page_description: 'Welcome to wallabag importer. Please select your previous service that you want to migrate.' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml index 87b5e200..563bc50b 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml @@ -395,6 +395,9 @@ tag: # add: 'Add' # placeholder: 'You can add several tags, separated by a comma.' +# export: +# footer_template: '

Produced by wallabag with %method%

Please open an issue if you have trouble with the display of this E-Book on your device.

' + 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.' -- 2.41.0