mirror of
https://github.com/wallabag/wallabag.git
synced 2024-11-26 11:01:04 +00:00
Translated first page of exported article
This commit is contained in:
parent
d8dc7372ab
commit
b1428a1cf8
14 changed files with 44 additions and 2 deletions
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.'
|
||||
|
|
|
@ -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.'
|
||||
|
|
|
@ -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.'
|
||||
|
|
|
@ -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.'
|
||||
|
|
|
@ -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 خوش آمدید. لطفاً سرویس قبلی خود را که میخواهید از آن مهاجرت کنید انتخاب کنید.'
|
||||
|
|
|
@ -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."
|
||||
|
|
|
@ -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."
|
||||
|
|
|
@ -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."
|
||||
|
|
|
@ -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ć.'
|
||||
|
|
|
@ -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.'
|
||||
|
|
|
@ -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.'
|
||||
|
|
|
@ -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.'
|
||||
|
|
Loading…
Reference in a new issue