aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--app/config/services.yml1
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.da.yml3
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.de.yml3
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.en.yml3
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.es.yml3
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml3
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml3
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.it.yml3
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml55
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml3
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml3
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml3
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig15
-rw-r--r--src/Wallabag/CoreBundle/Twig/WallabagExtension.php40
-rw-r--r--tests/Wallabag/CoreBundle/Twig/WallabagExtensionTest.php18
15 files changed, 119 insertions, 40 deletions
diff --git a/app/config/services.yml b/app/config/services.yml
index 76bbce27..a57ef0f3 100644
--- a/app/config/services.yml
+++ b/app/config/services.yml
@@ -21,6 +21,7 @@ services:
21 - "@wallabag_core.tag_repository" 21 - "@wallabag_core.tag_repository"
22 - "@security.token_storage" 22 - "@security.token_storage"
23 - "%wallabag_core.cache_lifetime%" 23 - "%wallabag_core.cache_lifetime%"
24 - "@translator"
24 tags: 25 tags:
25 - { name: twig.extension } 26 - { name: twig.extension }
26 27
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml
index 98ccfb1d..628cdbdb 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml
@@ -45,6 +45,7 @@ footer:
45 # social: 'Social' 45 # social: 'Social'
46 # powered_by: 'powered by' 46 # powered_by: 'powered by'
47 about: 'Om' 47 about: 'Om'
48 # stats: Since %user_creation% you read %nb_archives% articles. That is about %per_day% a day!
48 49
49config: 50config:
50 page_title: 'Opsætning' 51 page_title: 'Opsætning'
@@ -352,7 +353,7 @@ import:
352 # 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:" 353 # 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:"
353 # firefox: 354 # firefox:
354 # page_title: 'Import > Firefox' 355 # page_title: 'Import > Firefox'
355 # description: "This importer will import all your Firefox bookmarks. <p>For Firefox, just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file." 356 # 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."
356 # how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched." 357 # how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched."
357 #chrome: 358 #chrome:
358 # page_title: 'Import > Chrome' 359 # page_title: 'Import > Chrome'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml
index 1dcd7dbe..2e683b8c 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml
@@ -45,6 +45,7 @@ footer:
45 social: 'Soziales' 45 social: 'Soziales'
46 powered_by: 'angetrieben von' 46 powered_by: 'angetrieben von'
47 about: 'Über' 47 about: 'Über'
48 # stats: Since %user_creation% you read %nb_archives% articles. That is about %per_day% a day!
48 49
49config: 50config:
50 page_title: 'Einstellungen' 51 page_title: 'Einstellungen'
@@ -352,7 +353,7 @@ import:
352 # 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:" 353 # 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:"
353 firefox: 354 firefox:
354 page_title: 'Aus Firefox importieren' 355 page_title: 'Aus Firefox importieren'
355 # description: "This importer will import all your Firefox bookmarks. <p>For Firefox, just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file." 356 # 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."
356 # how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched." 357 # how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched."
357 chrome: 358 chrome:
358 page_title: 'Aus Chrome importieren' 359 page_title: 'Aus Chrome importieren'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml
index e75166bf..d629312c 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml
@@ -45,6 +45,7 @@ footer:
45 social: 'Social' 45 social: 'Social'
46 powered_by: 'powered by' 46 powered_by: 'powered by'
47 about: 'About' 47 about: 'About'
48 stats: Since %user_creation% you read %nb_archives% articles. That is about %per_day% a day!
48 49
49config: 50config:
50 page_title: 'Config' 51 page_title: 'Config'
@@ -352,7 +353,7 @@ import:
352 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:" 353 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:"
353 firefox: 354 firefox:
354 page_title: 'Import > Firefox' 355 page_title: 'Import > Firefox'
355 description: "This importer will import all your Firefox bookmarks. <p>For Firefox, just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file." 356 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."
356 how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched." 357 how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched."
357 chrome: 358 chrome:
358 page_title: 'Import > Chrome' 359 page_title: 'Import > Chrome'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml
index 0884e9e6..860c466f 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml
@@ -45,6 +45,7 @@ footer:
45 social: 'Social' 45 social: 'Social'
46 powered_by: 'funciona por' 46 powered_by: 'funciona por'
47 about: 'Acerca de' 47 about: 'Acerca de'
48 # stats: Since %user_creation% you read %nb_archives% articles. That is about %per_day% a day!
48 49
49config: 50config:
50 page_title: 'Configuración' 51 page_title: 'Configuración'
@@ -352,7 +353,7 @@ import:
352 # 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:" 353 # 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:"
353 firefox: 354 firefox:
354 page_title: 'Importar > Firefox' 355 page_title: 'Importar > Firefox'
355 # description: "This importer will import all your Firefox bookmarks. <p>For Firefox, just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file." 356 # 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."
356 # how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched." 357 # how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched."
357 chrome: 358 chrome:
358 page_title: 'Importar > Chrome' 359 page_title: 'Importar > Chrome'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml
index 1d30d5b2..6e02010c 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml
@@ -45,6 +45,7 @@ footer:
45 social: 'شبکه‌های اجتماعی' 45 social: 'شبکه‌های اجتماعی'
46 powered_by: 'توانمند با' 46 powered_by: 'توانمند با'
47 about: 'درباره' 47 about: 'درباره'
48 # stats: Since %user_creation% you read %nb_archives% articles. That is about %per_day% a day!
48 49
49config: 50config:
50 page_title: 'پیکربندی' 51 page_title: 'پیکربندی'
@@ -352,7 +353,7 @@ import:
352 # 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:" 353 # 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:"
353 firefox: 354 firefox:
354 page_title: 'درون‌ریزی > Firefox' 355 page_title: 'درون‌ریزی > Firefox'
355 # description: "This importer will import all your Firefox bookmarks. <p>For Firefox, just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file." 356 # 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."
356 # how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched." 357 # how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched."
357 chrome: 358 chrome:
358 page_title: 'درون‌ریزی > Chrome' 359 page_title: 'درون‌ریزی > Chrome'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml
index c3647731..0eeda011 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml
@@ -45,6 +45,7 @@ footer:
45 social: 'Social' 45 social: 'Social'
46 powered_by: 'propulsé par' 46 powered_by: 'propulsé par'
47 about: 'À propos' 47 about: 'À propos'
48 stats: Depuis le %user_creation% vous avez lu %nb_archives% articles. Ce qui fait %per_day% par jour !
48 49
49config: 50config:
50 page_title: 'Configuration' 51 page_title: 'Configuration'
@@ -352,7 +353,7 @@ import:
352 enabled: "Les imports sont asynchrones. Une fois l'import commencé un worker externe traitera les messages un par un. Le service activé est :" 353 enabled: "Les imports sont asynchrones. Une fois l'import commencé un worker externe traitera les messages un par un. Le service activé est :"
353 firefox: 354 firefox:
354 page_title: 'Import > Firefox' 355 page_title: 'Import > Firefox'
355 description: "Cet outil va vous permettre d'importer tous vos marques-pages de Firefox. <p>Pour 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. </p>" 356 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. </p>"
356 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." 357 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."
357 chrome: 358 chrome:
358 page_title: 'Import > Chrome' 359 page_title: 'Import > Chrome'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml
index 2c99e9a8..34f660f7 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml
@@ -45,6 +45,7 @@ footer:
45 social: 'Social' 45 social: 'Social'
46 powered_by: 'powered by' 46 powered_by: 'powered by'
47 about: 'About' 47 about: 'About'
48 # stats: Since %user_creation% you read %nb_archives% articles. That is about %per_day% a day!
48 49
49config: 50config:
50 page_title: 'Configurazione' 51 page_title: 'Configurazione'
@@ -351,7 +352,7 @@ import:
351 # 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:" 352 # 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:"
352 firefox: 353 firefox:
353 page_title: 'Importa da > Firefox' 354 page_title: 'Importa da > Firefox'
354 # description: "This importer will import all your Firefox bookmarks. <p>For Firefox, just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file." 355 # 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."
355 # how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched." 356 # how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched."
356 chrome: 357 chrome:
357 page_title: 'Importa da > Chrome' 358 page_title: 'Importa da > Chrome'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml
index ebebcbc0..bcc59b29 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml
@@ -19,14 +19,14 @@ menu:
19 unread: 'Pas legits' 19 unread: 'Pas legits'
20 starred: 'Favorits' 20 starred: 'Favorits'
21 archive: 'Legits' 21 archive: 'Legits'
22 all_articles: 'Tots los articles' 22 all_articles: 'Totes los articles'
23 config: 'Configuracion' 23 config: 'Configuracion'
24 tags: 'Etiquetas' 24 tags: 'Etiquetas'
25 internal_settings: 'Configuracion interna' 25 internal_settings: 'Configuracion interna'
26 import: 'Importar' 26 import: 'Importar'
27 howto: 'Ajuda' 27 howto: 'Ajuda'
28 developer: 'Desvolopador' 28 developer: 'Desvolopador'
29 logout: 'Déconnexion' 29 logout: 'Desconnexion'
30 about: 'A prepaus' 30 about: 'A prepaus'
31 search: 'Cercar' 31 search: 'Cercar'
32 save_link: 'Enregistrar un novèl article' 32 save_link: 'Enregistrar un novèl article'
@@ -45,9 +45,10 @@ footer:
45 social: 'Social' 45 social: 'Social'
46 powered_by: 'propulsat per' 46 powered_by: 'propulsat per'
47 about: 'A prepaus' 47 about: 'A prepaus'
48 page_title: 'Configuracion' 48 # stats: Since %user_creation% you read %nb_archives% articles. That is about %per_day% a day!
49 49
50config: 50config:
51 page_title: 'Configuracion'
51 tab_menu: 52 tab_menu:
52 settings: 'Paramètres' 53 settings: 'Paramètres'
53 rss: 'RSS' 54 rss: 'RSS'
@@ -72,8 +73,8 @@ config:
72 form_rss: 73 form_rss:
73 description: "Los fluxes RSS fornits per wallabag vos permeton de legir vòstres articles salvagardats dins vòstre lector de fluxes preferit. Per los poder emplegar, vos cal, d'en primièr crear un geton." 74 description: "Los fluxes RSS fornits per wallabag vos permeton de legir vòstres articles salvagardats dins vòstre lector de fluxes preferit. Per los poder emplegar, vos cal, d'en primièr crear un geton."
74 token_label: 'Geton RSS' 75 token_label: 'Geton RSS'
75 no_token: 'Aucun jeton généré' 76 no_token: 'Pas cap de geton generat'
76 token_create: 'Pas cap de geton generat' 77 token_create: 'Creatz vòstre geton'
77 token_reset: 'Reïnicializatz vòstre geton' 78 token_reset: 'Reïnicializatz vòstre geton'
78 rss_links: 'URL de vòstres fluxes RSS' 79 rss_links: 'URL de vòstres fluxes RSS'
79 rss_link: 80 rss_link:
@@ -188,7 +189,7 @@ entry:
188 re_fetch_content: 'Tornar cargar lo contengut' 189 re_fetch_content: 'Tornar cargar lo contengut'
189 delete: 'Suprimir' 190 delete: 'Suprimir'
190 add_a_tag: 'Ajustar una etiqueta' 191 add_a_tag: 'Ajustar una etiqueta'
191 share_content: 'Partatjar' 192 share_content: 'Partejar'
192 share_email_label: 'Corrièl' 193 share_email_label: 'Corrièl'
193 public_link: 'ligam public' 194 public_link: 'ligam public'
194 delete_public_link: 'suprimir lo ligam public' 195 delete_public_link: 'suprimir lo ligam public'
@@ -225,7 +226,7 @@ about:
225 developped_by: 'Desvolopat per' 226 developped_by: 'Desvolopat per'
226 website: 'Site web' 227 website: 'Site web'
227 many_contributors: 'E un fum de contributors ♥ <a href="https://github.com/wallabag/wallabag/graphs/contributors">sur Github</a>' 228 many_contributors: 'E un fum de contributors ♥ <a href="https://github.com/wallabag/wallabag/graphs/contributors">sur Github</a>'
228 project_website: 'Site web del projète' 229 project_website: 'Site web del projècte'
229 license: 'Licéncia' 230 license: 'Licéncia'
230 version: 'Version' 231 version: 'Version'
231 getting_help: 232 getting_help:
@@ -246,7 +247,7 @@ about:
246 247
247howto: 248howto:
248 page_title: 'Ajuda' 249 page_title: 'Ajuda'
249 page_description: "I a mai d'un biai d'enregistrar un article :" 250 page_description: "I a mai d'un biais d'enregistrar un article :"
250 top_menu: 251 top_menu:
251 browser_addons: 'Extensions de navigator' 252 browser_addons: 'Extensions de navigator'
252 mobile_apps: 'Aplicacions mobil' 253 mobile_apps: 'Aplicacions mobil'
@@ -345,26 +346,26 @@ import:
345 page_title: 'Importar > Wallabag v2' 346 page_title: 'Importar > Wallabag v2'
346 description: "Aquesta aisina importarà totas vòstras donadas d'una instància mai de wallabag v2. Anatz dins totes vòstres articles, puèi, sus la barra laterala, clicatz sus \"JSON\". Traparatz un fichièr \"All articles.json\"" 347 description: "Aquesta aisina importarà totas vòstras donadas d'una instància mai de wallabag v2. Anatz dins totes vòstres articles, puèi, sus la barra laterala, clicatz sus \"JSON\". Traparatz un fichièr \"All articles.json\""
347 readability: 348 readability:
348 page_title: 'Importer > Readability' 349 page_title: 'Importar > Readability'
349 description: "Aquesta aisina importarà totas vòstres articles de Readability. Sus la pagina de l'aisina (https://www.readability.com/tools/), clicatz sus \"Export your data\" dins la seccion \"Data Export\". Recebretz un corrièl per telecargar un json (qu'acaba pas amb un .json de fach)." 350 description: "Aquesta aisina importarà totas vòstres articles de Readability. Sus la pagina de l'aisina (https://www.readability.com/tools/), clicatz sus \"Export your data\" dins la seccion \"Data Export\". Recebretz un corrièl per telecargar un json (qu'acaba pas amb un .json de fach)."
350 how_to: "Mercés de seleccionar vòstre Readability fichièr e de clicar sul boton dejós per lo telecargar e l'importar." 351 how_to: "Mercés de seleccionar vòstre Readability fichièr e de clicar sul boton dejós per lo telecargar e l'importar."
351 worker: 352 worker:
352 # 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:" 353 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 : "
353 firefox: 354 firefox:
354 page_title: 'Importer > Firefox' 355 page_title: 'Importar > Firefox'
355 # description: "This importer will import all your Firefox bookmarks. <p>For Firefox, just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file." 356 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."
356 # how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched." 357 how_to: "Mercés de causir lo fichièr de salvagarda e de clicar sul boton dejós per l'importar. Notatz que lo tractament pòt durar un moment ja que totes los articles an d'èsser recuperats."
357 chrome: 358 chrome:
358 page_title: 'Importer > Chrome' 359 page_title: 'Importar > Chrome'
359 # description: "This importer will import all your Chrome bookmarks. The location of the file depends on your operating system : <ul><li>On Linux, go into the <code>~/.config/chromium/Default/</code> directory</li><li>On Windows, it should be at <code>%LOCALAPPDATA%\\Google\\Chrome\\User Data\\Default</code></li><li>On OS X, it should be at <code>~/Library/Application Support/Google/Chrome/Default/Bookmarks</code></li></ul>Once you got there, copy the Bookmarks file someplace you'll find.<em><br>Note that if you have Chromium instead of Chrome, you'll have to correct paths accordingly.</em></p>" 360 description: "Aquesta aisina importarà totas vòstres favorits de Chrome. L'emplaçament del fichièr depend de vòstre sistèma operatiu : <ul><li>Sus Linux, anatz al dorsièr <code>~/.config/chromium/Default/</code></li><li>Sus Windows, deu èsser dins <code>%LOCALAPPDATA%\\Google\\Chrome\\User Data\\Default</code></li><li>sus OS X, deu èsser dins <code>~/Library/Application Support/Google/Chrome/Default/Bookmarks</code></li></ul>Un còp enlà, copiatz lo fichièr de favorits dins un endrech que volètz.<em><br>Notatz que s'avètz Chromium al lòc de Chrome, vos cal cambiar lo camin segon aquesta situacion.</em></p>"
360 # how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched." 361 how_to: "Mercés de causir lo fichièr de salvagarda e de clicar sul boton dejós per l'importar. Notatz que lo tractament pòt durar un moment ja que totes los articles an d'èsser recuperats."
361 instapaper: 362 instapaper:
362 page_title: 'Importer > Instapaper' 363 page_title: 'Importar > Instapaper'
363 # description: 'This importer will import all your Instapaper articles. On the settings (https://www.instapaper.com/user) page, click on "Download .CSV file" in the "Export" section. A CSV file will be downloaded (like "instapaper-export.csv").' 364 description: "Aquesta aisina importarà totas vòstres articles d'Instapaper. Sus la pagina de paramètres (https://www.instapaper.com/user), clicatz sus \"Download .CSV file\" dins la seccion \"Export\". Un fichièr CSV serà telecargat (aital \"instapaper-export.csv\")."
364 # how_to: 'Please select your Instapaper export and click on the below button to upload and import it.' 365 how_to: "Mercés de causir vòstre fichièr Instapaper e de clicar sul boton dejós per lo telecargar e l'importar"
365 366
366developer: 367developer:
367 page_title: 'Desvolopador' 368 page_title: 'Desvolopaire'
368 welcome_message: "Benvenguda sus l'API de wallabag" 369 welcome_message: "Benvenguda sus l'API de wallabag"
369 documentation: 'Documentacion' 370 documentation: 'Documentacion'
370 how_to_first_app: 'Cossí crear vòstra primièra aplicacion' 371 how_to_first_app: 'Cossí crear vòstra primièra aplicacion'
@@ -388,16 +389,18 @@ developer:
388 page_title: 'Desvlopador > Novèl client' 389 page_title: 'Desvlopador > Novèl client'
389 page_description: "Anatz crear un novèl client. Mercés de cumplir l'url de redireccion cap a vòstra aplicacion." 390 page_description: "Anatz crear un novèl client. Mercés de cumplir l'url de redireccion cap a vòstra aplicacion."
390 form: 391 form:
392 name_label: "Nom del client"
391 redirect_uris_label: 'URLs de redireccion' 393 redirect_uris_label: 'URLs de redireccion'
392 save_label: 'Crear un novèl client' 394 save_label: 'Crear un novèl client'
393 action_back: 'Retorn' 395 action_back: 'Retorn'
394 client_parameter: 396 client_parameter:
395 page_title: 'Desvolopador > Los paramètres de vòstre client' 397 page_title: 'Desvolopador > Los paramètres de vòstre client'
396 page_description: 'Vaquí los paramètres de vòstre client' 398 page_description: 'Vaquí los paramètres de vòstre client'
399 field_name: 'Nom del client'
397 field_id: 'ID Client' 400 field_id: 'ID Client'
398 field_secret: 'Clau secreta' 401 field_secret: 'Clau secreta'
399 back: 'Retour' 402 back: 'Retour'
400 read_howto: 'Legir \"cossí crear ma primièra aplicacion\"' 403 read_howto: 'Legir "cossí crear ma primièra aplicacion"'
401 howto: 404 howto:
402 page_title: 'Desvolopador > Cossí crear ma primièra aplicacion' 405 page_title: 'Desvolopador > Cossí crear ma primièra aplicacion'
403 description: 406 description:
@@ -427,10 +430,10 @@ flashes:
427 notice: 430 notice:
428 entry_already_saved: 'Article ja salvargardat lo %date%' 431 entry_already_saved: 'Article ja salvargardat lo %date%'
429 entry_saved: 'Article enregistrat' 432 entry_saved: 'Article enregistrat'
430 # entry_saved_failed: 'Entry saved but fetching content failed' 433 entry_saved_failed: 'Article salvat mai fracàs de la recuperacion del contengut'
431 entry_updated: 'Article mes a jorn' 434 entry_updated: 'Article mes a jorn'
432 entry_reloaded: 'Article recargat' 435 entry_reloaded: 'Article recargat'
433 # entry_reload_failed: 'Entry reloaded but fetching content failed' 436 entry_reload_failed: "L'article es estat cargat de u mai la recuperacion del contengut a fracassat"
434 entry_archived: 'Article marcat coma legit' 437 entry_archived: 'Article marcat coma legit'
435 entry_unarchived: 'Article marcat coma pas legit' 438 entry_unarchived: 'Article marcat coma pas legit'
436 entry_starred: 'Article apondut dins los favorits' 439 entry_starred: 'Article apondut dins los favorits'
@@ -444,10 +447,10 @@ flashes:
444 failed: "L'importacion a fracassat, mercés de tornar ensajar" 447 failed: "L'importacion a fracassat, mercés de tornar ensajar"
445 failed_on_file: "Errorr pendent du tractament de l'import. Mercés de verificar vòstre fichièr." 448 failed_on_file: "Errorr pendent du tractament de l'import. Mercés de verificar vòstre fichièr."
446 summary: "Rapòrt d'import: %imported% importats, %skipped% ja presents." 449 summary: "Rapòrt d'import: %imported% importats, %skipped% ja presents."
447 # summary_with_queue: 'Import summary: %queued% queued.' 450 summary_with_queue: "Rapòrt d'import : %queued% en espèra de tractament."
448 error: 451 error:
449 # redis_enabled_not_installed: Redis is enabled for handle asynchronous import but it looks like <u>we can't connect to it</u>. Please check Redis configuration. 452 redis_enabled_not_installed: "Redis es capable d'importar de manièra asincròna mai sembla que <u>podèm pas nos conectar amb el</u>. Mercés de verificar la configuracion de Redis."
450 # rabbit_enabled_not_installed: RabbitMQ is enabled for handle asynchronous import but it looks like <u>we can't connect to it</u>. Please check RabbitMQ configuration. 453 rabbit_enabled_not_installed: "RabbitMQ es capable d'importar de manièra asincròna mai sembla que <u>podèm pas nos conectar amb el</u>. Mercés de verificar la configuracion de RabbitMQ."
451 developer: 454 developer:
452 notice: 455 notice:
453 client_created: 'Novèl client creat' 456 client_created: 'Novèl client creat'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml
index 0a76b673..ce5ebab9 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml
@@ -45,6 +45,7 @@ footer:
45 social: 'Społeczność' 45 social: 'Społeczność'
46 powered_by: 'Kontrolowany przez' 46 powered_by: 'Kontrolowany przez'
47 about: 'O nas' 47 about: 'O nas'
48 # stats: Since %user_creation% you read %nb_archives% articles. That is about %per_day% a day!
48 49
49config: 50config:
50 page_title: 'Konfiguracja' 51 page_title: 'Konfiguracja'
@@ -352,7 +353,7 @@ import:
352 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:" 353 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:"
353 firefox: 354 firefox:
354 page_title: 'Import > Firefox' 355 page_title: 'Import > Firefox'
355 description: "Ten importer zaimportuje wszystkie twoje zakładki z Firefoksa. <p>Dla Firefoksa, idź do twoich zakładek (Ctrl+Shift+O), następnie w \"Import i kopie zapasowe\", wybierz \"Utwórz kopię zapasową...\". Uzyskasz plik .json." 356 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."
356 how_to: "Wybierz swój plik z zakładkami i naciśnij poniższy przycisk, aby je zaimportować. Może to zająć dłuższą chwilę, zanim wszystkie artykuły zostaną przeniesione." 357 how_to: "Wybierz swój plik z zakładkami i naciśnij poniższy przycisk, aby je zaimportować. Może to zająć dłuższą chwilę, zanim wszystkie artykuły zostaną przeniesione."
357 chrome: 358 chrome:
358 page_title: 'Import > Chrome' 359 page_title: 'Import > Chrome'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml
index d107a96e..a54efb4c 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml
@@ -45,6 +45,7 @@ footer:
45 # social: 'Social' 45 # social: 'Social'
46 # powered_by: 'powered by' 46 # powered_by: 'powered by'
47 about: 'Despre' 47 about: 'Despre'
48 # stats: Since %user_creation% you read %nb_archives% articles. That is about %per_day% a day!
48 49
49config: 50config:
50 page_title: 'Configurație' 51 page_title: 'Configurație'
@@ -352,7 +353,7 @@ import:
352 # 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:" 353 # 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:"
353 # firefox: 354 # firefox:
354 # page_title: 'Import > Firefox' 355 # page_title: 'Import > Firefox'
355 # description: "This importer will import all your Firefox bookmarks. <p>For Firefox, just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file." 356 # 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."
356 # how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched." 357 # how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched."
357 # chrome: 358 # chrome:
358 # page_title: 'Import > Chrome' 359 # page_title: 'Import > Chrome'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml
index 8bc0c4b9..e46c17c8 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml
@@ -45,6 +45,7 @@ footer:
45 social: 'Sosyal' 45 social: 'Sosyal'
46 powered_by: 'powered by' 46 powered_by: 'powered by'
47 about: 'Hakkımızda' 47 about: 'Hakkımızda'
48 # stats: Since %user_creation% you read %nb_archives% articles. That is about %per_day% a day!
48 49
49config: 50config:
50 page_title: 'Yapılandırma' 51 page_title: 'Yapılandırma'
@@ -351,7 +352,7 @@ import:
351 # 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:" 352 # 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:"
352 firefox: 353 firefox:
353 page_title: 'İçe Aktar > Firefox' 354 page_title: 'İçe Aktar > Firefox'
354 # description: "This importer will import all your Firefox bookmarks. <p>For Firefox, just go to your bookmarks (Ctrl+Maj+O), then into \"Import and backup\", choose \"Backup...\". You will obtain a .json file." 355 # 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."
355 # how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched." 356 # how_to: "Please choose the bookmark backup file and click on the button below to import it. Note that the process may take a long time since all articles have to be fetched."
356 chrome: 357 chrome:
357 page_title: 'İçe Aktar > Chrome' 358 page_title: 'İçe Aktar > Chrome'
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig
index df05e2a4..b2d77c2e 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig
@@ -122,8 +122,19 @@
122 <footer class="page-footer cyan darken-2"> 122 <footer class="page-footer cyan darken-2">
123 <div class="footer-copyright"> 123 <div class="footer-copyright">
124 <div class="container"> 124 <div class="container">
125 <p>{{ 'footer.wallabag.powered_by'|trans }} <a target="_blank" href="https://wallabag.org" class="grey-text text-lighten-4">wallabag</a></p> 125 <div class="row">
126 <a class="grey-text text-lighten-4 right" href="{{ path('about') }}">{{ 'footer.wallabag.about'|trans }}</a> 126 <div class="col s8">
127 <p>
128 {{ display_stats() }}
129 </p>
130 </div>
131 <div class="col s4">
132 <p>
133 {{ 'footer.wallabag.powered_by'|trans }} <a target="_blank" href="https://wallabag.org" class="grey-text text-lighten-4">wallabag</a> –
134 <a class="grey-text text-lighten-4" href="{{ path('about') }}">{{ 'footer.wallabag.about'|trans|lower }}</a>
135 </p>
136 </div>
137 </div>
127 </div> 138 </div>
128 </div> 139 </div>
129 </footer> 140 </footer>
diff --git a/src/Wallabag/CoreBundle/Twig/WallabagExtension.php b/src/Wallabag/CoreBundle/Twig/WallabagExtension.php
index fb4c7412..783cde3e 100644
--- a/src/Wallabag/CoreBundle/Twig/WallabagExtension.php
+++ b/src/Wallabag/CoreBundle/Twig/WallabagExtension.php
@@ -5,6 +5,7 @@ namespace Wallabag\CoreBundle\Twig;
5use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; 5use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
6use Wallabag\CoreBundle\Repository\EntryRepository; 6use Wallabag\CoreBundle\Repository\EntryRepository;
7use Wallabag\CoreBundle\Repository\TagRepository; 7use Wallabag\CoreBundle\Repository\TagRepository;
8use Symfony\Component\Translation\TranslatorInterface;
8 9
9class WallabagExtension extends \Twig_Extension implements \Twig_Extension_GlobalsInterface 10class WallabagExtension extends \Twig_Extension implements \Twig_Extension_GlobalsInterface
10{ 11{
@@ -12,13 +13,15 @@ class WallabagExtension extends \Twig_Extension implements \Twig_Extension_Globa
12 private $entryRepository; 13 private $entryRepository;
13 private $tagRepository; 14 private $tagRepository;
14 private $lifeTime; 15 private $lifeTime;
16 private $translator;
15 17
16 public function __construct(EntryRepository $entryRepository = null, TagRepository $tagRepository = null, TokenStorageInterface $tokenStorage = null, $lifeTime = 0) 18 public function __construct(EntryRepository $entryRepository, TagRepository $tagRepository, TokenStorageInterface $tokenStorage, $lifeTime, TranslatorInterface $translator)
17 { 19 {
18 $this->entryRepository = $entryRepository; 20 $this->entryRepository = $entryRepository;
19 $this->tagRepository = $tagRepository; 21 $this->tagRepository = $tagRepository;
20 $this->tokenStorage = $tokenStorage; 22 $this->tokenStorage = $tokenStorage;
21 $this->lifeTime = $lifeTime; 23 $this->lifeTime = $lifeTime;
24 $this->translator = $translator;
22 } 25 }
23 26
24 public function getFilters() 27 public function getFilters()
@@ -33,6 +36,7 @@ class WallabagExtension extends \Twig_Extension implements \Twig_Extension_Globa
33 return array( 36 return array(
34 new \Twig_SimpleFunction('count_entries', [$this, 'countEntries']), 37 new \Twig_SimpleFunction('count_entries', [$this, 'countEntries']),
35 new \Twig_SimpleFunction('count_tags', [$this, 'countTags']), 38 new \Twig_SimpleFunction('count_tags', [$this, 'countTags']),
39 new \Twig_SimpleFunction('display_stats', [$this, 'displayStats']),
36 ); 40 );
37 } 41 }
38 42
@@ -107,6 +111,40 @@ class WallabagExtension extends \Twig_Extension implements \Twig_Extension_Globa
107 return $this->tagRepository->countAllTags($user->getId()); 111 return $this->tagRepository->countAllTags($user->getId());
108 } 112 }
109 113
114 /**
115 * Display a single line about reading stats.
116 *
117 * @return string
118 */
119 public function displayStats()
120 {
121 $user = $this->tokenStorage->getToken() ? $this->tokenStorage->getToken()->getUser() : null;
122
123 if (null === $user || !is_object($user)) {
124 return 0;
125 }
126
127 $query = $this->entryRepository->getBuilderForArchiveByUser($user->getId())
128 ->select('e.id')
129 ->groupBy('e.id')
130 ->getQuery();
131
132 $query->useQueryCache(true);
133 $query->useResultCache(true);
134 $query->setResultCacheLifetime($this->lifeTime);
135
136 $nbArchives = count($query->getArrayResult());
137
138 $interval = $user->getCreatedAt()->diff(new \DateTime('now'));
139 $nbDays = (int) $interval->format('%a') ?: 1;
140
141 return $this->translator->trans('footer.stats', [
142 '%user_creation%' => $user->getCreatedAt()->format('F jS, Y'),
143 '%nb_archives%' => $nbArchives,
144 '%per_day%' => round($nbArchives / $nbDays, 2),
145 ]);
146 }
147
110 public function getName() 148 public function getName()
111 { 149 {
112 return 'wallabag_extension'; 150 return 'wallabag_extension';
diff --git a/tests/Wallabag/CoreBundle/Twig/WallabagExtensionTest.php b/tests/Wallabag/CoreBundle/Twig/WallabagExtensionTest.php
index 8ec2a75a..b1c8c946 100644
--- a/tests/Wallabag/CoreBundle/Twig/WallabagExtensionTest.php
+++ b/tests/Wallabag/CoreBundle/Twig/WallabagExtensionTest.php
@@ -8,7 +8,23 @@ class WallabagExtensionTest extends \PHPUnit_Framework_TestCase
8{ 8{
9 public function testRemoveWww() 9 public function testRemoveWww()
10 { 10 {
11 $extension = new WallabagExtension(); 11 $entryRepository = $this->getMockBuilder('Wallabag\CoreBundle\Repository\EntryRepository')
12 ->disableOriginalConstructor()
13 ->getMock();
14
15 $tagRepository = $this->getMockBuilder('Wallabag\CoreBundle\Repository\TagRepository')
16 ->disableOriginalConstructor()
17 ->getMock();
18
19 $tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')
20 ->disableOriginalConstructor()
21 ->getMock();
22
23 $translator = $this->getMockBuilder('Symfony\Component\Translation\TranslatorInterface')
24 ->disableOriginalConstructor()
25 ->getMock();
26
27 $extension = new WallabagExtension($entryRepository, $tagRepository, $tokenStorage, 0, $translator);
12 28
13 $this->assertEquals('lemonde.fr', $extension->removeWww('www.lemonde.fr')); 29 $this->assertEquals('lemonde.fr', $extension->removeWww('www.lemonde.fr'));
14 $this->assertEquals('lemonde.fr', $extension->removeWww('lemonde.fr')); 30 $this->assertEquals('lemonde.fr', $extension->removeWww('lemonde.fr'));