]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Merge pull request #2473 from pmichelazzo/master
authorJeremy Benoist <j0k3r@users.noreply.github.com>
Tue, 25 Oct 2016 09:41:24 +0000 (11:41 +0200)
committerGitHub <noreply@github.com>
Tue, 25 Oct 2016 09:41:24 +0000 (11:41 +0200)
Portuguese (Brazilian) translation

42 files changed:
app/Resources/CraueConfigBundle/translations/CraueConfigBundle.da.yml
app/Resources/CraueConfigBundle/translations/CraueConfigBundle.de.yml
app/Resources/CraueConfigBundle/translations/CraueConfigBundle.en.yml
app/Resources/CraueConfigBundle/translations/CraueConfigBundle.es.yml
app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fa.yml
app/Resources/CraueConfigBundle/translations/CraueConfigBundle.fr.yml
app/Resources/CraueConfigBundle/translations/CraueConfigBundle.it.yml
app/Resources/CraueConfigBundle/translations/CraueConfigBundle.oc.yml
app/Resources/CraueConfigBundle/translations/CraueConfigBundle.pl.yml
app/Resources/CraueConfigBundle/translations/CraueConfigBundle.ro.yml
app/Resources/CraueConfigBundle/translations/CraueConfigBundle.tr.yml
app/config/config.yml
docs/de/index.rst
docs/de/user/backup.rst [new file with mode: 0644]
docs/en/index.rst
docs/en/user/android.rst
docs/en/user/backup.rst [new file with mode: 0644]
docs/fr/index.rst
docs/fr/user/backup.rst [new file with mode: 0644]
src/Wallabag/CoreBundle/Command/InstallCommand.php
src/Wallabag/CoreBundle/Controller/EntryController.php
src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php
src/Wallabag/CoreBundle/DependencyInjection/Configuration.php
src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.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.ro.yml
src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml
src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/share.html.twig
src/Wallabag/CoreBundle/Twig/WallabagExtension.php
src/Wallabag/ImportBundle/Consumer/AbstractConsumer.php
src/Wallabag/ImportBundle/Import/BrowserImport.php
tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php
tests/Wallabag/ImportBundle/Consumer/RedisEntryConsumerTest.php

index 85079330fc7b1063635fd337122ee2e557dcb2d7..3e11d675c35a7534ec85e4ef54443cd59cabe0f2 100644 (file)
@@ -23,7 +23,7 @@ export: "eksport"
 import: "import"
 misc: "misc"
 modify_settings: "Gem ændring"
