Merge pull request #3372 from wallabag/translate-export-page

Translated first page of exported article
This commit is contained in:
Nicolas Lœuillet 2017-10-11 14:12:49 +02:00 committed by GitHub
commit f44a927530
14 changed files with 47 additions and 8 deletions

View 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,21 +18,20 @@ class EntriesExport
{
private $wallabagUrl;
private $logoPath;
private $translator;
private $title = '';
private $entries = [];
private $author = 'wallabag';
private $language = '';
private $footerTemplate = '<div style="text-align:center;">
<p>Produced by wallabag with %EXPORT_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>';
/**
* @param string $wallabagUrl Wallabag instance url
* @param string $logoPath Path to the logo FROM THE BUNDLE SCOPE
* @param TranslatorInterface $translator Translator service
* @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(TranslatorInterface $translator, $wallabagUrl, $logoPath)
{
$this->translator = $translator;
$this->wallabagUrl = $wallabagUrl;
$this->logoPath = $logoPath;
}
@ -451,7 +451,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);

View file

@ -132,6 +132,7 @@ services:
wallabag_core.helper.entries_export:
class: Wallabag\CoreBundle\Helper\EntriesExport
arguments:
- "@translator"
- '%domain_name%'
- src/Wallabag/CoreBundle/Resources/public/themes/_global/img/appicon/apple-touch-icon-152.png

View 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.'

View 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.'

View 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.'

View 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.'

View 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 خوش آمدید. لطفاً سرویس قبلی خود را که می‌خواهید از آن مهاجرت کنید انتخاب کنید.'

View 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 loutil de migration de wallabag. Choisissez ci-dessous le service depuis lequel vous souhaitez migrer."

View 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."

View 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."

View 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ć.'

View 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.'

View 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.'

View 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.'