From 166e8cc6a92590177cae7a3e898615f9f3c33962 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Thu, 20 Oct 2016 21:14:46 +0200 Subject: Fix french translation --- src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Wallabag') diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml index 55453b6c..75c43583 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml @@ -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`_), 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: -- cgit v1.2.3 From 576d285ddf1c9b4c78124b90fb902d0a57dd2a00 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Thu, 20 Oct 2016 21:16:01 +0200 Subject: Translate date I use a kind of hacky way to convert the user locale (defined with 2 letters, like `fr`) into a local with 5 letters (like `fr_FR`). I guess it should work on most of the case.. --- src/Wallabag/CoreBundle/Twig/WallabagExtension.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/Wallabag') diff --git a/src/Wallabag/CoreBundle/Twig/WallabagExtension.php b/src/Wallabag/CoreBundle/Twig/WallabagExtension.php index 783cde3e..a305c53f 100644 --- a/src/Wallabag/CoreBundle/Twig/WallabagExtension.php +++ b/src/Wallabag/CoreBundle/Twig/WallabagExtension.php @@ -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), ]); -- cgit v1.2.3 From 1e3d74a9cfdaf708632a97660e1811dd819f7df4 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Thu, 20 Oct 2016 21:17:03 +0200 Subject: Avoid RabbitMQ consumer to loop When the `parseEntry` returns null it means the entry already exists in the database. Sending `false` as return, will requeue the message which will then loop forever. --- src/Wallabag/ImportBundle/Consumer/AbstractConsumer.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/Wallabag') diff --git a/src/Wallabag/ImportBundle/Consumer/AbstractConsumer.php b/src/Wallabag/ImportBundle/Consumer/AbstractConsumer.php index 2b85ad76..b893ea29 100644 --- a/src/Wallabag/ImportBundle/Consumer/AbstractConsumer.php +++ b/src/Wallabag/ImportBundle/Consumer/AbstractConsumer.php @@ -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 { -- cgit v1.2.3 From 54535004587693952f4aef5ee5798298f4cda7fa Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Thu, 20 Oct 2016 21:17:45 +0200 Subject: Requeue depending on producer Browser import can requeue message from `parseEntry` but we should take care of the way import are handled (depending on the producer) --- src/Wallabag/ImportBundle/Import/BrowserImport.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/Wallabag') diff --git a/src/Wallabag/ImportBundle/Import/BrowserImport.php b/src/Wallabag/ImportBundle/Import/BrowserImport.php index 9d75685b..2ca1683b 100644 --- a/src/Wallabag/ImportBundle/Import/BrowserImport.php +++ b/src/Wallabag/ImportBundle/Import/BrowserImport.php @@ -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; -- cgit v1.2.3 From 645dc7594b1f4ad1813c68a1153f0d83e6e616c0 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Fri, 21 Oct 2016 07:52:55 +0200 Subject: Fix missing translations --- src/Wallabag/CoreBundle/Resources/translations/messages.da.yml | 3 +++ src/Wallabag/CoreBundle/Resources/translations/messages.de.yml | 3 +++ src/Wallabag/CoreBundle/Resources/translations/messages.en.yml | 3 +++ src/Wallabag/CoreBundle/Resources/translations/messages.es.yml | 3 +++ src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml | 3 +++ src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml | 3 +++ src/Wallabag/CoreBundle/Resources/translations/messages.it.yml | 3 +++ src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml | 3 +++ src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml | 3 +++ src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml | 3 +++ src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml | 3 +++ 11 files changed, 33 insertions(+) (limited to 'src/Wallabag') diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml index bb23b5fe..714ced14 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml @@ -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: diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml index d1df8669..57e49f84 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml @@ -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: diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml index 4a8934b8..4a59c75e 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml @@ -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: diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml index 29f0676e..1b1e0cb1 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml @@ -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: diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml index 074ab7a8..41dc8acf 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml @@ -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: diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml index 75c43583..7fb9681d 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml @@ -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: diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml index 67205c6d..b279ae40 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml @@ -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: diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml index 25e5f05a..a4659620 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml @@ -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: diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml index 392f9c19..798b39c2 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml @@ -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: diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml index 152d5020..21f27e08 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml @@ -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: diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml index a2eca59b..f137ec99 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml @@ -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: -- cgit v1.2.3 From 2cbf0d05d4c342604a46dd7b1ce4c7321e3d97ae Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Fri, 21 Oct 2016 10:45:39 +0200 Subject: Update translation for piwik_host --- src/Wallabag/CoreBundle/Command/InstallCommand.php | 2 +- src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Wallabag') diff --git a/src/Wallabag/CoreBundle/Command/InstallCommand.php b/src/Wallabag/CoreBundle/Command/InstallCommand.php index 8e438229..857a8b4c 100644 --- a/src/Wallabag/CoreBundle/Command/InstallCommand.php +++ b/src/Wallabag/CoreBundle/Command/InstallCommand.php @@ -364,7 +364,7 @@ class InstallCommand extends ContainerAwareCommand ], [ 'name' => 'piwik_host', - 'value' => 'http://v2.wallabag.org', + 'value' => 'v2.wallabag.org', 'section' => 'analytics', ], [ diff --git a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php index 9425f961..a5e1be65 100644 --- a/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php +++ b/src/Wallabag/CoreBundle/DataFixtures/ORM/LoadSettingData.php @@ -122,7 +122,7 @@ class LoadSettingData extends AbstractFixture implements OrderedFixtureInterface ], [ 'name' => 'piwik_host', - 'value' => 'http://v2.wallabag.org', + 'value' => 'v2.wallabag.org', 'section' => 'analytics', ], [ -- cgit v1.2.3 From b64d8f2c9f4092b43da5f4a978028d80d9ee81a8 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Fri, 21 Oct 2016 10:51:20 +0200 Subject: Update Twitter cards description --- .../CoreBundle/Resources/views/themes/common/Entry/share.html.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Wallabag') diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/share.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/share.html.twig index 804adb36..f77264c6 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/share.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/share.html.twig @@ -39,7 +39,7 @@ - +
-- cgit v1.2.3