From ca08d02f2f17c0e4ec0152a701c540f62713a428 Mon Sep 17 00:00:00 2001
From: Jeremy Benoist
Date: Thu, 3 Nov 2016 15:59:18 +0100
Subject: [PATCH] Add warning message for import + download images
When import isn't async and downloading images is enabled, we warn the user that import can fail.
Also, added missing translations
---
.../CoreBundle/Resources/translations/messages.da.yml | 6 ++++++
.../CoreBundle/Resources/translations/messages.de.yml | 6 ++++++
.../CoreBundle/Resources/translations/messages.en.yml | 2 ++
.../CoreBundle/Resources/translations/messages.es.yml | 6 ++++++
.../CoreBundle/Resources/translations/messages.fa.yml | 7 +++++++
.../CoreBundle/Resources/translations/messages.fr.yml | 6 ++++++
.../CoreBundle/Resources/translations/messages.it.yml | 6 ++++++
.../CoreBundle/Resources/translations/messages.oc.yml | 6 ++++++
.../CoreBundle/Resources/translations/messages.pl.yml | 6 ++++++
.../CoreBundle/Resources/translations/messages.ro.yml | 6 ++++++
.../CoreBundle/Resources/translations/messages.tr.yml | 7 +++++++
.../ImportBundle/Resources/views/Chrome/index.html.twig | 2 ++
.../ImportBundle/Resources/views/Firefox/index.html.twig | 2 ++
.../{_workerEnabled.html.twig => _information.html.twig} | 7 +++++++
.../ImportBundle/Resources/views/Import/index.html.twig | 2 ++
.../Resources/views/Instapaper/index.html.twig | 2 +-
.../ImportBundle/Resources/views/Pocket/index.html.twig | 2 +-
.../Resources/views/Readability/index.html.twig | 2 +-
.../Resources/views/WallabagV1/index.html.twig | 2 +-
19 files changed, 81 insertions(+), 4 deletions(-)
rename src/Wallabag/ImportBundle/Resources/views/Import/{_workerEnabled.html.twig => _information.html.twig} (55%)
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml
index c05955833..87083799d 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml
@@ -367,6 +367,7 @@ import:
# how_to: 'Please select your Readability export and click on the below button to upload and import it.'
worker:
# enabled: "Import is made asynchronously. Once the import task is started, an external worker will handle jobs one at a time. The current service is:"
+ # download_images_warning: "You enabled downloading images for your articles. Combined with classic import it can take ages to proceed (or maybe failed). We strongly recommend to enable asynchronous import to avoid errors."
# firefox:
# page_title: 'Import > Firefox'
# description: "This importer will import all your Firefox bookmarks. Just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file."
@@ -504,3 +505,8 @@ flashes:
notice:
# client_created: 'New client created.'
# client_deleted: 'Client deleted'
+ user:
+ notice:
+ # added: 'User "%username%" added'
+ # updated: 'User "%username%" updated'
+ # deleted: 'User "%username%" deleted'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml
index 0051da2f4..5e5dd996f 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml
@@ -367,6 +367,7 @@ import:
how_to: 'Bitte wähle deinen Readability Export aus und klicke den unteren Button für das Hochladen und Importieren dessen.'
worker:
enabled: "Der Import erfolgt asynchron. Sobald der Import gestartet ist, wird diese Aufgabe extern abgearbeitet. Der aktuelle Service dafür ist:"
+ # download_images_warning: "You enabled downloading images for your articles. Combined with classic import it can take ages to proceed (or maybe failed). We strongly recommend to enable asynchronous import to avoid errors."
firefox:
page_title: 'Aus Firefox importieren'
description: "Dieser Import wird all deine Lesezeichen aus Firefox importieren. Gehe zu deinen Lesezeichen (Strg+Shift+O), dann auf \"Importen und Sichern\", wähle \"Sichern…\". Du erhälst eine .json Datei."
@@ -504,3 +505,8 @@ flashes:
notice:
client_created: 'Neuer Client erstellt.'
client_deleted: 'Client gelöscht'
+ user:
+ notice:
+ # added: 'User "%username%" added'
+ # updated: 'User "%username%" updated'
+ # deleted: 'User "%username%" deleted'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml
index 462be5562..ab56cdb97 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml
@@ -367,6 +367,7 @@ import:
how_to: 'Please select your Readability export and click on the below button to upload and import it.'
worker:
enabled: "Import is made asynchronously. Once the import task is started, an external worker will handle jobs one at a time. The current service is:"
+ download_images_warning: "You enabled downloading images for your articles. Combined with classic import it can take ages to proceed (or maybe failed). We strongly recommend to enable asynchronous import to avoid errors."
firefox:
page_title: 'Import > Firefox'
description: "This importer will import all your Firefox bookmarks. Just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file."
@@ -470,6 +471,7 @@ flashes:
rss_updated: 'RSS information updated'
tagging_rules_updated: 'Tagging rules updated'
tagging_rules_deleted: 'Tagging rule deleted'
+ # user_added: 'User "%username%" added'
rss_token_updated: 'RSS token updated'
annotations_reset: Annotations reset
tags_reset: Tags reset
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml
index cfabe09f2..c852e5b75 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml
@@ -367,6 +367,7 @@ import:
# how_to: 'Please select your Readability export and click on the below button to upload and import it.'
worker:
# enabled: "Import is made asynchronously. Once the import task is started, an external worker will handle jobs one at a time. The current service is:"
+ # download_images_warning: "You enabled downloading images for your articles. Combined with classic import it can take ages to proceed (or maybe failed). We strongly recommend to enable asynchronous import to avoid errors."
firefox:
page_title: 'Importar > Firefox'
# description: "This importer will import all your Firefox bookmarks. Just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file."
@@ -504,3 +505,8 @@ flashes:
notice:
client_created: 'Nuevo cliente creado.'
client_deleted: 'Cliente suprimido'
+ user:
+ notice:
+ # added: 'User "%username%" added'
+ # updated: 'User "%username%" updated'
+ # deleted: 'User "%username%" deleted'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml
index 07b5bee7c..cf0724509 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml
@@ -284,6 +284,7 @@ quickstart:
paragraph_2: 'ادامه دهید!'
configure:
title: 'برنامه را تنظیم کنید'
+ # description: 'In order to have an application which suits you, have a look into the configuration of wallabag.'
language: 'زبان و نمای برنامه را تغییر دهید'
rss: 'خوراک آر-اس-اس را فعال کنید'
tagging_rules: 'قانونهای برچسبگذاری خودکار مقالههایتان را تعریف کنید'
@@ -366,6 +367,7 @@ import:
# how_to: 'Please select your Readability export and click on the below button to upload and import it.'
worker:
# enabled: "Import is made asynchronously. Once the import task is started, an external worker will handle jobs one at a time. The current service is:"
+ # download_images_warning: "You enabled downloading images for your articles. Combined with classic import it can take ages to proceed (or maybe failed). We strongly recommend to enable asynchronous import to avoid errors."
firefox:
page_title: 'درونریزی > Firefox'
# description: "This importer will import all your Firefox bookmarks. Just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file."
@@ -503,3 +505,8 @@ flashes:
notice:
# client_created: 'New client created.'
# client_deleted: 'Client deleted'
+ user:
+ notice:
+ # added: 'User "%username%" added'
+ # updated: 'User "%username%" updated'
+ # deleted: 'User "%username%" deleted'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml
index db6f9f7e2..c4aa37515 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml
@@ -367,6 +367,7 @@ import:
how_to: "Choisissez le fichier de votre export Readability et cliquez sur le bouton ci-dessous pour l'importer."
worker:
enabled: "Les imports sont asynchrones. Une fois l'import commencé un worker externe traitera les messages un par un. Le service activé est :"
+ download_images_warning: "Vous avez configuré le téléchagement des images pour vos articles. Combiné à l'import classique, cette opération peut être très très longue (voire échouer). Nous vous conseillons vivement d'activer les imports asynchrones."
firefox:
page_title: 'Import > Firefox'
description: "Cet outil va vous permettre d'importer tous vos marques-pages de Firefox. Ouvrez le panneau des marques-pages (Ctrl+Maj+O), puis dans « Importation et sauvegarde », choisissez « Sauvegarde... ». Vous allez récupérer un fichier .json.
"
@@ -504,3 +505,8 @@ flashes:
notice:
client_created: 'Nouveau client %name% créé'
client_deleted: 'Client %name% supprimé'
+ user:
+ notice:
+ added: 'Utilisateur "%username%" ajouté'
+ updated: 'Utilisateur "%username%" mis à jour'
+ deleted: 'Utilisateur "%username%" supprimé'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml
index f1aff51a8..38c780dd3 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml
@@ -367,6 +367,7 @@ import:
# how_to: 'Please select your Readability export and click on the below button to upload and import it.'
worker:
# enabled: "Import is made asynchronously. Once the import task is started, an external worker will handle jobs one at a time. The current service is:"
+ # download_images_warning: "You enabled downloading images for your articles. Combined with classic import it can take ages to proceed (or maybe failed). We strongly recommend to enable asynchronous import to avoid errors."
firefox:
page_title: 'Importa da > Firefox'
# description: "This importer will import all your Firefox bookmarks. Just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file."
@@ -504,3 +505,8 @@ flashes:
notice:
client_created: 'Nuovo client creato.'
client_deleted: 'Client eliminato'
+ user:
+ notice:
+ # added: 'User "%username%" added'
+ # updated: 'User "%username%" updated'
+ # deleted: 'User "%username%" deleted'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml
index e0567d7e1..103ca831e 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml
@@ -367,6 +367,7 @@ import:
how_to: "Mercés de seleccionar vòstre Readability fichièr e de clicar sul boton dejós per lo telecargar e l'importar."
worker:
enabled: "L'importacion se fa de manièra asincròna. Un còp l'importacion lançada, una aisina externa s'ocuparà dels messatges un per un. Lo servici actual es : "
+ # download_images_warning: "You enabled downloading images for your articles. Combined with classic import it can take ages to proceed (or maybe failed). We strongly recommend to enable asynchronous import to avoid errors."
firefox:
page_title: 'Importar > Firefox'
description: "Aquesta aisina importarà totas vòstres favorits de Firefox. Just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file."
@@ -504,3 +505,8 @@ flashes:
notice:
client_created: 'Novèl client creat'
client_deleted: 'Client suprimit'
+ user:
+ notice:
+ # added: 'User "%username%" added'
+ # updated: 'User "%username%" updated'
+ # deleted: 'User "%username%" deleted'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml
index a2989dbda..1680dae0a 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml
@@ -367,6 +367,7 @@ import:
how_to: 'Wybierz swój plik eksportu z Readability i kliknij poniższy przycisk, aby go załadować.'
worker:
enabled: "Import jest wykonywany asynchronicznie. Od momentu rozpoczęcia importu, zewnętrzna usługa może zajmować się na raz tylko jednym zadaniem. Bieżącą usługą jest:"
+ # download_images_warning: "You enabled downloading images for your articles. Combined with classic import it can take ages to proceed (or maybe failed). We strongly recommend to enable asynchronous import to avoid errors."
firefox:
page_title: 'Import > Firefox'
description: "Ten importer zaimportuje wszystkie twoje zakładki z Firefoksa. Idź do twoich zakładek (Ctrl+Shift+O), następnie w \"Import i kopie zapasowe\", wybierz \"Utwórz kopię zapasową...\". Uzyskasz plik .json."
@@ -504,3 +505,8 @@ flashes:
notice:
client_created: 'Nowy klient utworzony.'
client_deleted: 'Klient usunięty'
+ user:
+ notice:
+ # added: 'User "%username%" added'
+ # updated: 'User "%username%" updated'
+ # deleted: 'User "%username%" deleted'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml
index 6e4813e58..16d39188b 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml
@@ -367,6 +367,7 @@ import:
# how_to: 'Please select your Readability export and click on the below button to upload and import it.'
worker:
# enabled: "Import is made asynchronously. Once the import task is started, an external worker will handle jobs one at a time. The current service is:"
+ # download_images_warning: "You enabled downloading images for your articles. Combined with classic import it can take ages to proceed (or maybe failed). We strongly recommend to enable asynchronous import to avoid errors."
# firefox:
# page_title: 'Import > Firefox'
# description: "This importer will import all your Firefox bookmarks. Just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file."
@@ -504,3 +505,8 @@ flashes:
notice:
# client_created: 'New client created.'
# client_deleted: 'Client deleted'
+ user:
+ notice:
+ # added: 'User "%username%" added'
+ # updated: 'User "%username%" updated'
+ # deleted: 'User "%username%" deleted'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml
index 769031023..c9a269ecd 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml
@@ -108,6 +108,7 @@ config:
# if_label: 'if'
# then_tag_as_label: 'then tag as'
# delete_rule_label: 'delete'
+ # edit_rule_label: 'edit'
rule_label: 'Kural'
tags_label: 'Etiketler'
faq:
@@ -366,6 +367,7 @@ import:
# how_to: 'Please select your Readability export and click on the below button to upload and import it.'
worker:
# enabled: "Import is made asynchronously. Once the import task is started, an external worker will handle jobs one at a time. The current service is:"
+ # download_images_warning: "You enabled downloading images for your articles. Combined with classic import it can take ages to proceed (or maybe failed). We strongly recommend to enable asynchronous import to avoid errors."
firefox:
page_title: 'İçe Aktar > Firefox'
# description: "This importer will import all your Firefox bookmarks. Just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file."
@@ -503,3 +505,8 @@ flashes:
notice:
# client_created: 'New client created.'
# client_deleted: 'Client deleted'
+ user:
+ notice:
+ # added: 'User "%username%" added'
+ # updated: 'User "%username%" updated'
+ # deleted: 'User "%username%" deleted'
diff --git a/src/Wallabag/ImportBundle/Resources/views/Chrome/index.html.twig b/src/Wallabag/ImportBundle/Resources/views/Chrome/index.html.twig
index ead828c6e..93b08540f 100644
--- a/src/Wallabag/ImportBundle/Resources/views/Chrome/index.html.twig
+++ b/src/Wallabag/ImportBundle/Resources/views/Chrome/index.html.twig
@@ -6,6 +6,8 @@
+ {% include 'WallabagImportBundle:Import:_information.html.twig' %}
+
{{ import.description|trans|raw }}
{{ 'import.chrome.how_to'|trans }}
diff --git a/src/Wallabag/ImportBundle/Resources/views/Firefox/index.html.twig b/src/Wallabag/ImportBundle/Resources/views/Firefox/index.html.twig
index f975da3fe..ced3f0088 100644
--- a/src/Wallabag/ImportBundle/Resources/views/Firefox/index.html.twig
+++ b/src/Wallabag/ImportBundle/Resources/views/Firefox/index.html.twig
@@ -6,6 +6,8 @@
+ {% include 'WallabagImportBundle:Import:_information.html.twig' %}
+
{{ import.description|trans|raw }}
{{ 'import.firefox.how_to'|trans }}
diff --git a/src/Wallabag/ImportBundle/Resources/views/Import/_workerEnabled.html.twig b/src/Wallabag/ImportBundle/Resources/views/Import/_information.html.twig
similarity index 55%
rename from src/Wallabag/ImportBundle/Resources/views/Import/_workerEnabled.html.twig
rename to src/Wallabag/ImportBundle/Resources/views/Import/_information.html.twig
index 2390a41f8..48bbcfe7d 100644
--- a/src/Wallabag/ImportBundle/Resources/views/Import/_workerEnabled.html.twig
+++ b/src/Wallabag/ImportBundle/Resources/views/Import/_information.html.twig
@@ -1,8 +1,15 @@
{% set redis = craue_setting('import_with_redis') %}
{% set rabbit = craue_setting('import_with_rabbitmq') %}
+{% set downloadImages = craue_setting('download_images_enabled') %}
{% if redis or rabbit %}
{{ 'import.worker.enabled'|trans }} {% if rabbit %}RabbitMQ{% elseif redis %}Redis{% endif %}
{% endif %}
+
+{% if not redis and not rabbit and downloadImages %}
+
+ {{ 'import.worker.download_images_warning'|trans|raw }}
+
+{% endif %}
diff --git a/src/Wallabag/ImportBundle/Resources/views/Import/index.html.twig b/src/Wallabag/ImportBundle/Resources/views/Import/index.html.twig
index 6ea5e0f42..b1ec40a6b 100644
--- a/src/Wallabag/ImportBundle/Resources/views/Import/index.html.twig
+++ b/src/Wallabag/ImportBundle/Resources/views/Import/index.html.twig
@@ -6,6 +6,8 @@
+ {% include 'WallabagImportBundle:Import:_information.html.twig' %}
+
{{ 'import.page_description'|trans }}
{% for import in imports %}
diff --git a/src/Wallabag/ImportBundle/Resources/views/Instapaper/index.html.twig b/src/Wallabag/ImportBundle/Resources/views/Instapaper/index.html.twig
index 5789361f0..28165d190 100644
--- a/src/Wallabag/ImportBundle/Resources/views/Instapaper/index.html.twig
+++ b/src/Wallabag/ImportBundle/Resources/views/Instapaper/index.html.twig
@@ -6,7 +6,7 @@
- {% include 'WallabagImportBundle:Import:_workerEnabled.html.twig' %}
+ {% include 'WallabagImportBundle:Import:_information.html.twig' %}
{{ import.description|trans }}
diff --git a/src/Wallabag/ImportBundle/Resources/views/Pocket/index.html.twig b/src/Wallabag/ImportBundle/Resources/views/Pocket/index.html.twig
index 6195fa073..536e3d1ae 100644
--- a/src/Wallabag/ImportBundle/Resources/views/Pocket/index.html.twig
+++ b/src/Wallabag/ImportBundle/Resources/views/Pocket/index.html.twig
@@ -6,7 +6,7 @@
- {% include 'WallabagImportBundle:Import:_workerEnabled.html.twig' %}
+ {% include 'WallabagImportBundle:Import:_information.html.twig' %}
{% if not has_consumer_key %}
diff --git a/src/Wallabag/ImportBundle/Resources/views/Readability/index.html.twig b/src/Wallabag/ImportBundle/Resources/views/Readability/index.html.twig
index 74653b0f6..737b0adf4 100644
--- a/src/Wallabag/ImportBundle/Resources/views/Readability/index.html.twig
+++ b/src/Wallabag/ImportBundle/Resources/views/Readability/index.html.twig
@@ -6,7 +6,7 @@
- {% include 'WallabagImportBundle:Import:_workerEnabled.html.twig' %}
+ {% include 'WallabagImportBundle:Import:_information.html.twig' %}
{{ import.description|trans }}
diff --git a/src/Wallabag/ImportBundle/Resources/views/WallabagV1/index.html.twig b/src/Wallabag/ImportBundle/Resources/views/WallabagV1/index.html.twig
index 0b19bc347..974b2c73e 100644
--- a/src/Wallabag/ImportBundle/Resources/views/WallabagV1/index.html.twig
+++ b/src/Wallabag/ImportBundle/Resources/views/WallabagV1/index.html.twig
@@ -6,7 +6,7 @@
- {% include 'WallabagImportBundle:Import:_workerEnabled.html.twig' %}
+ {% include 'WallabagImportBundle:Import:_information.html.twig' %}
{{ import.description|trans }}