-piwik_host: Hosting af din side hos Piwik
+piwik_host: Hosting af din side hos Piwik (uden http:// eller https://)
 piwik_site_id: ID for din side hos Piwik
 piwik_enabled: Aktiver Piwik
 demo_mode_enabled: "Aktiver demo-indstilling? (anvendes kun til wallabags offentlige demo)"
index b3412af7fe93106a9de4ae3765ed0bd330bb99f2..c74b5c1ff1f7eb4ea99d981d37aac2710a6c1e28 100644 (file)
@@ -23,7 +23,7 @@ export: "Export"
 import: "Import"
 misc: "Verschiedenes"
 modify_settings: "Übernehmen"
-piwik_host: Host deiner Webseite in Piwik
+piwik_host: Host deiner Webseite in Piwik (ohne http:// oder https://)
 piwik_site_id: ID deiner Webseite in Piwik
 piwik_enabled: Piwik aktivieren
 demo_mode_enabled: "Test-Modus aktivieren? (nur für die öffentliche wallabag-Demo genutzt)"
index 8aaa27e766ed2b26cb2cc515171c82c38c43f5a8..77c09db4333fabcaab863979aa1e3ee3c9a36efa 100644 (file)
@@ -23,7 +23,7 @@ export: "export"
 import: "import"
 misc: "misc"
 modify_settings: "apply"
-piwik_host: Host of your website in Piwik
+piwik_host: Host of your website in Piwik (without http:// ou https://)
 piwik_site_id: ID of your website in Piwik
 piwik_enabled: Enable Piwik
 demo_mode_enabled: "Enable demo mode ? (only used for the wallabag public demo)"
index bf3a79af85225e89bd9d80ebf926dd0ac5acf669..baa838493d62190678426479e016b904dae9470e 100644 (file)
@@ -23,7 +23,7 @@ export: "exportar"
 import: "importar"
 misc: "misc"
 modify_settings: "modificar configuración"
-piwik_host: Host de tu website de Piwik
+piwik_host: Host de tu website de Piwik (sin http:// o https://)
 piwik_site_id: ID de tu website de Piwik
 piwik_enabled: Activar Piwik
 demo_mode_enabled: "Activar modo demo (sólo usado para la demo de wallabag)"
index d86c434333262d2b5a115e7e35b000be338eb165..b394977e2e2c9b00de9684c60fb757cafa7ce073 100644 (file)
@@ -23,7 +23,7 @@ export: "برون‌سپاری"
 import: "درون‌ریزی"
 misc: "غیره"
 modify_settings: "اعمال"
-# piwik_host: Host of your website in Piwik
+# piwik_host: Host of your website in Piwik (without http:// or https://)
 # piwik_site_id: ID of your website in Piwik
 # piwik_enabled: Enable Piwik
 # demo_mode_enabled: "Enable demo mode ? (only used for the wallabag public demo)"
index 5e1ecf26c8a100229c0c5b5112e88a305aa68dd4..31a80880440a379f8d9f6805626d65cfdecf36d7 100644 (file)
@@ -23,7 +23,7 @@ export: "export"
 import: "import"
 misc: "divers"
 modify_settings: "appliquer"
-piwik_host: URL de votre site dans Piwik
+piwik_host: URL de votre site dans Piwik (sans http:// ou https://)
 piwik_site_id: ID de votre site dans Piwik
 piwik_enabled: Activer Piwik
 demo_mode_enabled: "Activer le mode démo ? (utiliser uniquement pour la démo publique de wallabag)"
index 9d820e4bc28f63076e292ebcff889bffb500ded5..ba038556159a9ff4bdef8e9a4b5f41c49895317a 100644 (file)
@@ -23,7 +23,7 @@ export: "esporta"
 import: "importa"
 misc: "misc"
 modify_settings: "applica"
-piwik_host: Host del tuo sito in Piwik
+piwik_host: Host del tuo sito in Piwik (senza http:// o https://)
 piwik_site_id: ID del tuo sito in Piwik
 piwik_enabled: Abilita Piwik
 demo_mode_enabled: "Abilita modalità demo ? (usato solo per la demo pubblica di wallabag)"
index 49dc77326c80884418ca8a5ded7aaf1668bbfe82..55249e33b529e696131bba1db8d8322aeac17d88 100644 (file)
@@ -23,7 +23,7 @@ export: "expòrt"
 import: "impòrt"
 misc: "divèrs"
 modify_settings: "aplicar"
-piwik_host: URL de vòstre site dins Piwik
+piwik_host: URL de vòstre site dins Piwik (sense http:// o https://)
 piwik_site_id: ID de vòstre site dins Piwik
 piwik_enabled: Activar Piwik
 demo_mode_enabled: "Activar lo mode demostracion ? (utilizar solament per la demostracion publica de wallabag)"
index 7432b0a797f801fea2794e0d6f6a0a4dc2b966c1..42cc5b5253ba1e381fc89f29c158a72fbd14601c 100644 (file)
@@ -23,7 +23,7 @@ export: "eksport"
 import: "import"
 misc: "różne"
 modify_settings: "zatwierdz"
-piwik_host: Host twojej strony Piwik
+piwik_host: Host twojej strony Piwik (bez http:// lub https://)
 piwik_site_id: ID twojej strony Piwik
 piwik_enabled: Włacz Piwik
 demo_mode_enabled: "Włacz tryb demo? (używany wyłącznie dla publicznej demonstracji Wallabag)"
index 20d664f7ec4b975d30d4e737c05695db395e1e6e..8e72b95555c161950a55d4475592e630a097273e 100644 (file)
@@ -23,7 +23,7 @@ export: "exportă"
 import: "importă"
 misc: "diverse"
 modify_settings: "aplică"
-# piwik_host: Host of your website in Piwik
+# piwik_host: Host of your website in Piwik (without http:// or https://)
 # piwik_site_id: ID of your website in Piwik
 # piwik_enabled: Enable Piwik
 # demo_mode_enabled: "Enable demo mode ? (only used for the wallabag public demo)"
index 4b4d3edb9abe0086fa3416ec464bc733f2f98ffe..55f70843397c754843bf061b9aadbed247f2891a 100644 (file)
@@ -23,7 +23,7 @@
 # import: "import"
 # misc: "misc"
 # modify_settings: "apply"
-# piwik_host: Host of your website in Piwik
+# piwik_host: Host of your website in Piwik (without http:// or https://)
 # piwik_site_id: ID of your website in Piwik
 # piwik_enabled: Enable Piwik
 # demo_mode_enabled: "Enable demo mode ? (only used for the wallabag public demo)"
index 0b4494d3d87e7f227f93c9f13377ab7a4a446b4c..81d1728a3b9193b3c08d75bb6a3eb366f6235c30 100644 (file)
@@ -51,6 +51,8 @@ wallabag_core:
     rss_limit: 50
     reading_speed: 1
     cache_lifetime: 10
+    fetching_error_message: |
+        wallabag can't retrieve contents for this article. Please <a href="http://doc.wallabag.org/en/master/user/errors_during_fetching.html#how-can-i-help-to-fix-that">troubleshoot this issue</a>.
 
 wallabag_user:
     registration_enabled: "%fosuser_registration%"
index a380d7bdd54eb0728fb0b658da4c2f33a66f1a8b..b422bf831f29ce4d594a8a58167ce2d7bb7d5108 100644 (file)
@@ -45,6 +45,7 @@ Die Dokumentation ist in anderen Sprachen verfügbar :
    user/tags
    user/android
    user/parameters
+   user/backup
 
 .. _dev-docs:
 
diff --git a/docs/de/user/backup.rst b/docs/de/user/backup.rst
new file mode 100644 (file)
index 0000000..ffe3ce3
--- /dev/null
@@ -0,0 +1,25 @@
+wallabag sichern
+================
+Da es manchmal vorkommen kann, dass dir ein Fehler mit deiner wallabag unterläuft und du Daten verlierst oder deine wallabag auf einen anderen Server verschieben willst, ist eine Sicherung der Daten sicher ratsam.
+Dieser Artikel beschreibt, was du für die Sicherung benötigst.
+
+Grundlegende Einstellungen
+--------------------------
+wallabag speichert grundlegende Parameter (etwa der SMTP-Server oder das Datenbank-Backend) in der Datei `app/config/parameters.yml`.
+
+Datenbank
+---------
+Da wallabag verschiedene Datenbank-Typen unterstützt, hängt der Weg der Sicherung von dem verwendeten Typ ab. Daher verweisen wir an dieser Stelle auf die entsprechenden Dokumentationen:
+
+Hier sind einige Beispiele:
+
+- MySQL: http://dev.mysql.com/doc/refman/5.7/en/backup-methods.html
+- PostgreSQL: https://www.postgresql.org/docs/current/static/backup.html
+
+SQLite
+~~~~~~
+Um die SQLite-Datenbank zu sichern, ist es lediglich notwendig, das Verzeichnis `data/db` aus dem wallabag-Installations-Ordner zu kopieren.
+
+Bilder
+------
+Die Bilder, die von wallabag empfangen worden, sind unter `data/assets/images` gespeichert (der Bilder-Speicher wird in wallabag 2.2 implementiert).
index 6d85db2ba903b3ac8565d43420a8863871ab62f0..0ead261b1f9120997a276bc50b9c6c71f05a0c9c 100644 (file)
@@ -46,6 +46,7 @@ The documentation is available in other languages:
    user/tags
    user/android
    user/parameters
+   user/backup
 
 .. _dev-docs:
 
index ccbad264260201150fcebae0b5fcb6908bcdc213..91dcb2fc07db491d64773ad88334b488c598045c 100644 (file)
@@ -79,7 +79,7 @@ Known limitations
 2FA
 ~~~
 
-Currently the does not support two-factor authentication. You should disable that to get the app working.
+Currently the Android application does not support two-factor authentication. You should disable that to get the application working.
 
 
 Limited amount of articles with wallabag v2
diff --git a/docs/en/user/backup.rst b/docs/en/user/backup.rst
new file mode 100644 (file)
index 0000000..5172100
--- /dev/null
@@ -0,0 +1,25 @@
+Backup wallabag
+===============
+Because sometimes you may do a mistake with your wallabag and lose data or in case you need to move your wallabag to another server you want to backup your data.
+This articles describes what you need to backup.
+
+Basic settings
+--------------
+wallabag stores some basic parameters (like SMTP server or database backend) in the file `app/config/parameters.yml`.
+
+Database
+--------
+As wallabag supports different kinds of database, the way to perform the backup depends on the database you use, so you need to refer to the vendor documentation.
+
+Here's some examples:
+
+- MySQL: http://dev.mysql.com/doc/refman/5.7/en/backup-methods.html
+- PostgreSQL: https://www.postgresql.org/docs/current/static/backup.html
+
+SQLite
+~~~~~~
+To backup the SQLite database, you just need to copy the directory `data/db` from the wallabag application directory.
+
+Images
+------
+The images retrieved by wallabag are stored under `data/assets/images` (the images storage will be implemented in wallabag 2.2).
index 2a265ff34ffd2455080b1a4b98b74bf277e166b6..dbb8591033b1847a9a5eb392153db4497376aa8a 100644 (file)
@@ -46,6 +46,7 @@ La documentation est disponible dans d'autres langues :
    user/filters
    user/tags
    user/parameters
+   user/backup
 
 .. _dev-docs:
 
diff --git a/docs/fr/user/backup.rst b/docs/fr/user/backup.rst
new file mode 100644 (file)
index 0000000..ec4b1f4
--- /dev/null
@@ -0,0 +1,26 @@
+Sauvegarde de wallabag
+======================
+
+Parce que des fois vous faites des erreurs avec votre installation de wallabag et vous perdez des données ou parce que vous souhaitez migrer votre installation sur un autre serveur, vous souhaitez faire une sauvegarde de vos données.
+Cette documentation décrit ce que vous devez sauvegarder.
+
+Configuration
+-------------
+wallabag stocke quelques paramètres (comme la configuration SMTP ou les infos de bases de données) dans le fichier `app/config/parameters.yml`.
+
+Base de données
+---------------
+Comme wallabag supporte différentes sortes de bases de données, la manière de sauvegarder dépend du type de base de données que vous utilisez, donc vous devez vous en référez à la documentation correspondante.
+
+Quelques exemples :
+
+- MySQL: http://dev.mysql.com/doc/refman/5.7/en/backup-methods.html
+- PostgreSQL: https://www.postgresql.org/docs/current/static/backup.html
+
+SQLite
+~~~~~~
+Pour sauvegarder une base SQLite, vous devez juste copier le répertoire `data/db` de votre installation wallabag.
+
+Images
+------
+Les images sauvegardées par wallabag sont stockées dans `data/assets/images` (le stockage des images sera implémenté dans wallabag 2.2).
index 8e438229f9584d788b299ce51d634939e791eac2..857a8b4cfb2abed26a449d8ee270b8a4b9a224ab 100644 (file)
@@ -364,7 +364,7 @@ class InstallCommand extends ContainerAwareCommand
             ],
             [
                 'name' => 'piwik_host',
-                'value' => 'http://v2.wallabag.org',
+                'value' => 'v2.wallabag.org',
                 'section' => 'analytics',
             ],
             [
index 3b28e635025253a8a7baa1c4eb6ff6c12600aba4..97bb3d12fa3b07afc7ef8a4620e1ae512d946151 100644 (file)
@@ -330,6 +330,15 @@ class EntryController extends Controller
 
         $this->updateEntry($entry, 'entry_reloaded');
 
+        // if refreshing entry failed, don't save it
+        if ($this->getParameter('wallabag_core.fetching_error_message') === $entry->getContent()) {
+            $bag = $this->get('session')->getFlashBag();
+            $bag->clear();
+            $bag->add('notice', 'flashes.entry.notice.entry_reloaded_failed');
+
+            return $this->redirect($this->generateUrl('view', ['id' => $entry->getId()]));
+        }
+
         $em = $this->getDoctrine()->getManager();
         $em->persist($entry);
         $em->flush();
index 9425f961fd9668fa7fc47029405e5fd8eb920607..a5e1be65f402ae5e18511ce3c320892e338aa433 100644 (file)
@@ -122,7 +122,7 @@ class LoadSettingData extends AbstractFixture implements OrderedFixtureInterface
             ],
             [
                 'name' => 'piwik_host',
-                'value' => 'http://v2.wallabag.org',
+                'value' => 'v2.wallabag.org',
                 'section' => 'analytics',
             ],
             [
index d8141eea993ffbb277bf0954407ddeb2d774466e..3a3da0246f2d5869537a4b620fcb80782bcee99d 100644 (file)
@@ -39,6 +39,8 @@ class Configuration implements ConfigurationInterface
                 ->integerNode('cache_lifetime')
                     ->defaultValue(10)
                 ->end()
+                ->scalarNode('fetching_error_message')
+                ->end()
             ->end()
         ;
 
index 0cbde908d0f205f8a2f6e798316c18837866289e..b4992d545066506cf4824d0357977f6dfc08ac2b 100644 (file)
@@ -23,6 +23,7 @@ class WallabagCoreExtension extends Extension
         $container->setParameter('wallabag_core.version', $config['version']);
         $container->setParameter('wallabag_core.paypal_url', $config['paypal_url']);
         $container->setParameter('wallabag_core.cache_lifetime', $config['cache_lifetime']);
+        $container->setParameter('wallabag_core.fetching_error_message', $config['fetching_error_message']);
 
         $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
         $loader->load('services.yml');
index a4b727f42b57d21ef4b3a9eedc881370ecca8cef..614488a64fd92596243a19ba5bea04d81c989c1a 100644 (file)
@@ -40,7 +40,7 @@ services:
         class: Graby\Graby
         arguments:
             -
-                error_message: "wallabag can't retrieve contents for this article. Please report this issue to us."
+                error_message: '%wallabag_core.fetching_error_message%'
                 http_client:
                     user_agents:
                         'lifehacker.com': 'PHP/5.2'
index bb23b5fedfbce9b8090e95aadbd993496faf51c4..714ced14d1a42566a5fdfd933100e75725aadcd8 100644 (file)
@@ -445,6 +445,9 @@ user:
         # delete_confirm: Are you sure?
         # back_to_list: Back to list
 
+error:
+    # page_title: An error occurred
+
 flashes:
     config:
         notice:
index d1df8669b39d74a1bf48eac4f2490745bb52989e..57e49f84ec61330d7ea6087ab8836219fba8c483 100644 (file)
@@ -445,6 +445,9 @@ user:
         delete_confirm: Bist du sicher?
         back_to_list: Zurück zur Liste
 
+error:
+    # page_title: An error occurred
+
 flashes:
     config:
         notice:
index 4a8934b8bac8996481718e4bf9b76bdbc5b84c58..4a59c75eb3c568a786b94c2b09b53e82599f7903 100644 (file)
@@ -445,6 +445,9 @@ user:
         delete_confirm: Are you sure?
         back_to_list: Back to list
 
+error:
+    page_title: An error occurred
+
 flashes:
     config:
         notice:
index 29f0676ee07a91aaaf4f68fc28e9f81776329cee..1b1e0cb1056318d536717774776db5782330b062 100644 (file)
@@ -445,6 +445,9 @@ user:
         # delete_confirm: Are you sure?
         # back_to_list: Back to list
 
+error:
+    # page_title: An error occurred
+
 flashes:
     config:
         notice:
index 074ab7a8981c84666abd240110ff85f03358cc3c..41dc8acf41c9ad963d9e3ca212aaf9f4f8d3636b 100644 (file)
@@ -444,6 +444,9 @@ user:
         # delete_confirm: Are you sure?
         # back_to_list: Back to list
 
+error:
+    # page_title: An error occurred
+
 flashes:
     config:
         notice:
index 55453b6cee7b148faecae1ed2ef6175d161d0d1c..7fb9681d97ed75141bd34400098c5878818f1831 100644 (file)
@@ -365,7 +365,7 @@ import:
         how_to: "Choisissez le fichier de sauvegarde de vos marques-page et cliquez sur le bouton pour l'importer. Soyez avertis que le processus peut prendre un temps assez long car tous les articles doivent être récupérés en ligne."
     instapaper:
         page_title: 'Import > Instapaper'
-        description: 'Sur la page des paramètres (`https://www.instapaper.com/user<https://www.instapaper.com/user>`_), cliquez sur "Download .CSV file" dans la section "Export". Un fichier CSV se téléchargera ("instapaper-export.csv").'
+        description: 'Sur la page des paramètres (https://www.instapaper.com/user), cliquez sur "Download .CSV file" dans la section "Export". Un fichier CSV se téléchargera ("instapaper-export.csv").'
         how_to: "Choisissez le fichier de votre export Instapaper et cliquez sur le bouton ci-dessous pour l'importer."
 
 developer:
@@ -445,6 +445,9 @@ user:
         delete_confirm: Êtes-vous sûr?
         back_to_list: Revenir à la liste
 
+error:
+    page_title: Une erreur est survenue
+
 flashes:
     config:
         notice:
index 67205c6d1694ddec19041f67f85796831e8937b9..b279ae40e056195a38409fc28721c840dd6b5d0c 100644 (file)
@@ -445,6 +445,9 @@ user:
         # delete_confirm: Are you sure?
         # back_to_list: Back to list
 
+error:
+    # page_title: An error occurred
+
 flashes:
     config:
         notice:
index 25e5f05a1b0f1eff2421298d59341fa589dd5ed9..a4659620b31c78a9728419fa3c72145a4daf76bf 100644 (file)
@@ -445,6 +445,9 @@ user:
         # delete_confirm: Are you sure?
         # back_to_list: Back to list
 
+error:
+    # page_title: An error occurred
+
 flashes:
     config:
         notice:
index 392f9c19456cbaf8a5ec746e82321663b522f789..798b39c22ca761f1fdad09fe3edc3555a75e08b8 100644 (file)
@@ -445,6 +445,9 @@ user:
         delete_confirm: Jesteś pewien?
         back_to_list: Powrót do listy
 
+error:
+    # page_title: An error occurred
+
 flashes:
     config:
         notice:
index 152d5020dd517b310d4e5d76f46b7ef7377e1ef6..21f27e0880f4e14ed973bb57ac609abd55121a36 100644 (file)
@@ -445,6 +445,9 @@ user:
         # delete_confirm: Are you sure?
         # back_to_list: Back to list
 
+error:
+    # page_title: An error occurred
+
 flashes:
     config:
         notice:
index a2eca59ba1c8b43f2a7b7e3c5f575ba70e86df8b..f137ec996c321474687dd7e2af40f986fc9cb97a 100644 (file)
@@ -444,6 +444,9 @@ user:
         # delete_confirm: Are you sure?
         # back_to_list: Back to list
 
+error:
+    # page_title: An error occurred
+
 flashes:
     config:
         notice:
index 804adb36283a643c799c6cb9b9106f6dd6990856..f77264c672691df3c1b73f4254615e84e26eccb6 100644 (file)
@@ -39,7 +39,7 @@
         <meta name="twitter:image" content="{{ picturePath }}" />
         <meta name="twitter:site" content="@wallabagapp" />
         <meta name="twitter:title" content="{{ entry.title | raw }}" />
-        <meta name="twitter:description" content="{{ entry.title | raw }}" />
+        <meta name="twitter:description" content="{{ entry.content|striptags|slice(0, 300)|raw }}&hellip;" />
     </head>
     <body>
         <header>
index 783cde3e70897aedb877f45f8ad0562a5b68cc9b..a305c53fc1819a50733746578b9bd30792ab66ef 100644 (file)
@@ -138,8 +138,11 @@ class WallabagExtension extends \Twig_Extension implements \Twig_Extension_Globa
         $interval = $user->getCreatedAt()->diff(new \DateTime('now'));
         $nbDays = (int) $interval->format('%a') ?: 1;
 
+        // force setlocale for date translation
+        setlocale(LC_TIME, strtolower($user->getConfig()->getLanguage()).'_'.strtoupper(strtolower($user->getConfig()->getLanguage())));
+
         return $this->translator->trans('footer.stats', [
-            '%user_creation%' => $user->getCreatedAt()->format('F jS, Y'),
+            '%user_creation%' => strftime('%e %B %Y', $user->getCreatedAt()->getTimestamp()),
             '%nb_archives%' => $nbArchives,
             '%per_day%' => round($nbArchives / $nbDays, 2),
         ]);
index 2b85ad7672324b31f90a68d27da3022469841436..b893ea2956bdb2c07b73a7e518519735d9904b84 100644 (file)
@@ -50,9 +50,10 @@ abstract class AbstractConsumer
         $entry = $this->import->parseEntry($storedEntry);
 
         if (null === $entry) {
-            $this->logger->warning('Unable to parse entry', ['entry' => $storedEntry]);
+            $this->logger->warning('Entry already exists', ['entry' => $storedEntry]);
 
-            return false;
+            // return true to skip message
+            return true;
         }
 
         try {
index 9d75685b74d84aa13c9d90d9672b5893f271f2fd..2ca1683b1688b33ff7c9e203e635b0bb83b09f7a 100644 (file)
@@ -139,12 +139,24 @@ abstract class BrowserImport extends AbstractImport
     public function parseEntry(array $importedEntry)
     {
         if ((!array_key_exists('guid', $importedEntry) || (!array_key_exists('id', $importedEntry))) && is_array(reset($importedEntry))) {
+            if ($this->producer) {
+                $this->parseEntriesForProducer($importedEntry);
+
+                return;
+            }
+
             $this->parseEntries($importedEntry);
 
             return;
         }
 
         if (array_key_exists('children', $importedEntry)) {
+            if ($this->producer) {
+                $this->parseEntriesForProducer($importedEntry['children']);
+
+                return;
+            }
+
             $this->parseEntries($importedEntry['children']);
 
             return;
index 9b03a5193d1c7b8edb6d660f0cb021336061f663..051136503969722f78b7720ab40cc90890efb2b9 100644 (file)
@@ -359,11 +359,49 @@ class EntryControllerTest extends WallabagCoreTestCase
 
         $content = $em
             ->getRepository('WallabagCoreBundle:Entry')
-            ->findByUrlAndUserId($this->url, $this->getLoggedInUserId());
+            ->find($content->getId());
 
         $this->assertNotEmpty($content->getContent());
     }
 
+    /**
+     * @depends testPostNewOk
+     */
+    public function testReloadWithFetchingFailed()
+    {
+        $this->logInAs('admin');
+        $client = $this->getClient();
+
+        $em = $client->getContainer()
+            ->get('doctrine.orm.entity_manager');
+
+        $content = $em
+            ->getRepository('WallabagCoreBundle:Entry')
+            ->findByUrlAndUserId($this->url, $this->getLoggedInUserId());
+
+        // put a known failed url
+        $content->setUrl('http://0.0.0.0/failed.html');
+        $em->persist($content);
+        $em->flush();
+
+        $client->request('GET', '/reload/'.$content->getId());
+
+        $this->assertEquals(302, $client->getResponse()->getStatusCode());
+
+        // force EntityManager to clear previous entity
+        // otherwise, retrieve the same entity will retrieve change from the previous request :0
+        $em->clear();
+        $newContent = $em
+            ->getRepository('WallabagCoreBundle:Entry')
+            ->find($content->getId());
+
+        $newContent->setUrl($this->url);
+        $em->persist($newContent);
+        $em->flush();
+
+        $this->assertNotEquals($client->getContainer()->getParameter('wallabag_core.fetching_error_message'), $newContent->getContent());
+    }
+
     public function testEdit()
     {
         $this->logInAs('admin');
index 5e8ee41d846522cd68b2b84ee6e9428eb22ba86b..01a92ad2a660c8d6fae4884737e02e7f2ccab584 100644 (file)
@@ -219,7 +219,7 @@ JSON;
 
         $res = $consumer->manage($body);
 
-        $this->assertFalse($res);
+        $this->assertTrue($res);
         $this->assertFalse($consumer->isStopJob($body));
     }
 }