aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Wallabag/CoreBundle/Command/InstallCommand.php13
-rw-r--r--src/Wallabag/CoreBundle/Controller/ConfigController.php66
-rw-r--r--src/Wallabag/CoreBundle/Controller/ExceptionController.php40
-rw-r--r--src/Wallabag/CoreBundle/ParamConverter/UsernameRssTokenConverter.php7
-rw-r--r--src/Wallabag/CoreBundle/Resources/config/services.yml17
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.da.yml4
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.de.yml4
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.en.yml4
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.es.yml4
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml4
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml4
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.it.yml4
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml56
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml4
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml4
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml3
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig1
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/baggy/Exception/error.html.twig24
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig3
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/Exception/error.html.twig30
-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--src/Wallabag/UserBundle/EventListener/CreateConfigListener.php (renamed from src/Wallabag/CoreBundle/EventListener/RegistrationConfirmedListener.php)24
-rw-r--r--src/Wallabag/UserBundle/Resources/config/services.yml12
-rw-r--r--src/Wallabag/UserBundle/Resources/views/Registration/check_email.html.twig (renamed from src/Wallabag/UserBundle/Resources/views/Registration/checkEmail.html.twig)0
25 files changed, 304 insertions, 83 deletions
diff --git a/src/Wallabag/CoreBundle/Command/InstallCommand.php b/src/Wallabag/CoreBundle/Command/InstallCommand.php
index 3873d2d3..cc7c2c94 100644
--- a/src/Wallabag/CoreBundle/Command/InstallCommand.php
+++ b/src/Wallabag/CoreBundle/Command/InstallCommand.php
@@ -2,6 +2,8 @@
2 2
3namespace Wallabag\CoreBundle\Command; 3namespace Wallabag\CoreBundle\Command;
4 4
5use FOS\UserBundle\Event\UserEvent;
6use FOS\UserBundle\FOSUserEvents;
5use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; 7use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
6use Symfony\Component\Console\Helper\Table; 8use Symfony\Component\Console\Helper\Table;
7use Symfony\Component\Console\Input\ArrayInput; 9use Symfony\Component\Console\Input\ArrayInput;
@@ -236,14 +238,9 @@ class InstallCommand extends ContainerAwareCommand
236 238
237 $em->persist($user); 239 $em->persist($user);
238 240
239 $config = new Config($user); 241 // dispatch a created event so the associated config will be created
240 $config->setTheme($this->getContainer()->getParameter('wallabag_core.theme')); 242 $event = new UserEvent($user);
241 $config->setItemsPerPage($this->getContainer()->getParameter('wallabag_core.items_on_page')); 243 $this->getContainer()->get('event_dispatcher')->dispatch(FOSUserEvents::USER_CREATED, $event);
242 $config->setRssLimit($this->getContainer()->getParameter('wallabag_core.rss_limit'));
243 $config->setReadingSpeed($this->getContainer()->getParameter('wallabag_core.reading_speed'));
244 $config->setLanguage($this->getContainer()->getParameter('wallabag_core.language'));
245
246 $em->persist($config);
247 244
248 $this->defaultOutput->writeln(''); 245 $this->defaultOutput->writeln('');
249 246
diff --git a/src/Wallabag/CoreBundle/Controller/ConfigController.php b/src/Wallabag/CoreBundle/Controller/ConfigController.php
index 4f75511b..f1e212d9 100644
--- a/src/Wallabag/CoreBundle/Controller/ConfigController.php
+++ b/src/Wallabag/CoreBundle/Controller/ConfigController.php
@@ -2,6 +2,8 @@
2 2
3namespace Wallabag\CoreBundle\Controller; 3namespace Wallabag\CoreBundle\Controller;
4 4
5use FOS\UserBundle\Event\UserEvent;
6use FOS\UserBundle\FOSUserEvents;
5use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; 7use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
6use Symfony\Bundle\FrameworkBundle\Controller\Controller; 8use Symfony\Bundle\FrameworkBundle\Controller\Controller;
7use Symfony\Component\HttpFoundation\JsonResponse; 9use Symfony\Component\HttpFoundation\JsonResponse;
@@ -106,7 +108,21 @@ class ConfigController extends Controller
106 108
107 // handle tagging rule 109 // handle tagging rule
108 $taggingRule = new TaggingRule(); 110 $taggingRule = new TaggingRule();
109 $newTaggingRule = $this->createForm(TaggingRuleType::class, $taggingRule, ['action' => $this->generateUrl('config').'#set5']); 111 $action = $this->generateUrl('config').'#set5';
112
113 if ($request->query->has('tagging-rule')) {
114 $taggingRule = $this->getDoctrine()
115 ->getRepository('WallabagCoreBundle:TaggingRule')
116 ->find($request->query->get('tagging-rule'));
117
118 if ($this->getUser()->getId() !== $taggingRule->getConfig()->getUser()->getId()) {
119 return $this->redirect($action);
120 }
121
122 $action = $this->generateUrl('config').'?tagging-rule='.$taggingRule->getId().'#set5';
123 }
124
125 $newTaggingRule = $this->createForm(TaggingRuleType::class, $taggingRule, ['action' => $action]);
110 $newTaggingRule->handleRequest($request); 126 $newTaggingRule->handleRequest($request);
111 127
112 if ($newTaggingRule->isValid()) { 128 if ($newTaggingRule->isValid()) {
@@ -133,18 +149,11 @@ class ConfigController extends Controller
133 $newUserForm->handleRequest($request); 149 $newUserForm->handleRequest($request);
134 150
135 if ($newUserForm->isValid() && $this->get('security.authorization_checker')->isGranted('ROLE_SUPER_ADMIN')) { 151 if ($newUserForm->isValid() && $this->get('security.authorization_checker')->isGranted('ROLE_SUPER_ADMIN')) {
136 $userManager->updateUser($newUser, true); 152 $userManager->updateUser($newUser);
137
138 $config = new Config($newUser);
139 $config->setTheme($this->getParameter('wallabag_core.theme'));
140 $config->setItemsPerPage($this->getParameter('wallabag_core.items_on_page'));
141 $config->setRssLimit($this->getParameter('wallabag_core.rss_limit'));
142 $config->setLanguage($this->getParameter('wallabag_core.language'));
143 $config->setReadingSpeed($this->getParameter('wallabag_core.reading_speed'));
144 153
145 $em->persist($config); 154 // dispatch a created event so the associated config will be created
146 155 $event = new UserEvent($newUser, $request);
147 $em->flush(); 156 $this->get('event_dispatcher')->dispatch(FOSUserEvents::USER_CREATED, $event);
148 157
149 $this->get('session')->getFlashBag()->add( 158 $this->get('session')->getFlashBag()->add(
150 'notice', 159 'notice',
@@ -210,9 +219,7 @@ class ConfigController extends Controller
210 */ 219 */
211 public function deleteTaggingRuleAction(TaggingRule $rule) 220 public function deleteTaggingRuleAction(TaggingRule $rule)
212 { 221 {
213 if ($this->getUser()->getId() != $rule->getConfig()->getUser()->getId()) { 222 $this->validateRuleAction($rule);
214 throw $this->createAccessDeniedException('You can not access this tagging rule.');
215 }
216 223
217 $em = $this->getDoctrine()->getManager(); 224 $em = $this->getDoctrine()->getManager();
218 $em->remove($rule); 225 $em->remove($rule);
@@ -227,6 +234,34 @@ class ConfigController extends Controller
227 } 234 }
228 235
229 /** 236 /**
237 * Edit a tagging rule.
238 *
239 * @param TaggingRule $rule
240 *
241 * @Route("/tagging-rule/edit/{id}", requirements={"id" = "\d+"}, name="edit_tagging_rule")
242 *
243 * @return RedirectResponse
244 */
245 public function editTaggingRuleAction(TaggingRule $rule)
246 {
247 $this->validateRuleAction($rule);
248
249 return $this->redirect($this->generateUrl('config').'?tagging-rule='.$rule->getId().'#set5');
250 }
251
252 /**
253 * Validate that a rule can be edited/deleted by the current user.
254 *
255 * @param TaggingRule $rule
256 */
257 private function validateRuleAction(TaggingRule $rule)
258 {
259 if ($this->getUser()->getId() != $rule->getConfig()->getUser()->getId()) {
260 throw $this->createAccessDeniedException('You can not access this tagging rule.');
261 }
262 }
263
264 /**
230 * Retrieve config for the current user. 265 * Retrieve config for the current user.
231 * If no config were found, create a new one. 266 * If no config were found, create a new one.
232 * 267 *
@@ -238,6 +273,7 @@ class ConfigController extends Controller
238 ->getRepository('WallabagCoreBundle:Config') 273 ->getRepository('WallabagCoreBundle:Config')
239 ->findOneByUser($this->getUser()); 274 ->findOneByUser($this->getUser());
240 275
276 // should NEVER HAPPEN ...
241 if (!$config) { 277 if (!$config) {
242 $config = new Config($this->getUser()); 278 $config = new Config($this->getUser());
243 } 279 }
diff --git a/src/Wallabag/CoreBundle/Controller/ExceptionController.php b/src/Wallabag/CoreBundle/Controller/ExceptionController.php
new file mode 100644
index 00000000..abfa9c2f
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Controller/ExceptionController.php
@@ -0,0 +1,40 @@
1<?php
2
3namespace Wallabag\CoreBundle\Controller;
4
5use Symfony\Bundle\TwigBundle\Controller\ExceptionController as BaseExceptionController;
6use Symfony\Component\HttpFoundation\Request;
7
8/**
9 * This controller allow us to customize the error template.
10 * The only modified line from the parent template is for "WallabagCoreBundle".
11 */
12class ExceptionController extends BaseExceptionController
13{
14 protected function findTemplate(Request $request, $format, $code, $showException)
15 {
16 $name = $showException ? 'exception' : 'error';
17 if ($showException && 'html' == $format) {
18 $name = 'exception_full';
19 }
20
21 // For error pages, try to find a template for the specific HTTP status code and format
22 if (!$showException) {
23 $template = sprintf('WallabagCoreBundle:Exception:%s.%s.twig', $name, $format);
24 if ($this->templateExists($template)) {
25 return $template;
26 }
27 }
28
29 // try to find a template for the given format
30 $template = sprintf('@Twig/Exception/%s.%s.twig', $name, $format);
31 if ($this->templateExists($template)) {
32 return $template;
33 }
34
35 // default to a generic HTML exception
36 $request->setRequestFormat('html');
37
38 return sprintf('@Twig/Exception/%s.html.twig', $showException ? 'exception_full' : $name);
39 }
40}
diff --git a/src/Wallabag/CoreBundle/ParamConverter/UsernameRssTokenConverter.php b/src/Wallabag/CoreBundle/ParamConverter/UsernameRssTokenConverter.php
index 6ea2a4f3..40b5673d 100644
--- a/src/Wallabag/CoreBundle/ParamConverter/UsernameRssTokenConverter.php
+++ b/src/Wallabag/CoreBundle/ParamConverter/UsernameRssTokenConverter.php
@@ -49,7 +49,7 @@ class UsernameRssTokenConverter implements ParamConverterInterface
49 $em = $this->registry->getManagerForClass($configuration->getClass()); 49 $em = $this->registry->getManagerForClass($configuration->getClass());
50 50
51 // Check, if class name is what we need 51 // Check, if class name is what we need
52 if ('Wallabag\UserBundle\Entity\User' !== $em->getClassMetadata($configuration->getClass())->getName()) { 52 if (null !== $em && 'Wallabag\UserBundle\Entity\User' !== $em->getClassMetadata($configuration->getClass())->getName()) {
53 return false; 53 return false;
54 } 54 }
55 55
@@ -69,9 +69,8 @@ class UsernameRssTokenConverter implements ParamConverterInterface
69 $username = $request->attributes->get('username'); 69 $username = $request->attributes->get('username');
70 $rssToken = $request->attributes->get('token'); 70 $rssToken = $request->attributes->get('token');
71 71
72 // Check, if route attributes exists 72 if (!$request->attributes->has('username') || !$request->attributes->has('token')) {
73 if (null === $username || null === $rssToken) { 73 return false;
74 throw new \InvalidArgumentException('Route attribute is missing');
75 } 74 }
76 75
77 // Get actual entity manager for class 76 // Get actual entity manager for class
diff --git a/src/Wallabag/CoreBundle/Resources/config/services.yml b/src/Wallabag/CoreBundle/Resources/config/services.yml
index 23e6d3ca..d1139846 100644
--- a/src/Wallabag/CoreBundle/Resources/config/services.yml
+++ b/src/Wallabag/CoreBundle/Resources/config/services.yml
@@ -88,17 +88,6 @@ services:
88 arguments: 88 arguments:
89 - WallabagCoreBundle:Tag 89 - WallabagCoreBundle:Tag
90 90
91 wallabag_core.registration_confirmed:
92 class: Wallabag\CoreBundle\EventListener\RegistrationConfirmedListener
93 arguments:
94 - "@doctrine.orm.entity_manager"
95 - "%wallabag_core.theme%"
96 - "%wallabag_core.items_on_page%"
97 - "%wallabag_core.rss_limit%"
98 - "%wallabag_core.language%"
99 tags:
100 - { name: kernel.event_subscriber }
101
102 wallabag_core.helper.entries_export: 91 wallabag_core.helper.entries_export:
103 class: Wallabag\CoreBundle\Helper\EntriesExport 92 class: Wallabag\CoreBundle\Helper\EntriesExport
104 arguments: 93 arguments:
@@ -133,3 +122,9 @@ services:
133 host: '%redis_host%' 122 host: '%redis_host%'
134 port: '%redis_port%' 123 port: '%redis_port%'
135 schema: tcp 124 schema: tcp
125
126 wallabag_core.exception_controller:
127 class: Wallabag\CoreBundle\Controller\ExceptionController
128 arguments:
129 - '@twig'
130 - '%kernel.debug%'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml
index 16e4f063..da7e2652 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'
@@ -94,6 +95,7 @@ config:
94 # if_label: 'if' 95 # if_label: 'if'
95 # then_tag_as_label: 'then tag as' 96 # then_tag_as_label: 'then tag as'
96 # delete_rule_label: 'delete' 97 # delete_rule_label: 'delete'
98 # edit_rule_label: 'edit'
97 # rule_label: 'Rule' 99 # rule_label: 'Rule'
98 # tags_label: 'Tags' 100 # tags_label: 'Tags'
99 # faq: 101 # faq:
@@ -358,7 +360,7 @@ import:
358 # 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:" 360 # 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:"
359 # firefox: 361 # firefox:
360 # page_title: 'Import > Firefox' 362 # page_title: 'Import > Firefox'
361 # 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." 363 # 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."
362 # 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." 364 # 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."
363 #chrome: 365 #chrome:
364 # page_title: 'Import > Chrome' 366 # 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 5db4b28e..eb82f13f 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'
@@ -94,6 +95,7 @@ config:
94 if_label: 'Wenn' 95 if_label: 'Wenn'
95 then_tag_as_label: 'dann tagge als' 96 then_tag_as_label: 'dann tagge als'
96 delete_rule_label: 'löschen' 97 delete_rule_label: 'löschen'
98 # edit_rule_label: 'edit'
97 rule_label: 'Regel' 99 rule_label: 'Regel'
98 tags_label: 'Tags' 100 tags_label: 'Tags'
99 faq: 101 faq:
@@ -358,7 +360,7 @@ import:
358 # 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:" 360 # 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:"
359 firefox: 361 firefox:
360 page_title: 'Aus Firefox importieren' 362 page_title: 'Aus Firefox importieren'
361 # 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." 363 # 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."
362 # 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." 364 # 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."
363 chrome: 365 chrome:
364 page_title: 'Aus Chrome importieren' 366 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 f9f8e217..01d8053b 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'
@@ -94,6 +95,7 @@ config:
94 if_label: 'if' 95 if_label: 'if'
95 then_tag_as_label: 'then tag as' 96 then_tag_as_label: 'then tag as'
96 delete_rule_label: 'delete' 97 delete_rule_label: 'delete'
98 edit_rule_label: 'edit'
97 rule_label: 'Rule' 99 rule_label: 'Rule'
98 tags_label: 'Tags' 100 tags_label: 'Tags'
99 faq: 101 faq:
@@ -358,7 +360,7 @@ import:
358 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:" 360 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:"
359 firefox: 361 firefox:
360 page_title: 'Import > Firefox' 362 page_title: 'Import > Firefox'
361 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." 363 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."
362 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." 364 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."
363 chrome: 365 chrome:
364 page_title: 'Import > Chrome' 366 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 db87cd96..5364e99a 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'
@@ -94,6 +95,7 @@ config:
94 if_label: 'si' 95 if_label: 'si'
95 then_tag_as_label: 'Etiquete como' 96 then_tag_as_label: 'Etiquete como'
96 delete_rule_label: 'Borre' 97 delete_rule_label: 'Borre'
98 # edit_rule_label: 'edit'
97 rule_label: 'Regla' 99 rule_label: 'Regla'
98 tags_label: 'Etiquetas' 100 tags_label: 'Etiquetas'
99 faq: 101 faq:
@@ -358,7 +360,7 @@ import:
358 # 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:" 360 # 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:"
359 firefox: 361 firefox:
360 page_title: 'Importar > Firefox' 362 page_title: 'Importar > Firefox'
361 # 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." 363 # 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."
362 # 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." 364 # 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."
363 chrome: 365 chrome:
364 page_title: 'Importar > Chrome' 366 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 f6943ae5..6f42b173 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: 'پیکربندی'
@@ -94,6 +95,7 @@ config:
94 if_label: 'اگر' 95 if_label: 'اگر'
95 then_tag_as_label: 'این برچسب را بزن' 96 then_tag_as_label: 'این برچسب را بزن'
96 delete_rule_label: 'پاک کن' 97 delete_rule_label: 'پاک کن'
98 # edit_rule_label: 'edit'
97 rule_label: 'قانون' 99 rule_label: 'قانون'
98 tags_label: 'برچسب‌ها' 100 tags_label: 'برچسب‌ها'
99 faq: 101 faq:
@@ -357,7 +359,7 @@ import:
357 # 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:" 359 # 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:"
358 firefox: 360 firefox:
359 page_title: 'درون‌ریزی > Firefox' 361 page_title: 'درون‌ریزی > Firefox'
360 # 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." 362 # 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."
361 # 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." 363 # 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."
362 chrome: 364 chrome:
363 page_title: 'درون‌ریزی > Chrome' 365 page_title: 'درون‌ریزی > Chrome'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml
index f2c92070..6984be83 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'
@@ -94,6 +95,7 @@ config:
94 if_label: 'si' 95 if_label: 'si'
95 then_tag_as_label: 'alors attribuer les tags' 96 then_tag_as_label: 'alors attribuer les tags'
96 delete_rule_label: 'supprimer' 97 delete_rule_label: 'supprimer'
98 edit_rule_label: 'éditer'
97 rule_label: 'Règle' 99 rule_label: 'Règle'
98 tags_label: 'Tags' 100 tags_label: 'Tags'
99 faq: 101 faq:
@@ -358,7 +360,7 @@ import:
358 enabled: "Les imports sont asynchrones. Une fois l'import commencé un worker externe traitera les messages un par un. Le service activé est :" 360 enabled: "Les imports sont asynchrones. Une fois l'import commencé un worker externe traitera les messages un par un. Le service activé est :"
359 firefox: 361 firefox:
360 page_title: 'Import > Firefox' 362 page_title: 'Import > Firefox'
361 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>" 363 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>"
362 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." 364 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."
363 chrome: 365 chrome:
364 page_title: 'Import > Chrome' 366 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 32897b32..30b3287e 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'
@@ -94,6 +95,7 @@ config:
94 if_label: 'se' 95 if_label: 'se'
95 then_tag_as_label: 'allora tagga come' 96 then_tag_as_label: 'allora tagga come'
96 delete_rule_label: 'elimina' 97 delete_rule_label: 'elimina'
98 # edit_rule_label: 'edit'
97 rule_label: 'Regola' 99 rule_label: 'Regola'
98 tags_label: 'Tag' 100 tags_label: 'Tag'
99 faq: 101 faq:
@@ -357,7 +359,7 @@ import:
357 # 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:" 359 # 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:"
358 firefox: 360 firefox:
359 page_title: 'Importa da > Firefox' 361 page_title: 'Importa da > Firefox'
360 # 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." 362 # 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."
361 # 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." 363 # 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."
362 chrome: 364 chrome:
363 page_title: 'Importa da > Chrome' 365 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 8caf3c0c..a077f1bf 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:
@@ -94,6 +95,7 @@ config:
94 if_label: 'se' 95 if_label: 'se'
95 then_tag_as_label: 'alara atribuir las etiquetas' 96 then_tag_as_label: 'alara atribuir las etiquetas'
96 delete_rule_label: 'suprimir' 97 delete_rule_label: 'suprimir'
98 # edit_rule_label: 'edit'
97 rule_label: 'Règla' 99 rule_label: 'Règla'
98 tags_label: 'Etiquetas' 100 tags_label: 'Etiquetas'
99 faq: 101 faq:
@@ -187,7 +189,7 @@ entry:
187 re_fetch_content: 'Tornar cargar lo contengut' 189 re_fetch_content: 'Tornar cargar lo contengut'
188 delete: 'Suprimir' 190 delete: 'Suprimir'
189 add_a_tag: 'Ajustar una etiqueta' 191 add_a_tag: 'Ajustar una etiqueta'
190 share_content: 'Partatjar' 192 share_content: 'Partejar'
191 share_email_label: 'Corrièl' 193 share_email_label: 'Corrièl'
192 public_link: 'ligam public' 194 public_link: 'ligam public'
193 delete_public_link: 'suprimir lo ligam public' 195 delete_public_link: 'suprimir lo ligam public'
@@ -224,7 +226,7 @@ about:
224 developped_by: 'Desvolopat per' 226 developped_by: 'Desvolopat per'
225 website: 'Site web' 227 website: 'Site web'
226 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>'
227 project_website: 'Site web del projète' 229 project_website: 'Site web del projècte'
228 license: 'Licéncia' 230 license: 'Licéncia'
229 version: 'Version' 231 version: 'Version'
230 getting_help: 232 getting_help:
@@ -245,7 +247,7 @@ about:
245 247
246howto: 248howto:
247 page_title: 'Ajuda' 249 page_title: 'Ajuda'
248 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 :"
249 top_menu: 251 top_menu:
250 browser_addons: 'Extensions de navigator' 252 browser_addons: 'Extensions de navigator'
251 mobile_apps: 'Aplicacions mobil' 253 mobile_apps: 'Aplicacions mobil'
@@ -351,26 +353,26 @@ import:
351 page_title: 'Importar > Wallabag v2' 353 page_title: 'Importar > Wallabag v2'
352 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\"" 354 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\""
353 readability: 355 readability:
354 page_title: 'Importer > Readability' 356 page_title: 'Importar > Readability'
355 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)." 357 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)."
356 how_to: "Mercés de seleccionar vòstre Readability fichièr e de clicar sul boton dejós per lo telecargar e l'importar." 358 how_to: "Mercés de seleccionar vòstre Readability fichièr e de clicar sul boton dejós per lo telecargar e l'importar."
357 worker: 359 worker:
358 # 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:" 360 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 : "
359 firefox: 361 firefox:
360 page_title: 'Importer > Firefox' 362 page_title: 'Importar > Firefox'
361 # 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." 363 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."
362 # 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." 364 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."
363 chrome: 365 chrome:
364 page_title: 'Importer > Chrome' 366 page_title: 'Importar > Chrome'
365 # 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>" 367 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>"
366 # 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." 368 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."
367 instapaper: 369 instapaper:
368 page_title: 'Importer > Instapaper' 370 page_title: 'Importar > Instapaper'
369 # 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").' 371 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\")."
370 # how_to: 'Please select your Instapaper export and click on the below button to upload and import it.' 372 how_to: "Mercés de causir vòstre fichièr Instapaper e de clicar sul boton dejós per lo telecargar e l'importar"
371 373
372developer: 374developer:
373 page_title: 'Desvolopador' 375 page_title: 'Desvolopaire'
374 welcome_message: "Benvenguda sus l'API de wallabag" 376 welcome_message: "Benvenguda sus l'API de wallabag"
375 documentation: 'Documentacion' 377 documentation: 'Documentacion'
376 how_to_first_app: 'Cossí crear vòstra primièra aplicacion' 378 how_to_first_app: 'Cossí crear vòstra primièra aplicacion'
@@ -394,16 +396,18 @@ developer:
394 page_title: 'Desvlopador > Novèl client' 396 page_title: 'Desvlopador > Novèl client'
395 page_description: "Anatz crear un novèl client. Mercés de cumplir l'url de redireccion cap a vòstra aplicacion." 397 page_description: "Anatz crear un novèl client. Mercés de cumplir l'url de redireccion cap a vòstra aplicacion."
396 form: 398 form:
399 name_label: "Nom del client"
397 redirect_uris_label: 'URLs de redireccion' 400 redirect_uris_label: 'URLs de redireccion'
398 save_label: 'Crear un novèl client' 401 save_label: 'Crear un novèl client'
399 action_back: 'Retorn' 402 action_back: 'Retorn'
400 client_parameter: 403 client_parameter:
401 page_title: 'Desvolopador > Los paramètres de vòstre client' 404 page_title: 'Desvolopador > Los paramètres de vòstre client'
402 page_description: 'Vaquí los paramètres de vòstre client' 405 page_description: 'Vaquí los paramètres de vòstre client'
406 field_name: 'Nom del client'
403 field_id: 'ID Client' 407 field_id: 'ID Client'
404 field_secret: 'Clau secreta' 408 field_secret: 'Clau secreta'
405 back: 'Retour' 409 back: 'Retour'
406 read_howto: 'Legir \"cossí crear ma primièra aplicacion\"' 410 read_howto: 'Legir "cossí crear ma primièra aplicacion"'
407 howto: 411 howto:
408 page_title: 'Desvolopador > Cossí crear ma primièra aplicacion' 412 page_title: 'Desvolopador > Cossí crear ma primièra aplicacion'
409 description: 413 description:
@@ -433,10 +437,10 @@ flashes:
433 notice: 437 notice:
434 entry_already_saved: 'Article ja salvargardat lo %date%' 438 entry_already_saved: 'Article ja salvargardat lo %date%'
435 entry_saved: 'Article enregistrat' 439 entry_saved: 'Article enregistrat'
436 # entry_saved_failed: 'Entry saved but fetching content failed' 440 entry_saved_failed: 'Article salvat mai fracàs de la recuperacion del contengut'
437 entry_updated: 'Article mes a jorn' 441 entry_updated: 'Article mes a jorn'
438 entry_reloaded: 'Article recargat' 442 entry_reloaded: 'Article recargat'
439 # entry_reload_failed: 'Entry reloaded but fetching content failed' 443 entry_reload_failed: "L'article es estat cargat de u mai la recuperacion del contengut a fracassat"
440 entry_archived: 'Article marcat coma legit' 444 entry_archived: 'Article marcat coma legit'
441 entry_unarchived: 'Article marcat coma pas legit' 445 entry_unarchived: 'Article marcat coma pas legit'
442 entry_starred: 'Article apondut dins los favorits' 446 entry_starred: 'Article apondut dins los favorits'
@@ -450,10 +454,10 @@ flashes:
450 failed: "L'importacion a fracassat, mercés de tornar ensajar" 454 failed: "L'importacion a fracassat, mercés de tornar ensajar"
451 failed_on_file: "Errorr pendent du tractament de l'import. Mercés de verificar vòstre fichièr." 455 failed_on_file: "Errorr pendent du tractament de l'import. Mercés de verificar vòstre fichièr."
452 summary: "Rapòrt d'import: %imported% importats, %skipped% ja presents." 456 summary: "Rapòrt d'import: %imported% importats, %skipped% ja presents."
453 # summary_with_queue: 'Import summary: %queued% queued.' 457 summary_with_queue: "Rapòrt d'import : %queued% en espèra de tractament."
454 error: 458 error:
455 # 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. 459 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."
456 # 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. 460 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."
457 developer: 461 developer:
458 notice: 462 notice:
459 client_created: 'Novèl client creat' 463 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 8f0555b1..cad94dd5 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'
@@ -94,6 +95,7 @@ config:
94 if_label: 'jeżeli' 95 if_label: 'jeżeli'
95 then_tag_as_label: 'wtedy otaguj jako' 96 then_tag_as_label: 'wtedy otaguj jako'
96 delete_rule_label: 'usuń' 97 delete_rule_label: 'usuń'
98 # edit_rule_label: 'edit'
97 rule_label: 'Reguła' 99 rule_label: 'Reguła'
98 tags_label: 'Tagi' 100 tags_label: 'Tagi'
99 faq: 101 faq:
@@ -358,7 +360,7 @@ import:
358 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:" 360 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:"
359 firefox: 361 firefox:
360 page_title: 'Import > Firefox' 362 page_title: 'Import > Firefox'
361 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." 363 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."
362 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." 364 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."
363 chrome: 365 chrome:
364 page_title: 'Import > Chrome' 366 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 ee56dd15..a271d6f3 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'
@@ -94,6 +95,7 @@ config:
94 # if_label: 'if' 95 # if_label: 'if'
95 # then_tag_as_label: 'then tag as' 96 # then_tag_as_label: 'then tag as'
96 # delete_rule_label: 'delete' 97 # delete_rule_label: 'delete'
98 # edit_rule_label: 'edit'
97 # rule_label: 'Rule' 99 # rule_label: 'Rule'
98 # tags_label: 'Tags' 100 # tags_label: 'Tags'
99 # faq: 101 # faq:
@@ -358,7 +360,7 @@ import:
358 # 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:" 360 # 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:"
359 # firefox: 361 # firefox:
360 # page_title: 'Import > Firefox' 362 # page_title: 'Import > Firefox'
361 # 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." 363 # 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."
362 # 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." 364 # 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."
363 # chrome: 365 # chrome:
364 # page_title: 'Import > Chrome' 366 # 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 befd39ed..f2307e65 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'
@@ -358,7 +359,7 @@ import:
358 # 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:" 359 # 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:"
359 firefox: 360 firefox:
360 page_title: 'İçe Aktar > Firefox' 361 page_title: 'İçe Aktar > Firefox'
361 # 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." 362 # 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."
362 # 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." 363 # 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."
363 chrome: 364 chrome:
364 page_title: 'İçe Aktar > Chrome' 365 page_title: 'İçe Aktar > Chrome'
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig
index 6446cf2c..dd4f7b00 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Config/index.html.twig
@@ -191,6 +191,7 @@
191 « {{ tagging_rule.rule }} » 191 « {{ tagging_rule.rule }} »
192 {{ 'config.form_rules.then_tag_as_label'|trans }} 192 {{ 'config.form_rules.then_tag_as_label'|trans }}
193 « {{ tagging_rule.tags|join(', ') }} » 193 « {{ tagging_rule.tags|join(', ') }} »
194 <a href="{{ path('edit_tagging_rule', {id: tagging_rule.id}) }}" title="{{ 'config.form_rules.edit_rule_label'|trans }}" class="tool mode_edit">✎</a>
194 <a href="{{ path('delete_tagging_rule', {id: tagging_rule.id}) }}" title="{{ 'config.form_rules.delete_rule_label'|trans }}" class="tool delete icon-trash icon"></a> 195 <a href="{{ path('delete_tagging_rule', {id: tagging_rule.id}) }}" title="{{ 'config.form_rules.delete_rule_label'|trans }}" class="tool delete icon-trash icon"></a>
195 </li> 196 </li>
196 {% endfor %} 197 {% endfor %}
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Exception/error.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Exception/error.html.twig
new file mode 100644
index 00000000..b52634fd
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Exception/error.html.twig
@@ -0,0 +1,24 @@
1{% extends "WallabagCoreBundle::layout.html.twig" %}
2
3{% block title %}{{ 'error.page_title'|trans }}{% endblock %}
4
5{% block body_class %}login{% endblock %}
6
7{% block menu %}{% endblock %}
8{% block messages %}{% endblock %}
9{% block header %}{% endblock %}
10
11{% block content %}
12<main class="valign-wrapper">
13 <div class="valign row">
14 <div class="card sw">
15 <div class="center"><img src="{{ asset('bundles/wallabagcore/themes/_global/img/logo-w.png') }}" alt="wallabag logo" /></div>
16 <h2>{{ status_code }}: {{ status_text }}</h2>
17 <p>{{ exception.message }}</p>
18 </div>
19 </div>
20</main>
21{% endblock %}
22
23{% block footer %}
24{% endblock %}
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig
index 5330c353..650a3ae2 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig
@@ -218,6 +218,9 @@
218 « {{ tagging_rule.rule }} » 218 « {{ tagging_rule.rule }} »
219 {{ 'config.form_rules.then_tag_as_label'|trans }} 219 {{ 'config.form_rules.then_tag_as_label'|trans }}
220 « {{ tagging_rule.tags|join(', ') }} » 220 « {{ tagging_rule.tags|join(', ') }} »
221 <a href="{{ path('edit_tagging_rule', {id: tagging_rule.id}) }}" title="{{ 'config.form_rules.edit_rule_label'|trans }}">
222 <i class="tool grey-text mode_edit material-icons">mode_edit</i>
223 </a>
221 <a href="{{ path('delete_tagging_rule', {id: tagging_rule.id}) }}" title="{{ 'config.form_rules.delete_rule_label'|trans }}"> 224 <a href="{{ path('delete_tagging_rule', {id: tagging_rule.id}) }}" title="{{ 'config.form_rules.delete_rule_label'|trans }}">
222 <i class="tool grey-text delete material-icons">delete</i> 225 <i class="tool grey-text delete material-icons">delete</i>
223 </a> 226 </a>
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Exception/error.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Exception/error.html.twig
new file mode 100644
index 00000000..6be78edb
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Exception/error.html.twig
@@ -0,0 +1,30 @@
1{% extends "WallabagCoreBundle::layout.html.twig" %}
2
3{% block title %}{{ 'error.page_title'|trans }}{% endblock %}
4
5{% block body_class %}login{% endblock %}
6
7{% block menu %}{% endblock %}
8{% block messages %}{% endblock %}
9
10{% block content %}
11<main class="valign-wrapper">
12 <div class="valign row">
13 <div class="card sw">
14 <div class="center"><img src="{{ asset('bundles/wallabagcore/themes/_global/img/logo-other_themes.png') }}" alt="wallabag logo" /></div>
15 <div class="card-content">
16 <div class="row">
17 <h5>{{ status_code }}: {{ status_text }}</h5>
18 <p>{{ exception.message }}</p>
19 {# {% for trace in exception.trace %}
20 <p>{{ trace.class }} - {{ trace.type }} - {{ trace.file }} - {{ trace.line }}</p>
21 {% endfor %} #}
22 </div>
23 </div>
24 </div>
25 </div>
26</main>
27{% endblock %}
28
29{% block footer %}
30{% endblock %}
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/src/Wallabag/CoreBundle/EventListener/RegistrationConfirmedListener.php b/src/Wallabag/UserBundle/EventListener/CreateConfigListener.php
index 10586126..15f4ac3d 100644
--- a/src/Wallabag/CoreBundle/EventListener/RegistrationConfirmedListener.php
+++ b/src/Wallabag/UserBundle/EventListener/CreateConfigListener.php
@@ -1,39 +1,49 @@
1<?php 1<?php
2 2
3namespace Wallabag\CoreBundle\EventListener; 3namespace Wallabag\UserBundle\EventListener;
4 4
5use Doctrine\ORM\EntityManager; 5use Doctrine\ORM\EntityManager;
6use FOS\UserBundle\Event\FilterUserResponseEvent; 6use FOS\UserBundle\Event\UserEvent;
7use FOS\UserBundle\FOSUserEvents; 7use FOS\UserBundle\FOSUserEvents;
8use Symfony\Component\EventDispatcher\EventDispatcherInterface; 8use Symfony\Component\EventDispatcher\EventDispatcherInterface;
9use Symfony\Component\EventDispatcher\EventSubscriberInterface; 9use Symfony\Component\EventDispatcher\EventSubscriberInterface;
10use Wallabag\CoreBundle\Entity\Config; 10use Wallabag\CoreBundle\Entity\Config;
11 11
12class RegistrationConfirmedListener implements EventSubscriberInterface 12/**
13 * This listener will create the associated configuration when a user register.
14 * This configuration will be created right after the registration (no matter if it needs an email validation).
15 */
16class CreateConfigListener implements EventSubscriberInterface
13{ 17{
14 private $em; 18 private $em;
15 private $theme; 19 private $theme;
16 private $itemsOnPage; 20 private $itemsOnPage;
17 private $rssLimit; 21 private $rssLimit;
18 private $language; 22 private $language;
23 private $readingSpeed;
19 24
20 public function __construct(EntityManager $em, $theme, $itemsOnPage, $rssLimit, $language) 25 public function __construct(EntityManager $em, $theme, $itemsOnPage, $rssLimit, $language, $readingSpeed)
21 { 26 {
22 $this->em = $em; 27 $this->em = $em;
23 $this->theme = $theme; 28 $this->theme = $theme;
24 $this->itemsOnPage = $itemsOnPage; 29 $this->itemsOnPage = $itemsOnPage;
25 $this->rssLimit = $rssLimit; 30 $this->rssLimit = $rssLimit;
26 $this->language = $language; 31 $this->language = $language;
32 $this->readingSpeed = $readingSpeed;
27 } 33 }
28 34
29 public static function getSubscribedEvents() 35 public static function getSubscribedEvents()
30 { 36 {
31 return [ 37 return [
32 FOSUserEvents::REGISTRATION_CONFIRMED => 'authenticate', 38 // when a user register using the normal form
39 FOSUserEvents::REGISTRATION_COMPLETED => 'createConfig',
40 // when we manually create a user using the command line
41 // OR when we create it from the config UI
42 FOSUserEvents::USER_CREATED => 'createConfig',
33 ]; 43 ];
34 } 44 }
35 45
36 public function authenticate(FilterUserResponseEvent $event, $eventName = null, EventDispatcherInterface $eventDispatcher = null) 46 public function createConfig(UserEvent $event, $eventName = null, EventDispatcherInterface $eventDispatcher = null)
37 { 47 {
38 if (!$event->getUser()->isEnabled()) { 48 if (!$event->getUser()->isEnabled()) {
39 return; 49 return;
@@ -44,6 +54,8 @@ class RegistrationConfirmedListener implements EventSubscriberInterface
44 $config->setItemsPerPage($this->itemsOnPage); 54 $config->setItemsPerPage($this->itemsOnPage);
45 $config->setRssLimit($this->rssLimit); 55 $config->setRssLimit($this->rssLimit);
46 $config->setLanguage($this->language); 56 $config->setLanguage($this->language);
57 $config->setReadingSpeed($this->readingSpeed);
58
47 $this->em->persist($config); 59 $this->em->persist($config);
48 $this->em->flush(); 60 $this->em->flush();
49 } 61 }
diff --git a/src/Wallabag/UserBundle/Resources/config/services.yml b/src/Wallabag/UserBundle/Resources/config/services.yml
index 05830555..eb9c8e67 100644
--- a/src/Wallabag/UserBundle/Resources/config/services.yml
+++ b/src/Wallabag/UserBundle/Resources/config/services.yml
@@ -20,3 +20,15 @@ services:
20 factory: [ "@doctrine.orm.default_entity_manager", getRepository ] 20 factory: [ "@doctrine.orm.default_entity_manager", getRepository ]
21 arguments: 21 arguments:
22 - WallabagUserBundle:User 22 - WallabagUserBundle:User
23
24 wallabag_user.create_config:
25 class: Wallabag\UserBundle\EventListener\CreateConfigListener
26 arguments:
27 - "@doctrine.orm.entity_manager"
28 - "%wallabag_core.theme%"
29 - "%wallabag_core.items_on_page%"
30 - "%wallabag_core.rss_limit%"
31 - "%wallabag_core.language%"
32 - "%wallabag_core.reading_speed%"
33 tags:
34 - { name: kernel.event_subscriber }
diff --git a/src/Wallabag/UserBundle/Resources/views/Registration/checkEmail.html.twig b/src/Wallabag/UserBundle/Resources/views/Registration/check_email.html.twig
index 50937276..50937276 100644
--- a/src/Wallabag/UserBundle/Resources/views/Registration/checkEmail.html.twig
+++ b/src/Wallabag/UserBundle/Resources/views/Registration/check_email.html.twig