Changed RSS to Atom feed and improve paging

This commit is contained in:
Thomas Citharel 2017-06-13 18:48:10 +02:00 committed by Jeremy Benoist
parent 522e37ad27
commit 531c8d0a5c
No known key found for this signature in database
GPG key ID: BCA73962457ACC3C
57 changed files with 635 additions and 564 deletions

View file

@ -85,7 +85,7 @@ blockquote {
color: #999;
}
.icon-rss {
.icon-feed {
background-color: #000;
color: #fff;
padding: 0.2em 0.5em;
@ -101,8 +101,8 @@ blockquote {
margin-bottom: 0.5em;
}
.icon-rss:hover,
.icon-rss:focus {
.icon-feed:hover,
.icon-feed:focus {
background-color: #fff;
color: #000;
text-decoration: none;

View file

@ -136,7 +136,7 @@
content: "\ea3a";
}
.icon-rss::before {
.icon-feed::before {
content: "\e808";
}

View file

@ -72,6 +72,8 @@ security:
- { path: /(unread|starred|archive|all).xml$, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/locale, role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: /tags/(.*).xml$, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/feed, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: /(unread|starred|archive).xml$, roles: IS_AUTHENTICATED_ANONYMOUSLY } # For backwards compatibility
- { path: ^/share, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/settings, roles: ROLE_SUPER_ADMIN }
- { path: ^/annotations, roles: ROLE_USER }

View file

@ -14,7 +14,7 @@ use Wallabag\CoreBundle\Entity\Config;
use Wallabag\CoreBundle\Entity\TaggingRule;
use Wallabag\CoreBundle\Form\Type\ChangePasswordType;
use Wallabag\CoreBundle\Form\Type\ConfigType;
use Wallabag\CoreBundle\Form\Type\RssType;
use Wallabag\CoreBundle\Form\Type\FeedType;
use Wallabag\CoreBundle\Form\Type\TaggingRuleType;
use Wallabag\CoreBundle\Form\Type\UserInformationType;
use Wallabag\CoreBundle\Tools\Utils;
@ -92,17 +92,17 @@ class ConfigController extends Controller
return $this->redirect($this->generateUrl('config') . '#set3');
}
// handle rss information
$rssForm = $this->createForm(RssType::class, $config, ['action' => $this->generateUrl('config') . '#set2']);
$rssForm->handleRequest($request);
// handle feed information
$feedForm = $this->createForm(FeedType::class, $config, ['action' => $this->generateUrl('config') . '#set2']);
$feedForm->handleRequest($request);
if ($rssForm->isSubmitted() && $rssForm->isValid()) {
if ($feedForm->isSubmitted() && $feedForm->isValid()) {
$em->persist($config);
$em->flush();
$this->addFlash(
'notice',
'flashes.config.notice.rss_updated'
'flashes.config.notice.feed_updated'
);
return $this->redirect($this->generateUrl('config') . '#set2');
@ -143,14 +143,14 @@ class ConfigController extends Controller
return $this->render('WallabagCoreBundle:Config:index.html.twig', [
'form' => [
'config' => $configForm->createView(),
'rss' => $rssForm->createView(),
'feed' => $feedForm->createView(),
'pwd' => $pwdForm->createView(),
'user' => $userForm->createView(),
'new_tagging_rule' => $newTaggingRule->createView(),
],
'rss' => [
'feed' => [
'username' => $user->getUsername(),
'token' => $config->getRssToken(),
'token' => $config->getFeedToken(),
],
'twofactor_auth' => $this->getParameter('twofactor_auth'),
'wallabag_url' => $this->getParameter('domain_name'),
@ -281,19 +281,19 @@ class ConfigController extends Controller
public function generateTokenAction(Request $request)
{
$config = $this->getConfig();
$config->setRssToken(Utils::generateToken());
$config->setFeedToken(Utils::generateToken());
$em = $this->getDoctrine()->getManager();
$em->persist($config);
$em->flush();
if ($request->isXmlHttpRequest()) {
return new JsonResponse(['token' => $config->getRssToken()]);
return new JsonResponse(['token' => $config->getFeedToken()]);
}
$this->addFlash(
'notice',
'flashes.config.notice.rss_token_updated'
'flashes.config.notice.feed_token_updated'
);
return $this->redirect($this->generateUrl('config') . '#set2');

View file

@ -15,56 +15,68 @@ use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
use Wallabag\CoreBundle\Entity\Tag;
use Wallabag\UserBundle\Entity\User;
class RssController extends Controller
class FeedController extends Controller
{
/**
* Shows unread entries for current user.
*
* @Route("/{username}/{token}/unread.xml", name="unread_rss", defaults={"_format"="xml"})
* @ParamConverter("user", class="WallabagUserBundle:User", converter="username_rsstoken_converter")
* @Route("/feed/{username}/{token}/unread/{page}", name="unread_feed", defaults={"page": 1})
* @Route("/{username}/{token}/unread.xml", defaults={"page": 1})
* @ParamConverter("user", class="WallabagUserBundle:User", converter="username_feed_token_converter")
*
* @param User $user
* @param $page
*
* @return \Symfony\Component\HttpFoundation\Response
*/
public function showUnreadRSSAction(Request $request, User $user)
public function showUnreadFeedAction(User $user, $page)
{
return $this->showEntries('unread', $user, $request->query->get('page', 1));
return $this->showEntries('unread', $user, $page);
}
/**
* Shows read entries for current user.
*
* @Route("/{username}/{token}/archive.xml", name="archive_rss", defaults={"_format"="xml"})
* @ParamConverter("user", class="WallabagUserBundle:User", converter="username_rsstoken_converter")
* @Route("/feed/{username}/{token}/archive/{page}", name="archive_feed", defaults={"page": 1})
* @Route("/{username}/{token}/archive.xml", defaults={"page": 1})
* @ParamConverter("user", class="WallabagUserBundle:User", converter="username_feed_token_converter")
*
* @param User $user
* @param $page
*
* @return \Symfony\Component\HttpFoundation\Response
*/
public function showArchiveRSSAction(Request $request, User $user)
public function showArchiveFeedAction(User $user, $page)
{
return $this->showEntries('archive', $user, $request->query->get('page', 1));
return $this->showEntries('archive', $user, $page);
}
/**
* Shows starred entries for current user.
*
* @Route("/{username}/{token}/starred.xml", name="starred_rss", defaults={"_format"="xml"})
* @ParamConverter("user", class="WallabagUserBundle:User", converter="username_rsstoken_converter")
* @Route("/feed/{username}/{token}/starred/{page}", name="starred_feed", defaults={"page": 1})
* @Route("/{username}/{token}/starred.xml", defaults={"page": 1})
* @ParamConverter("user", class="WallabagUserBundle:User", converter="username_feed_token_converter")
*
* @param User $user
* @param $page
*
* @return \Symfony\Component\HttpFoundation\Response
*/
public function showStarredRSSAction(Request $request, User $user)
public function showStarredFeedAction(User $user, $page)
{
return $this->showEntries('starred', $user, $request->query->get('page', 1));
return $this->showEntries('starred', $user, $page);
}
/**
* Shows all entries for current user.
*
* @Route("/{username}/{token}/all.xml", name="all_rss", defaults={"_format"="xml"})
* @ParamConverter("user", class="WallabagUserBundle:User", converter="username_rsstoken_converter")
* @Route("/{username}/{token}/all.xml", name="all_feed", defaults={"_format"="xml"})
* @ParamConverter("user", class="WallabagUserBundle:User", converter="username_feed_token_converter")
*
* @return \Symfony\Component\HttpFoundation\Response
*/
public function showAllRSSAction(Request $request, User $user)
public function showAllFeedAction(Request $request, User $user)
{
return $this->showEntries('all', $user, $request->query->get('page', 1));
}
@ -72,21 +84,21 @@ class RssController extends Controller
/**
* Shows entries associated to a tag for current user.
*
* @Route("/{username}/{token}/tags/{slug}.xml", name="tag_rss", defaults={"_format"="xml"})
* @ParamConverter("user", class="WallabagUserBundle:User", converter="username_rsstoken_converter")
* @Route("/{username}/{token}/tags/{slug}.xml", name="tag_feed", defaults={"_format"="xml"})
* @ParamConverter("user", class="WallabagUserBundle:User", converter="username_feed_token_converter")
* @ParamConverter("tag", options={"mapping": {"slug": "slug"}})
*
* @return \Symfony\Component\HttpFoundation\Response
*/
public function showTagsAction(Request $request, User $user, Tag $tag)
public function showTagsFeedAction(Request $request, User $user, Tag $tag)
{
$page = $request->query->get('page', 1);
$url = $this->generateUrl(
'tag_rss',
'tag_feed',
[
'username' => $user->getUsername(),
'token' => $user->getConfig()->getRssToken(),
'token' => $user->getConfig()->getFeedToken(),
'slug' => $tag->getSlug(),
],
UrlGeneratorInterface::ABSOLUTE_URL
@ -119,12 +131,15 @@ class RssController extends Controller
return $this->render(
'@WallabagCore/themes/common/Entry/entries.xml.twig',
[
'url_html' => $this->generateUrl('tag_entries', ['slug' => $tag->getSlug()], UrlGeneratorInterface::ABSOLUTE_URL),
'type' => 'tag (' . $tag->getLabel() . ')',
'type' => 'tag',
'url' => $url,
'entries' => $entries,
'user' => $user->getUsername(),
'domainName' => $this->getParameter('domain_name'),
'version' => $this->getParameter('wallabag_core.version'),
'tag' => $tag->getSlug(),
],
new Response('', 200, ['Content-Type' => 'application/rss+xml'])
new Response('', 200, ['Content-Type' => 'application/atom+xml'])
);
}
@ -162,14 +177,14 @@ class RssController extends Controller
$pagerAdapter = new DoctrineORMAdapter($qb->getQuery(), true, false);
$entries = new Pagerfanta($pagerAdapter);
$perPage = $user->getConfig()->getRssLimit() ?: $this->getParameter('wallabag_core.rss_limit');
$perPage = $user->getConfig()->getFeedLimit() ?: $this->getParameter('wallabag_core.Feed_limit');
$entries->setMaxPerPage($perPage);
$url = $this->generateUrl(
$type . '_rss',
$type . '_feed',
[
'username' => $user->getUsername(),
'token' => $user->getConfig()->getRssToken(),
'token' => $user->getConfig()->getFeedToken(),
],
UrlGeneratorInterface::ABSOLUTE_URL
);
@ -178,19 +193,19 @@ class RssController extends Controller
$entries->setCurrentPage((int) $page);
} catch (OutOfRangeCurrentPageException $e) {
if ($page > 1) {
return $this->redirect($url . '?page=' . $entries->getNbPages(), 302);
return $this->redirect($url . '/' . $entries->getNbPages());
}
}
return $this->render(
'@WallabagCore/themes/common/Entry/entries.xml.twig',
[
'url_html' => $this->generateUrl($type, [], UrlGeneratorInterface::ABSOLUTE_URL),
return $this->render('@WallabagCore/themes/common/Entry/entries.xml.twig', [
'type' => $type,
'url' => $url,
'entries' => $entries,
'user' => $user->getUsername(),
'domainName' => $this->getParameter('domain_name'),
'version' => $this->getParameter('wallabag_core.version'),
],
new Response('', 200, ['Content-Type' => 'application/rss+xml'])
new Response('', 200, ['Content-Type' => 'application/atom+xml'])
);
}
}

View file

@ -18,7 +18,7 @@ class WallabagCoreExtension extends Extension
$container->setParameter('wallabag_core.items_on_page', $config['items_on_page']);
$container->setParameter('wallabag_core.theme', $config['theme']);
$container->setParameter('wallabag_core.language', $config['language']);
$container->setParameter('wallabag_core.rss_limit', $config['rss_limit']);
$container->setParameter('wallabag_core.feed_limit', $config['rss_limit']);
$container->setParameter('wallabag_core.reading_speed', $config['reading_speed']);
$container->setParameter('wallabag_core.version', $config['version']);
$container->setParameter('wallabag_core.paypal_url', $config['paypal_url']);

View file

@ -62,7 +62,7 @@ class Config
*
* @ORM\Column(name="rss_token", type="string", nullable=true)
*/
private $rssToken;
private $feedToken;
/**
* @var int
@ -71,10 +71,10 @@ class Config
* @Assert\Range(
* min = 1,
* max = 100000,
* maxMessage = "validator.rss_limit_too_high"
* maxMessage = "validator.feed_limit_too_high"
* )
*/
private $rssLimit;
private $feedLimit;
/**
* @var float
@ -231,51 +231,51 @@ class Config
}
/**
* Set rssToken.
* Set feed Token.
*
* @param string $rssToken
* @param string $feedToken
*
* @return Config
*/
public function setRssToken($rssToken)
public function setFeedToken($feedToken)
{
$this->rssToken = $rssToken;
$this->feedToken = $feedToken;
return $this;
}
/**
* Get rssToken.
* Get feedToken.
*
* @return string
*/
public function getRssToken()
public function getFeedToken()
{
return $this->rssToken;
return $this->feedToken;
}
/**
* Set rssLimit.
* Set Feed Limit.
*
* @param int $rssLimit
* @param int $feedLimit
*
* @return Config
*/
public function setRssLimit($rssLimit)
public function setFeedLimit($feedLimit)
{
$this->rssLimit = $rssLimit;
$this->feedLimit = $feedLimit;
return $this;
}
/**
* Get rssLimit.
* Get Feed Limit.
*
* @return int
*/
public function getRssLimit()
public function getFeedLimit()
{
return $this->rssLimit;
return $this->feedLimit;
}
/**

View file

@ -7,14 +7,14 @@ use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
class RssType extends AbstractType
class FeedType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('rss_limit', null, [
'label' => 'config.form_rss.rss_limit',
'property_path' => 'rssLimit',
->add('feed_limit', null, [
'label' => 'config.form_feed.feed_limit',
'property_path' => 'feedLimit',
])
->add('save', SubmitType::class, [
'label' => 'config.form.save',
@ -31,6 +31,6 @@ class RssType extends AbstractType
public function getBlockPrefix()
{
return 'rss_config';
return 'feed_config';
}
}

View file

@ -21,7 +21,7 @@ class PreparePagerForEntries
/**
* @param AdapterInterface $adapter
* @param User $user If user isn't logged in, we can force it (like for rss)
* @param User $user If user isn't logged in, we can force it (like for feed)
*
* @return Pagerfanta|null
*/

View file

@ -10,12 +10,12 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Wallabag\UserBundle\Entity\User;
/**
* ParamConverter used in the RSS controller to retrieve the right user according to
* ParamConverter used in the Feed controller to retrieve the right user according to
* username & token given in the url.
*
* @see http://stfalcon.com/en/blog/post/symfony2-custom-paramconverter
*/
class UsernameRssTokenConverter implements ParamConverterInterface
class UsernameFeedTokenConverter implements ParamConverterInterface
{
private $registry;
@ -67,7 +67,7 @@ class UsernameRssTokenConverter implements ParamConverterInterface
public function apply(Request $request, ParamConverter $configuration)
{
$username = $request->attributes->get('username');
$rssToken = $request->attributes->get('token');
$feedToken = $request->attributes->get('token');
if (!$request->attributes->has('username') || !$request->attributes->has('token')) {
return false;
@ -78,8 +78,8 @@ class UsernameRssTokenConverter implements ParamConverterInterface
$userRepository = $em->getRepository($configuration->getClass());
// Try to find user by its username and config rss_token
$user = $userRepository->findOneByUsernameAndRsstoken($username, $rssToken);
// Try to find user by its username and config feed_token
$user = $userRepository->findOneByUsernameAndFeedtoken($username, $feedToken);
if (null === $user || !($user instanceof User)) {
throw new NotFoundHttpException(sprintf('%s not found.', $configuration->getClass()));

View file

@ -22,10 +22,10 @@ services:
tags:
- { name: form.type }
wallabag_core.param_converter.username_rsstoken_converter:
class: Wallabag\CoreBundle\ParamConverter\UsernameRssTokenConverter
wallabag_core.param_converter.username_feed_token_converter:
class: Wallabag\CoreBundle\ParamConverter\UsernameFeedTokenConverter
tags:
- { name: request.param_converter, converter: username_rsstoken_converter }
- { name: request.param_converter, converter: username_feed_token_converter }
arguments:
- "@doctrine"

View file

@ -54,7 +54,7 @@ config:
page_title: 'Opsætning'
tab_menu:
settings: 'Indstillinger'
rss: 'RSS'
feed: 'RSS'
user_info: 'Brugeroplysninger'
password: 'Adgangskode'
# rules: 'Tagging rules'
@ -85,19 +85,19 @@ config:
# help_reading_speed: "wallabag calculates a reading time for each article. You can define here, thanks to this list, if you are a fast or a slow reader. wallabag will recalculate the reading time for each article."
# help_language: "You can change the language of wallabag interface."
# help_pocket_consumer_key: "Required for Pocket import. You can create it in your Pocket account."
form_rss:
form_feed:
description: 'RSS-feeds fra wallabag gør det muligt at læse de artikler, der gemmes i wallabag, med din RSS-læser. Det kræver, at du genererer et token først.'
token_label: 'RSS-Token'
no_token: 'Intet token'
token_create: 'Opret token'
token_reset: 'Nulstil token'
rss_links: 'RSS-Links'
rss_link:
feed_links: 'RSS-Links'
feed_link:
unread: 'Ulæst'
starred: 'Favoritter'
archive: 'Arkiv'
# all: 'All'
# rss_limit: 'Number of items in the feed'
# feed_limit: 'Number of items in the feed'
form_user:
# two_factor_description: "Enabling two factor authentication means you'll receive an email with a code OR need to use an OTP app (like Google Authenticator, Authy or FreeOTP) to get a one time code on every new untrusted connection. You can't choose both option."
name_label: 'Navn'
@ -372,7 +372,7 @@ quickstart:
# title: 'Configure the application'
# description: 'In order to have an application which suits you, have a look into the configuration of wallabag.'
# language: 'Change language and design'
# rss: 'Enable RSS feeds'
# feed: 'Enable RSS feeds'
# tagging_rules: 'Write rules to automatically tag your articles'
# admin:
# title: 'Administration'
@ -589,10 +589,10 @@ flashes:
password_updated: 'Adgangskode opdateret'
# password_not_updated_demo: "In demonstration mode, you can't change password for this user."
user_updated: 'Oplysninger opdateret'
rss_updated: 'RSS-oplysninger opdateret'
feed_updated: 'RSS-oplysninger opdateret'
# tagging_rules_updated: 'Tagging rules updated'
# tagging_rules_deleted: 'Tagging rule deleted'
# rss_token_updated: 'RSS token updated'
# feed_token_updated: 'RSS token updated'
# annotations_reset: Annotations reset
# tags_reset: Tags reset
# entries_reset: Entries reset

View file

@ -54,7 +54,7 @@ config:
page_title: 'Einstellungen'
tab_menu:
settings: 'Einstellungen'
rss: 'RSS'
feed: 'RSS'
user_info: 'Benutzerinformation'
password: 'Kennwort'
rules: 'Tagging-Regeln'
@ -85,19 +85,19 @@ config:
help_reading_speed: "wallabag berechnet eine Lesezeit pro Artikel. Hier kannst du definieren, ob du ein schneller oder langsamer Leser bist. wallabag wird die Lesezeiten danach neu berechnen."
help_language: "Du kannst die Sprache der wallabag-Oberfläche ändern."
help_pocket_consumer_key: "Nötig für den Pocket-Import. Du kannst ihn in deinem Pocket account einrichten."
form_rss:
form_feed:
description: 'Die RSS-Feeds von wallabag erlauben es dir, deine gespeicherten Artikel mit deinem bevorzugten RSS-Reader zu lesen. Vorher musst du jedoch einen Token erstellen.'
token_label: 'RSS-Token'
no_token: 'Kein Token'
token_create: 'Token erstellen'
token_reset: 'Token zurücksetzen'
rss_links: 'RSS-Links'
rss_link:
feed_links: 'RSS-Links'
feed_link:
unread: 'Ungelesene'
starred: 'Favoriten'
archive: 'Archivierte'
all: 'Alle'
rss_limit: 'Anzahl der Einträge pro Feed'
feed_limit: 'Anzahl der Einträge pro Feed'
form_user:
# two_factor_description: "Enabling two factor authentication means you'll receive an email with a code OR need to use an OTP app (like Google Authenticator, Authy or FreeOTP) to get a one time code on every new untrusted connection. You can't choose both option."
name_label: 'Name'
@ -363,7 +363,7 @@ quickstart:
title: 'Anwendung konfigurieren'
description: 'Um die Applikation für dich anzupassen, schau in die Konfiguration von wallabag.'
language: 'Sprache und Design ändern'
rss: 'RSS-Feeds aktivieren'
feed: 'RSS-Feeds aktivieren'
tagging_rules: 'Schreibe Regeln, um deine Beiträge automatisch zu taggen (verschlagworten)'
admin:
title: 'Administration'
@ -580,14 +580,14 @@ flashes:
password_updated: 'Kennwort aktualisiert'
password_not_updated_demo: 'Im Testmodus kannst du das Kennwort nicht ändern.'
user_updated: 'Information aktualisiert'
rss_updated: 'RSS-Informationen aktualisiert'
feed_updated: 'RSS-Informationen aktualisiert'
tagging_rules_updated: 'Tagging-Regeln aktualisiert'
tagging_rules_deleted: 'Tagging-Regel gelöscht'
rss_token_updated: 'RSS-Token aktualisiert'
annotations_reset: 'Anmerkungen zurücksetzen'
tags_reset: 'Tags zurücksetzen'
entries_reset: 'Einträge zurücksetzen'
archived_reset: 'Archiverte Einträge zurücksetzen'
feed_token_updated: 'RSS-Token aktualisiert'
annotations_reset: Anmerkungen zurücksetzen
tags_reset: Tags zurücksetzen
entries_reset: Einträge zurücksetzen
archived_reset: Archiverte Einträge zurücksetzen
entry:
notice:
entry_already_saved: 'Eintrag bereits am %date% gespeichert'

View file

@ -54,7 +54,7 @@ config:
page_title: 'Config'
tab_menu:
settings: 'Settings'
rss: 'RSS'
feed: 'Feeds'
user_info: 'User information'
password: 'Password'
rules: 'Tagging rules'
@ -85,19 +85,19 @@ config:
help_reading_speed: "wallabag calculates a reading time for each article. You can define here, thanks to this list, if you are a fast or a slow reader. wallabag will recalculate the reading time for each article."
help_language: "You can change the language of wallabag interface."
help_pocket_consumer_key: "Required for Pocket import. You can create it in your Pocket account."
form_rss:
description: 'RSS feeds provided by wallabag allow you to read your saved articles with your favourite RSS reader. You need to generate a token first.'
token_label: 'RSS token'
form_feed:
description: 'Atom feeds provided by wallabag allow you to read your saved articles with your favourite Atom reader. You need to generate a token first.'
token_label: 'Feed token'
no_token: 'No token'
token_create: 'Create your token'
token_reset: 'Regenerate your token'
rss_links: 'RSS links'
rss_link:
feed_links: 'Feed links'
feed_link:
unread: 'Unread'
starred: 'Starred'
archive: 'Archived'
all: 'All'
rss_limit: 'Number of items in the feed'
feed_limit: 'Number of items in the feed'
form_user:
two_factor_description: "Enabling two factor authentication means you'll receive an email with a code OR need to use an OTP app (like Google Authenticator, Authy or FreeOTP) to get a one time code on every new untrusted connection. You can't choose both option."
name_label: 'Name'
@ -372,7 +372,7 @@ quickstart:
title: 'Configure the application'
description: 'In order to have an application which suits you, have a look into the configuration of wallabag.'
language: 'Change language and design'
rss: 'Enable RSS feeds'
feed: 'Enable feeds'
tagging_rules: 'Write rules to automatically tag your articles'
admin:
title: 'Administration'
@ -589,10 +589,10 @@ flashes:
password_updated: 'Password updated'
password_not_updated_demo: "In demonstration mode, you can't change password for this user."
user_updated: 'Information updated'
rss_updated: 'RSS information updated'
feed_updated: 'Feed information updated'
tagging_rules_updated: 'Tagging rules updated'
tagging_rules_deleted: 'Tagging rule deleted'
rss_token_updated: 'RSS token updated'
feed_token_updated: 'Feed token updated'
annotations_reset: Annotations reset
tags_reset: Tags reset
entries_reset: Entries reset

View file

@ -54,7 +54,7 @@ config:
page_title: 'Configuración'
tab_menu:
settings: 'Configuración'
rss: 'RSS'
feed: 'RSS'
user_info: 'Información de usuario'
password: 'Contraseña'
rules: 'Reglas de etiquetado automáticas'
@ -85,19 +85,19 @@ config:
help_reading_speed: "wallabag calcula un tiempo de lectura para cada artículo. Puedes definir aquí, gracias a esta lista, si eres un lector rápido o lento. wallabag recalculará el tiempo de lectura para cada artículo."
help_language: "Puedes cambiar el idioma de la interfaz de wallabag."
help_pocket_consumer_key: "Requerido para la importación desde Pocket. Puedes crearla en tu cuenta de Pocket."
form_rss:
form_feed:
description: 'Los feeds RSS de wallabag permiten leer los artículos guardados con su lector RSS favorito. Primero necesitas generar un token.'
token_label: 'Token RSS'
no_token: 'Sin token'
token_create: 'Crear token'
token_reset: 'Reiniciar token'
rss_links: 'URLs de feeds RSS'
rss_link:
feed_links: 'URLs de feeds RSS'
feed_link:
unread: 'sin leer'
starred: 'favoritos'
archive: 'archivados'
# all: 'All'
rss_limit: 'Límite de artículos en feed RSS'
feed_limit: 'Límite de artículos en feed RSS'
form_user:
# two_factor_description: "Enabling two factor authentication means you'll receive an email with a code OR need to use an OTP app (like Google Authenticator, Authy or FreeOTP) to get a one time code on every new untrusted connection. You can't choose both option."
name_label: 'Nombre'
@ -372,7 +372,7 @@ quickstart:
title: 'Configure la aplicación'
description: 'Para que la aplicación se ajuste a tus necesidades, echa un vistazo a la configuración de wallabag.'
language: 'Cambie el idioma y el diseño'
rss: 'Activar los feeds RSS'
feed: 'Activar los feeds RSS'
tagging_rules: 'Escribe reglas para etiquetar automáticamente tus artículos'
admin:
title: 'Administración'
@ -589,10 +589,10 @@ flashes:
password_updated: 'Contraseña actualizada'
password_not_updated_demo: "En el modo demo, no puede cambiar la contraseña del usuario."
user_updated: 'Información actualizada'
rss_updated: 'Configuración RSS actualizada'
feed_updated: 'Configuración RSS actualizada'
tagging_rules_updated: 'Regla de etiquetado actualizada'
tagging_rules_deleted: 'Regla de etiquetado eliminada'
rss_token_updated: 'Token RSS actualizado'
feed_token_updated: 'Token RSS actualizado'
annotations_reset: Anotaciones reiniciadas
tags_reset: Etiquetas reiniciadas
entries_reset: Artículos reiniciados

View file

@ -54,7 +54,7 @@ config:
page_title: 'پیکربندی'
tab_menu:
settings: 'تنظیمات'
rss: 'آر-اس-اس'
feed: 'آر-اس-اس'
user_info: 'اطلاعات کاربر'
password: 'رمز'
rules: 'برچسب‌گذاری خودکار'
@ -85,19 +85,19 @@ config:
# help_reading_speed: "wallabag calculates a reading time for each article. You can define here, thanks to this list, if you are a fast or a slow reader. wallabag will recalculate the reading time for each article."
# help_language: "You can change the language of wallabag interface."
# help_pocket_consumer_key: "Required for Pocket import. You can create it in your Pocket account."
form_rss:
form_feed:
description: 'با خوراک آر-اس-اس که wallabag در اختیارتان می‌گذارد، می‌توانید مقاله‌های ذخیره‌شده را در نرم‌افزار آر-اس-اس دلخواه خود بخوانید. برای این کار نخست باید یک کد بسازید.'
token_label: 'کد آر-اس-اس'
no_token: 'بدون کد'
token_create: 'کد خود را بسازید'
token_reset: 'بازنشانی کد'
rss_links: 'پیوند آر-اس-اس'
rss_link:
feed_links: 'پیوند آر-اس-اس'
feed_link:
unread: 'خوانده‌نشده'
starred: 'برگزیده'
archive: 'بایگانی'
# all: 'All'
rss_limit: 'محدودیت آر-اس-اس'
feed_limit: 'محدودیت آر-اس-اس'
form_user:
# two_factor_description: "Enabling two factor authentication means you'll receive an email with a code OR need to use an OTP app (like Google Authenticator, Authy or FreeOTP) to get a one time code on every new untrusted connection. You can't choose both option."
name_label: 'نام'
@ -372,7 +372,7 @@ quickstart:
title: 'برنامه را تنظیم کنید'
# description: 'In order to have an application which suits you, have a look into the configuration of wallabag.'
language: 'زبان و نمای برنامه را تغییر دهید'
rss: 'خوراک آر-اس-اس را فعال کنید'
feed: 'خوراک آر-اس-اس را فعال کنید'
tagging_rules: 'قانون‌های برچسب‌گذاری خودکار مقاله‌هایتان را تعریف کنید'
admin:
title: 'مدیریت'
@ -589,10 +589,10 @@ flashes:
password_updated: 'رمز به‌روز شد'
password_not_updated_demo: "در حالت نمایشی نمی‌توانید رمز کاربر را عوض کنید."
user_updated: 'اطلاعات به‌روز شد'
rss_updated: 'اطلاعات آر-اس-اس به‌روز شد'
feed_updated: 'اطلاعات آر-اس-اس به‌روز شد'
tagging_rules_updated: 'برچسب‌گذاری خودکار به‌روز شد'
tagging_rules_deleted: 'قانون برچسب‌گذاری پاک شد'
rss_token_updated: 'کد آر-اس-اس به‌روز شد'
feed_token_updated: 'کد آر-اس-اس به‌روز شد'
# annotations_reset: Annotations reset
# tags_reset: Tags reset
# entries_reset: Entries reset

View file

@ -54,7 +54,7 @@ config:
page_title: "Configuration"
tab_menu:
settings: "Paramètres"
rss: "RSS"
feed: "Flux"
user_info: "Mon compte"
password: "Mot de passe"
rules: "Règles de tag automatiques"
@ -85,19 +85,19 @@ config:
help_reading_speed: "wallabag calcule une durée de lecture pour chaque article. Vous pouvez définir ici, grâce à cette liste déroulante, si vous lisez plus ou moins vite. wallabag recalculera la durée de lecture de chaque article."
help_language: "Vous pouvez définir la langue de linterface de wallabag."
help_pocket_consumer_key: "Nécessaire pour limport depuis Pocket. Vous pouvez le créer depuis votre compte Pocket."
form_rss:
description: "Les flux RSS fournis par wallabag vous permettent de lire vos articles sauvegardés dans votre lecteur de flux préféré. Pour pouvoir les utiliser, vous devez dabord créer un jeton."
token_label: "Jeton RSS"
form_feed:
description: "Les flux Atom fournis par wallabag vous permettent de lire vos articles sauvegardés dans votre lecteur de flux préféré. Pour pouvoir les utiliser, vous devez dabord créer un jeton."
token_label: "Jeton de flux"
no_token: "Aucun jeton généré"
token_create: "Créez votre jeton"
token_reset: "Réinitialisez votre jeton"
rss_links: "Adresses de vos flux RSS"
rss_link:
feed_links: "Adresses de vos flux"
feed_link:
unread: "Non lus"
starred: "Favoris"
archive: "Lus"
all: "Tous"
rss_limit: "Nombre darticles dans le flux"
feed_limit: "Nombre darticles dans le flux"
form_user:
two_factor_description: "Activer lauthentification double-facteur veut dire que vous allez recevoir un code par courriel OU que vous devriez utiliser une application de mot de passe à usage unique (comme Google Authenticator, Authy or FreeOTP) pour obtenir un code temporaire à chaque nouvelle connexion non approuvée. Vous ne pouvez pas choisir les deux options."
name_label: "Nom"
@ -372,7 +372,7 @@ quickstart:
title: "Configurez lapplication"
description: "Pour voir une application qui vous correspond, allez voir du côté de la configuration de wallabag."
language: "Changez la langue et le design de lapplication"
rss: "Activez les flux RSS"
feed: "Activez les flux Atom"
tagging_rules: "Écrivez des règles pour classer automatiquement vos articles"
admin:
title: "Administration"
@ -590,10 +590,10 @@ flashes:
password_updated: "Votre mot de passe a bien été mis à jour"
password_not_updated_demo: "En démo, vous ne pouvez pas changer le mot de passe de cet utilisateur."
user_updated: "Vos informations personnelles ont bien été mises à jour"
rss_updated: "La configuration des flux RSS a bien été mise à jour"
feed_updated: "La configuration des flux a bien été mise à jour"
tagging_rules_updated: "Règles mises à jour"
tagging_rules_deleted: "Règle supprimée"
rss_token_updated: "Jeton RSS mis à jour"
feed_token_updated: "Jeton des flux mis à jour"
annotations_reset: "Annotations supprimées"
tags_reset: "Tags supprimés"
entries_reset: "Articles supprimés"

View file

@ -54,7 +54,7 @@ config:
page_title: 'Configurazione'
tab_menu:
settings: 'Impostazioni'
rss: 'RSS'
feed: 'RSS'
user_info: 'Informazioni utente'
password: 'Password'
rules: 'Regole di etichettatura'
@ -85,19 +85,19 @@ config:
help_reading_speed: "wallabag calcola un tempo di lettura per ogni articolo. Puoi definire qui, grazie a questa lista, se sei un lettore lento o veloce. wallabag ricalcolerà la velocità di lettura per ogni articolo."
help_language: "Puoi cambiare la lingua dell'interfaccia di wallabag."
help_pocket_consumer_key: "Richiesta per importare da Pocket. La puoi creare nel tuo account Pocket."
form_rss:
form_feed:
description: 'I feed RSS generati da wallabag ti permettono di leggere i tuoi contenuti salvati con il tuo lettore di RSS preferito. Prima, devi generare un token.'
token_label: 'Token RSS'
no_token: 'Nessun token'
token_create: 'Crea il tuo token'
token_reset: 'Rigenera il tuo token'
rss_links: 'Collegamenti RSS'
rss_link:
feed_links: 'Collegamenti RSS'
feed_link:
unread: 'Non letti'
starred: 'Preferiti'
archive: 'Archiviati'
# all: 'All'
rss_limit: 'Numero di elementi nel feed'
feed_limit: 'Numero di elementi nel feed'
form_user:
# two_factor_description: "Enabling two factor authentication means you'll receive an email with a code OR need to use an OTP app (like Google Authenticator, Authy or FreeOTP) to get a one time code on every new untrusted connection. You can't choose both option."
name_label: 'Nome'
@ -371,7 +371,7 @@ quickstart:
title: "Configura l'applicazione"
description: "Per avere un'applicazione che ti soddisfi, dai un'occhiata alla configurazione di wallabag."
language: 'Cambia lingua e design'
rss: 'Abilita i feed RSS'
feed: 'Abilita i feed RSS'
tagging_rules: 'Scrivi delle regole per taggare automaticamente i contenuti'
admin:
title: 'Amministrazione'
@ -588,10 +588,10 @@ flashes:
password_updated: 'Password aggiornata'
password_not_updated_demo: "In modalità demo, non puoi cambiare la password dell'utente."
user_updated: 'Informazioni aggiornate'
rss_updated: 'Informazioni RSS aggiornate'
feed_updated: 'Informazioni RSS aggiornate'
tagging_rules_updated: 'Regole di etichettatura aggiornate'
tagging_rules_deleted: 'Regola di etichettatura eliminate'
rss_token_updated: 'RSS token aggiornato'
feed_token_updated: 'RSS token aggiornato'
annotations_reset: Reset annotazioni
tags_reset: Reset etichette
entries_reset: Reset articoli

View file

@ -54,7 +54,7 @@ config:
page_title: 'Configuracion'
tab_menu:
settings: 'Paramètres'
rss: 'RSS'
feed: 'RSS'
user_info: 'Mon compte'
password: 'Senhal'
rules: "Règlas d'etiquetas automaticas"
@ -85,19 +85,19 @@ config:
help_reading_speed: "wallabag calcula lo temps de lectura per cada article. Podètz lo definir aquí, gràcias a aquesta lista, se sètz un legeire rapid o lent. wallabag tornarà calcular lo temps de lectura per cada article."
help_language: "Podètz cambiar la lenga de l'interfàcia de wallabag."
help_pocket_consumer_key: "Requesida per l'importacion de Pocket. Podètz la crear dins vòstre compte Pocket."
form_rss:
form_feed:
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."
token_label: 'Geton RSS'
no_token: 'Pas cap de geton generat'
token_create: 'Creatz vòstre geton'
token_reset: 'Reïnicializatz vòstre geton'
rss_links: 'URLs de vòstres fluxes RSS'
rss_link:
feed_links: 'URLs de vòstres fluxes RSS'
feed_link:
unread: 'Pas legits'
starred: 'Favorits'
archive: 'Legits'
all: 'Totes'
rss_limit: "Nombre d'articles dins un flux RSS"
feed_limit: "Nombre d'articles dins un flux"
form_user:
# two_factor_description: "Enabling two factor authentication means you'll receive an email with a code OR need to use an OTP app (like Google Authenticator, Authy or FreeOTP) to get a one time code on every new untrusted connection. You can't choose both option."
name_label: 'Nom'
@ -371,7 +371,7 @@ quickstart:
title: "Configuratz l'aplicacion"
description: "Per fin d'aver una aplicacion que vos va ben, anatz veire la configuracion de wallabag."
language: "Cambiatz la lenga e l'estil de l'aplicacion"
rss: 'Activatz los fluxes RSS'
feed: 'Activatz los fluxes RSS'
tagging_rules: 'Escrivètz de règlas per classar automaticament vòstres articles'
admin:
title: 'Administracion'
@ -588,10 +588,10 @@ flashes:
password_updated: 'Vòstre senhal es ben estat mes a jorn'
password_not_updated_demo: "En demostracion, podètz pas cambiar lo senhal d'aqueste utilizaire."
user_updated: 'Vòstres informacions personnelas son ben estadas mesas a jorn'
rss_updated: 'La configuracion dels fluxes RSS es ben estada mesa a jorn'
feed_updated: 'La configuracion dels fluxes RSS es ben estada mesa a jorn'
tagging_rules_updated: 'Règlas misa a jorn'
tagging_rules_deleted: 'Règla suprimida'
rss_token_updated: 'Geton RSS mes a jorn'
feed_token_updated: 'Geton RSS mes a jorn'
annotations_reset: Anotacions levadas
tags_reset: Etiquetas levadas
entries_reset: Articles levats

View file

@ -54,7 +54,7 @@ config:
page_title: 'Konfiguracja'
tab_menu:
settings: 'Ustawienia'
rss: 'Kanał RSS'
feed: 'Kanał RSS'
user_info: 'Informacje o użytkowniku'
password: 'Hasło'
rules: 'Zasady tagowania'
@ -85,19 +85,19 @@ config:
help_reading_speed: "wallabag oblicza czas czytania każdego artykułu. Dzięki tej liście możesz określić swoje tempo. Wallabag przeliczy ponownie czas potrzebny, na przeczytanie każdego z artykułów."
help_language: "Możesz zmienić język interfejsu wallabag."
help_pocket_consumer_key: "Wymagane dla importu z Pocket. Możesz go stworzyć na swoim koncie Pocket."
form_rss:
form_feed:
description: 'Kanały RSS prowadzone przez wallabag pozwalają Ci na czytanie twoich zapisanych artykułów w twoim ulubionym czytniku RSS. Musisz najpierw wynegenerować tokena.'
token_label: 'Token RSS'
no_token: 'Brak tokena'
token_create: 'Stwórz tokena'
token_reset: 'Zresetuj swojego tokena'
rss_links: 'RSS links'
rss_link:
feed_links: 'RSS links'
feed_link:
unread: 'Nieprzeczytane'
starred: 'Oznaczone gwiazdką'
archive: 'Archiwum'
all: 'Wszystkie'
rss_limit: 'Link do RSS'
feed_limit: 'Link do RSS'
form_user:
# two_factor_description: "Enabling two factor authentication means you'll receive an email with a code OR need to use an OTP app (like Google Authenticator, Authy or FreeOTP) to get a one time code on every new untrusted connection. You can't choose both option."
name_label: 'Nazwa'
@ -371,7 +371,7 @@ quickstart:
title: 'Konfiguruj aplikację'
description: 'W celu dopasowania aplikacji do swoich upodobań, zobacz konfigurację aplikacji'
language: 'Zmień język i wygląd'
rss: 'Włącz kanały RSS'
feed: 'Włącz kanały RSS'
tagging_rules: 'Napisz reguły pozwalające na automatyczne otagowanie twoich artykułów'
admin:
title: 'Administracja'
@ -588,10 +588,10 @@ flashes:
password_updated: 'Hasło zaktualizowane'
password_not_updated_demo: "In demonstration mode, you can't change password for this user."
user_updated: 'Informacje zaktualizowane'
rss_updated: 'Informacje RSS zaktualizowane'
feed_updated: 'Informacje RSS zaktualizowane'
tagging_rules_updated: 'Reguły tagowania zaktualizowane'
tagging_rules_deleted: 'Reguła tagowania usunięta'
rss_token_updated: 'Token kanału RSS zaktualizowany'
feed_token_updated: 'Token kanału RSS zaktualizowany'
annotations_reset: Zresetuj adnotacje
tags_reset: Zresetuj tagi
entries_reset: Zresetuj wpisy

View file

@ -54,7 +54,7 @@ config:
page_title: 'Config'
tab_menu:
settings: 'Configurações'
rss: 'RSS'
feed: 'RSS'
user_info: 'Informação do Usuário'
password: 'Senha'
rules: 'Regras de tags'
@ -85,19 +85,19 @@ config:
# help_reading_speed: "wallabag calculates a reading time for each article. You can define here, thanks to this list, if you are a fast or a slow reader. wallabag will recalculate the reading time for each article."
# help_language: "You can change the language of wallabag interface."
# help_pocket_consumer_key: "Required for Pocket import. You can create it in your Pocket account."
form_rss:
form_feed:
description: 'Feeds RSS providos pelo wallabag permitem que você leia seus artigos salvos em seu leitor de RSS favorito. Você precisa gerar um token primeiro.'
token_label: 'Token RSS'
no_token: 'Nenhum Token'
token_create: 'Criar seu token'
token_reset: 'Gerar novamente seu token'
rss_links: 'Links RSS'
rss_link:
feed_links: 'Links RSS'
feed_link:
unread: 'Não lido'
starred: 'Destacado'
archive: 'Arquivado'
# all: 'All'
rss_limit: 'Número de itens no feed'
feed_limit: 'Número de itens no feed'
form_user:
# two_factor_description: "Enabling two factor authentication means you'll receive an email with a code OR need to use an OTP app (like Google Authenticator, Authy or FreeOTP) to get a one time code on every new untrusted connection. You can't choose both option."
name_label: 'Nome'
@ -371,7 +371,7 @@ quickstart:
title: 'Configurar a aplicação'
description: 'Para ter uma aplicação que atende você, dê uma olhada na configuração do wallabag.'
language: 'Alterar idioma e design'
rss: 'Habilitar feeds RSS'
feed: 'Habilitar feeds RSS'
tagging_rules: 'Escrever regras para acrescentar tags automaticamente em seus artigos'
admin:
title: 'Administração'
@ -588,10 +588,10 @@ flashes:
password_updated: 'Senha atualizada'
password_not_updated_demo: 'Em modo de demonstração, você não pode alterar a senha deste usuário.'
# user_updated: 'Information updated'
rss_updated: 'Informação de RSS atualizada'
feed_updated: 'Informação de RSS atualizada'
tagging_rules_updated: 'Regras de tags atualizadas'
tagging_rules_deleted: 'Regra de tag apagada'
rss_token_updated: 'Token RSS atualizado'
feed_token_updated: 'Token RSS atualizado'
# annotations_reset: Annotations reset
# tags_reset: Tags reset
# entries_reset: Entries reset

View file

@ -54,7 +54,7 @@ config:
page_title: 'Configurație'
tab_menu:
settings: 'Setări'
rss: 'RSS'
feed: 'RSS'
user_info: 'Informații despre utilizator'
password: 'Parolă'
# rules: 'Tagging rules'
@ -85,19 +85,19 @@ config:
# help_reading_speed: "wallabag calculates a reading time for each article. You can define here, thanks to this list, if you are a fast or a slow reader. wallabag will recalculate the reading time for each article."
# help_language: "You can change the language of wallabag interface."
# help_pocket_consumer_key: "Required for Pocket import. You can create it in your Pocket account."
form_rss:
form_feed:
description: 'Feed-urile RSS oferite de wallabag îți permit să-ți citești articolele salvate în reader-ul tău preferat RSS.'
token_label: 'RSS-Token'
no_token: 'Fără token'
token_create: 'Crează-ți token'
token_reset: 'Resetează-ți token-ul'
rss_links: 'Link-uri RSS'
rss_link:
feed_links: 'Link-uri RSS'
feed_link:
unread: 'Unread'
starred: 'Starred'
archive: 'Archived'
# all: 'All'
rss_limit: 'Limită RSS'
feed_limit: 'Limită RSS'
form_user:
# two_factor_description: "Enabling two factor authentication means you'll receive an email with a code OR need to use an OTP app (like Google Authenticator, Authy or FreeOTP) to get a one time code on every new untrusted connection. You can't choose both option."
name_label: 'Nume'
@ -371,7 +371,7 @@ quickstart:
# title: 'Configure the application'
# description: 'In order to have an application which suits you, have a look into the configuration of wallabag.'
# language: 'Change language and design'
# rss: 'Enable RSS feeds'
# feed: 'Enable RSS feeds'
# tagging_rules: 'Write rules to automatically tag your articles'
# admin:
# title: 'Administration'
@ -588,10 +588,10 @@ flashes:
password_updated: 'Parolă actualizată'
password_not_updated_demo: "In demonstration mode, you can't change password for this user."
user_updated: 'Informație actualizată'
rss_updated: 'Informație RSS actualizată'
feed_updated: 'Informație RSS actualizată'
# tagging_rules_updated: 'Tagging rules updated'
# tagging_rules_deleted: 'Tagging rule deleted'
# rss_token_updated: 'RSS token updated'
# feed_token_updated: 'RSS token updated'
# annotations_reset: Annotations reset
# tags_reset: Tags reset
# entries_reset: Entries reset

View file

@ -54,7 +54,7 @@ config:
page_title: 'Yapılandırma'
tab_menu:
settings: 'Ayarlar'
rss: 'RSS'
feed: 'RSS'
user_info: 'Kullanıcı bilgileri'
password: 'Şifre'
rules: 'Etiketleme kuralları'
@ -85,19 +85,19 @@ config:
# help_reading_speed: "wallabag calculates a reading time for each article. You can define here, thanks to this list, if you are a fast or a slow reader. wallabag will recalculate the reading time for each article."
# help_language: "You can change the language of wallabag interface."
# help_pocket_consumer_key: "Required for Pocket import. You can create it in your Pocket account."
form_rss:
form_feed:
description: 'wallabag RSS akışı kaydetmiş olduğunuz makalelerini favori RSS okuyucunuzda görüntülemenizi sağlar. Bunu yapabilmek için öncelikle belirteç (token) oluşturmalısınız.'
token_label: 'RSS belirteci (token)'
no_token: 'Belirteç (token) yok'
token_create: 'Yeni belirteç (token) oluştur'
token_reset: 'Belirteci (token) sıfırla'
rss_links: 'RSS akış bağlantıları'
rss_link:
feed_links: 'RSS akış bağlantıları'
feed_link:
unread: 'Okunmayan'
starred: 'Favoriler'
archive: 'Arşiv'
# all: 'All'
rss_limit: 'RSS içeriğinden talep edilecek makale limiti'
feed_limit: 'RSS içeriğinden talep edilecek makale limiti'
form_user:
# two_factor_description: "Enabling two factor authentication means you'll receive an email with a code OR need to use an OTP app (like Google Authenticator, Authy or FreeOTP) to get a one time code on every new untrusted connection. You can't choose both option."
name_label: 'İsim'
@ -369,7 +369,7 @@ quickstart:
title: 'Uygulamayı Yapılandırma'
# description: 'In order to have an application which suits you, have a look into the configuration of wallabag.'
language: 'Dili ve tasarımı değiştirme'
rss: 'RSS akışını aktifleştirme'
feed: 'RSS akışını aktifleştirme'
# tagging_rules: 'Write rules to automatically tag your articles'
admin:
# title: 'Administration'
@ -566,10 +566,10 @@ flashes:
password_updated: 'Şifre güncellendi'
password_not_updated_demo: "In demonstration mode, you can't change password for this user."
user_updated: 'Bilgiler güncellendi'
rss_updated: 'RSS bilgiler güncellendi'
feed_updated: 'RSS bilgiler güncellendi'
tagging_rules_updated: 'Tagging rules updated'
tagging_rules_deleted: 'Tagging rule deleted'
rss_token_updated: 'RSS token updated'
feed_token_updated: 'RSS token updated'
# annotations_reset: Annotations reset
# tags_reset: Tags reset
# entries_reset: Entries reset

View file

@ -3,5 +3,5 @@ validator:
password_too_short: 'Adgangskoden skal være mindst 8 tegn'
# password_wrong_value: 'Wrong value for your current password'
# item_per_page_too_high: 'This will certainly kill the app'
# rss_limit_too_high: 'This will certainly kill the app'
# feed_limit_too_high: 'This will certainly kill the app'
# quote_length_too_high: 'The quote is too long. It should have {{ limit }} characters or less.'

View file

@ -3,6 +3,5 @@ validator:
password_too_short: 'Kennwort-Mindestlänge von acht Zeichen nicht erfüllt'
password_wrong_value: 'Falscher Wert für dein aktuelles Kennwort'
item_per_page_too_high: 'Dies wird die Anwendung möglicherweise beenden'
rss_limit_too_high: 'Dies wird die Anwendung möglicherweise beenden'
feed_limit_too_high: 'Dies wird die Anwendung möglicherweise beenden'
quote_length_too_high: 'Das Zitat ist zu lang. Es sollte nicht mehr als {{ limit }} Zeichen enthalten.'

View file

@ -3,5 +3,5 @@ validator:
password_too_short: 'Password should by at least 8 chars long'
password_wrong_value: 'Wrong value for your current password'
item_per_page_too_high: 'This will certainly kill the app'
rss_limit_too_high: 'This will certainly kill the app'
feed_limit_too_high: 'This will certainly kill the app'
quote_length_too_high: 'The quote is too long. It should have {{ limit }} characters or less.'

View file

@ -3,5 +3,5 @@ validator:
password_too_short: 'La contraseña debe tener al menos 8 carácteres'
password_wrong_value: 'Entrada equivocada para su contraseña actual'
item_per_page_too_high: 'Esto matará la aplicación'
rss_limit_too_high: 'Esto matará la aplicación'
feed_limit_too_high: 'Esto matará la aplicación'
# quote_length_too_high: 'The quote is too long. It should have {{ limit }} characters or less.'

View file

@ -3,5 +3,5 @@ validator:
password_too_short: 'رمز شما باید ۸ حرف یا بیشتر باشد'
password_wrong_value: 'رمز فعلی را اشتباه وارد کرده‌اید'
item_per_page_too_high: 'با این تعداد برنامه به فنا می‌رود'
rss_limit_too_high: 'با این تعداد برنامه به فنا می‌رود'
feed_limit_too_high: 'با این تعداد برنامه به فنا می‌رود'
# quote_length_too_high: 'The quote is too long. It should have {{ limit }} characters or less.'

View file

@ -3,5 +3,5 @@ validator:
password_too_short: "Le mot de passe doit contenir au moins 8 caractères"
password_wrong_value: "Votre mot de passe actuel est faux"
item_per_page_too_high: "Ça ne va pas plaire à lapplication"
rss_limit_too_high: "Ça ne va pas plaire à lapplication"
feed_limit_too_high: "Ça ne va pas plaire à lapplication"
quote_length_too_high: "La citation est trop longue. Elle doit avoir au maximum {{ limit }} caractères."

View file

@ -3,5 +3,5 @@ validator:
password_too_short: 'La password deve essere lunga almeno 8 caratteri'
password_wrong_value: 'Valore inserito per la password corrente errato'
item_per_page_too_high: 'Questo valore è troppo alto'
rss_limit_too_high: 'Questo valore è troppo alto'
feed_limit_too_high: 'Questo valore è troppo alto'
# quote_length_too_high: 'The quote is too long. It should have {{ limit }} characters or less.'

View file

@ -3,5 +3,5 @@ validator:
password_too_short: 'Lo senhal deu aver almens 8 caractèrs'
password_wrong_value: 'Vòstre senhal actual es pas bon'
item_per_page_too_high: "Aquò li agradarà pas a l'aplicacion"
rss_limit_too_high: "Aquò li agradarà pas a l'aplicacion"
feed_limit_too_high: "Aquò li agradarà pas a l'aplicacion"
quote_length_too_high: 'Aquesta citacion es tròpa longa. Cal que faga {{ limit }} caractèrs o mens.'

View file

@ -3,5 +3,5 @@ validator:
password_too_short: 'Hasło powinno mieć minimum 8 znaków długości'
password_wrong_value: 'Twoje obecne hasło jest błędne'
item_per_page_too_high: 'To może spowodować problemy z aplikacją'
rss_limit_too_high: 'To może spowodować problemy z aplikacją'
feed_limit_too_high: 'To może spowodować problemy z aplikacją'
quote_length_too_high: 'Cytat jest zbyt długi. powinien mieć {{ limit }} znaków lub mniej.'

View file

@ -3,5 +3,5 @@ validator:
password_too_short: 'A senha deve ter pelo menos 8 caracteres'
password_wrong_value: 'A senha atual informada está errada'
item_per_page_too_high: 'Certamente isso pode matar a aplicação'
rss_limit_too_high: 'Certamente isso pode matar a aplicação'
feed_limit_too_high: 'Certamente isso pode matar a aplicação'
# quote_length_too_high: 'The quote is too long. It should have {{ limit }} characters or less.'

View file

@ -3,5 +3,5 @@ validator:
password_too_short: 'Parola ar trebui să conțină cel puțin 8 caractere'
# password_wrong_value: 'Wrong value for your current password'
# item_per_page_too_high: 'This will certainly kill the app'
# rss_limit_too_high: 'This will certainly kill the app'
# feed_limit_too_high: 'This will certainly kill the app'
# quote_length_too_high: 'The quote is too long. It should have {{ limit }} characters or less.'

View file

@ -3,5 +3,5 @@ validator:
# password_too_short: 'Password should by at least 8 chars long'
# password_wrong_value: 'Wrong value for your current password'
# item_per_page_too_high: 'This will certainly kill the app'
# rss_limit_too_high: 'This will certainly kill the app'
# feed_limit_too_high: 'This will certainly kill the app'
# quote_length_too_high: 'The quote is too long. It should have {{ limit }} characters or less.'

View file

@ -94,43 +94,43 @@
{{ form_rest(form.config) }}
</form>
<h2>{{ 'config.tab_menu.rss'|trans }}</h2>
<h2>{{ 'config.tab_menu.feed'|trans }}</h2>
{{ form_start(form.rss) }}
{{ form_errors(form.rss) }}
{{ form_start(form.feed) }}
{{ form_errors(form.feed) }}
<div class="row">
{{ 'config.form_rss.description'|trans }}
{{ 'config.form_feed.description'|trans }}
</div>
<fieldset class="w500p inline">
<div class="row">
<label>{{ 'config.form_rss.token_label'|trans }}</label>
{% if rss.token %}
{{ rss.token }}
<label>{{ 'config.form_feed.token_label'|trans }}</label>
{% if feed.token %}
{{ feed.token }}
{% else %}
<em>{{ 'config.form_rss.no_token'|trans }}</em>
<em>{{ 'config.form_feed.no_token'|trans }}</em>
{% endif %}
<a href="{{ path('generate_token') }}">
{% if rss.token %}
{{ 'config.form_rss.token_reset'|trans }}
{% if feed.token %}
{{ 'config.form_feed.token_reset'|trans }}
{% else %}
{{ 'config.form_rss.token_create'|trans }}
{{ 'config.form_feed.token_create'|trans }}
{% endif %}
</a>
</div>
</fieldset>
{% if rss.token %}
{% if feed.token %}
<fieldset class="w500p inline">
<div class="row">
<label>{{ 'config.form_rss.rss_links'|trans }}</label>
<label>{{ 'config.form_feed.feed_links'|trans }}</label>
<ul>
<li><a href="{{ path('unread_rss', {'username': rss.username, 'token': rss.token}) }}">{{ 'config.form_rss.rss_link.unread'|trans }}</a></li>
<li><a href="{{ path('starred_rss', {'username': rss.username, 'token': rss.token}) }}">{{ 'config.form_rss.rss_link.starred'|trans }}</a></li>
<li><a href="{{ path('archive_rss', {'username': rss.username, 'token': rss.token}) }}">{{ 'config.form_rss.rss_link.archive'|trans }}</a></li>
<li><a href="{{ path('all_rss', {'username': rss.username, 'token': rss.token}) }}">{{ 'config.form_rss.rss_link.all'|trans }}</a></li>
<li><a href="{{ path('unread_feed', {'username': feed.username, 'token': feed.token}) }}">{{ 'config.form_feed.feed_link.unread'|trans }}</a></li>
<li><a href="{{ path('starred_feed', {'username': feed.username, 'token': feed.token}) }}">{{ 'config.form_feed.feed_link.starred'|trans }}</a></li>
<li><a href="{{ path('archive_feed', {'username': feed.username, 'token': feed.token}) }}">{{ 'config.form_feed.feed_link.archive'|trans }}</a></li>
<li><a href="{{ path('all_feed', {'username': feed.username, 'token': feed.token}) }}">{{ 'config.form_feed.feed_link.all'|trans }}</a></li>
</ul>
</div>
</fieldset>
@ -138,13 +138,13 @@
<fieldset class="w500p inline">
<div class="row">
{{ form_label(form.rss.rss_limit) }}
{{ form_errors(form.rss.rss_limit) }}
{{ form_widget(form.rss.rss_limit) }}
{{ form_label(form.feed.feed_limit) }}
{{ form_errors(form.feed.feed_limit) }}
{{ form_widget(form.feed.feed_limit) }}
</div>
</fieldset>
{{ form_rest(form.rss) }}
{{ form_rest(form.feed) }}
</form>
<h2>{{ 'config.tab_menu.user_info'|trans }}</h2>

View file

@ -2,8 +2,8 @@
{% block head %}
{{ parent() }}
{% if tag is defined and app.user.config.rssToken %}
<link rel="alternate" type="application/rss+xml" href="{{ path('tag_rss', {'username': app.user.username, 'token': app.user.config.rssToken, 'slug': tag.slug}) }}" />
{% if tag is defined and app.user.config.feedToken %}
<link rel="alternate" type="application/atom+xml" href="{{ path('tag_feed', {'username': app.user.username, 'token': app.user.config.feedToken, 'slug': tag.slug}) }}" />
{% endif %}
{% endblock %}
@ -28,8 +28,8 @@
<div class="nb-results">{{ 'entry.list.number_on_the_page'|transchoice(entries.count) }}</div>
<div class="pagination">
<a href="{{ path('switch_view_mode') }}"><i class="listMode-btn material-icons md-24">{% if listMode == 0 %}list{% else %}view_module{% endif %}</i></a>
{% if app.user.config.rssToken %}
{% include "@WallabagCore/themes/common/Entry/_rss_link.html.twig" %}
{% if app.user.config.feedToken %}
{% include "@WallabagCore/themes/common/Entry/_feed_link.html.twig" %}
{% endif %}
{% if currentRoute in ['unread', 'starred', 'archive', 'untagged', 'all'] %}
<a href="{{ path('random_entry', { 'type': currentRoute }) }}"><i class="btn-clickable material-icons md-24 js-random-action">casino</i></a>

View file

@ -22,7 +22,7 @@
</a>
{% endif %}
{% if app.user.config.rssToken %}
<a rel="alternate" type="application/rss+xml" href="{{ path('tag_rss', {'username': app.user.username, 'token': app.user.config.rssToken, 'slug': tag.slug}) }}" class="right">
<a rel="alternate" type="application/atom+xml" href="{{ path('tag_feed', {'username': app.user.username, 'token': app.user.config.feedToken, 'slug': tag.slug}) }}" class="right">
<i class="material-icons md-24">rss_feed</i>
</a>
{% endif %}

View file

@ -0,0 +1,11 @@
{% if tag is defined %}
<a rel="alternate" type="application/atom+xml" href="{{ path('tag_feed', {'username': app.user.username, 'token': app.user.config.feedToken, 'slug': tag.slug}) }}" class="right"><i class="material-icons md-24">rss_feed</i></a>
{% elseif currentRoute in ['homepage', 'unread', 'starred', 'archive', 'all'] %}
{% set feedRoute = currentRoute %}
{% if currentRoute == 'homepage' %}
{% set feedRoute = 'unread' %}
{% endif %}
{% set feedRoute = feedRoute ~ '_feed' %}
<a rel="alternate" type="application/atom+xml" href="{{ path(feedRoute, {'username': app.user.username, 'token': app.user.config.feedToken}) }}" class="right"><i class="material-icons">rss_feed</i></a>
{% endif %}

View file

@ -1,11 +0,0 @@
{% if tag is defined %}
<a rel="alternate" type="application/rss+xml" href="{{ path('tag_rss', {'username': app.user.username, 'token': app.user.config.rssToken, 'slug': tag.slug}) }}" class="right"><i class="material-icons md-24">rss_feed</i></a>
{% elseif currentRoute in ['homepage', 'unread', 'starred', 'archive', 'all'] %}
{% set rssRoute = currentRoute %}
{% if currentRoute == 'homepage' %}
{% set rssRoute = 'unread' %}
{% endif %}
{% set rssRoute = rssRoute ~ '_rss' %}
<a rel="alternate" type="application/rss+xml" href="{{ path(rssRoute, {'username': app.user.username, 'token': app.user.config.rssToken}) }}" class="right"><i class="material-icons">rss_feed</i></a>
{% endif %}

View file

@ -1,34 +1,53 @@
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:media="http://search.yahoo.com/mrss/">
<channel>
<title>wallabag - {{ type }} feed</title>
<link>{{ url_html }}</link>
<link rel="self" href="{{ app.request.uri }}"/>
{% if entries.hasPreviousPage -%}
<link rel="previous" href="{{ url }}?page={{ entries.previousPage }}"/>
<feed xmlns="http://www.w3.org/2005/Atom">
{% if type != 'tag' %}
<title>wallabag — {{type}} feed</title>
<subtitle type="html">Atom feed for {{ type }} entries</subtitle>
<id>wallabag:{{ domainName | removeScheme | removeWww }}:{{ user }}:{{ type }}</id>
<link rel="alternate" type="text/html" href="{{ url(type) }}"/>
{% else %}
<id>wallabag:{{ domainName | removeScheme | removeWww }}:{{ user }}:{{ type }}:{{ tag }}</id>
<link rel="alternate" type="text/html" href="{{ url('tag_entries', {'slug': tag}) }}"/>
<title>wallabag — {{type}} {{ tag }} feed</title>
<subtitle type="html">Atom feed for entries tagged with {{ tag }}</subtitle>
{% endif %}
{% if entries | length > 0 %}
<updated>{{ (entries | first).createdAt | date('c') }}</updated> {# Indicates the last time the feed was modified in a significant way. #}
{% endif %}
<link rel="self" type="application/atom+xml" href="{{ app.request.uri }}"/>
{% if entries.hasPreviousPage %}
<link rel="previous" href="{{ url }}/{{ entries.previousPage }}"/>
{% endif -%}
{% if entries.hasNextPage -%}
<link rel="next" href="{{ url }}?page={{ entries.nextPage }}"/>
{% if entries.hasNextPage %}
<link rel="next" href="{{ url }}/{{ entries.nextPage }}"/>
{% endif -%}
<link rel="last" href="{{ url }}?page={{ entries.nbPages }}"/>
<pubDate>{{ "now"|date(constant('DATE_RSS')) }}</pubDate>
<generator>wallabag</generator>
<description>wallabag {{ type }} elements</description>
<link rel="last" href="{{ url }}/{{ entries.nbPages }}"/>
<generator uri="https://wallabag.org" version="{{ version }}">wallabag</generator>
<author>
<name>{{ user }}</name>
</author>
<icon>{{ asset('favicon.ico') }}</icon>
<logo>{{ asset('bundles/wallabagcore/themes/_global/img/logo-square.png') }}</logo>
{% for entry in entries %}
<item>
<entry>
<title><![CDATA[{{ entry.title|e }}]]></title>
<source url="{{ url('view', { 'id': entry.id }) }}">wallabag</source>
<link>{{ entry.url }}</link>
<guid>{{ entry.url }}</guid>
<pubDate>{{ entry.createdAt|date(constant('DATE_RSS')) }}</pubDate>
<description>
<![CDATA[{%- if entry.readingTime > 0 -%}{{ 'entry.list.reading_time_minutes'|trans({'%readingTime%': entry.readingTime}) }}{%- else -%}{{ 'entry.list.reading_time_less_one_minute'|trans|raw }}{%- endif %}{{ entry.content|raw -}}]]>
</description>
</item>
<link rel="alternate" type="text/html"
href="{{ url('view', {'id': entry.id}) }}"/>
<link rel="via">{{ entry.url }}</link>
<id>wallabag:{{ domainName | removeScheme | removeWww }}:{{ user }}:entry:{{ entry.id }}</id>
<updated>{{ entry.updatedAt|date('c') }}</updated>
<published>{{ entry.createdAt|date('c') }}</published>
{% for tag in entry.tags %}
<category term="{{ tag.slug }}" label="{{ tag.label }}" />
{% endfor %}
</channel>
</rss>
{% for author in entry.publishedBy %}
<author>
<name>{{ author }}</name>
</author>
{% endfor %}
<content type="html" {% if entry.language %}xml:lang="{{ entry.language[:2] }}"{% endif %}>
<![CDATA[{%- if entry.readingTime > 0 -%}{{ 'entry.list.reading_time_minutes'|trans({'%readingTime%': entry.readingTime}) }}{%- else -%}{{ 'entry.list.reading_time_less_one_minute'|trans|raw }}{%- endif %}{{ entry.content|raw -}}]]>
</content>
</entry>
{% endfor %}
</feed>

View file

@ -21,7 +21,7 @@
<div class="card-action">
<ul>
<li><a href="{{ path('config') }}">{{ 'quickstart.configure.language'|trans }}</a></li>
<li><a href="{{ path('config') }}#set2">{{ 'quickstart.configure.rss'|trans }}</a></li>
<li><a href="{{ path('config') }}#set2">{{ 'quickstart.configure.feed'|trans }}</a></li>
<li><a href="{{ path('config') }}#set5">{{ 'quickstart.more'|trans }}</a></li>
</ul>
</div>

View file

@ -12,7 +12,7 @@
<div class="div_tabs col s12">
<ul class="tabs">
<li class="tab col s12 m6 l3"><a class="active" href="#set1">{{ 'config.tab_menu.settings'|trans }}</a></li>
<li class="tab col s12 m6 l3"><a href="#set2">{{ 'config.tab_menu.rss'|trans }}</a></li>
<li class="tab col s12 m6 l3"><a href="#set2">{{ 'config.tab_menu.feed'|trans }}</a></li>
<li class="tab col s12 m6 l3"><a href="#set3">{{ 'config.tab_menu.user_info'|trans }}</a></li>
<li class="tab col s12 m6 l3"><a href="#set4">{{ 'config.tab_menu.password'|trans }}</a></li>
<li class="tab col s12 m6 l3"><a href="#set5">{{ 'config.tab_menu.rules'|trans }}</a></li>
@ -122,42 +122,42 @@
</div>
<div id="set2" class="col s12">
{{ form_start(form.rss) }}
{{ form_errors(form.rss) }}
{{ form_start(form.feed) }}
{{ form_errors(form.feed) }}
<div class="row">
<div class="input-field col s12">
{{ 'config.form_rss.description'|trans }}
{{ 'config.form_feed.description'|trans }}
</div>
</div>
<div class="row">
<div class="col s12">
<h6 class="grey-text">{{ 'config.form_rss.token_label'|trans }}</h6>
<h6 class="grey-text">{{ 'config.form_feed.token_label'|trans }}</h6>
<div>
{% if rss.token %}
{{ rss.token }}
{% if feed.token %}
{{ feed.token }}
{% else %}
<em>{{ 'config.form_rss.no_token'|trans }}</em>
<em>{{ 'config.form_feed.no_token'|trans }}</em>
{% endif %}
<a href="{{ path('generate_token') }}">
{% if rss.token %}
{{ 'config.form_rss.token_reset'|trans }}
{% if feed.token %}
{{ 'config.form_feed.token_reset'|trans }}
{% else %}
{{ 'config.form_rss.token_create'|trans }}
{{ 'config.form_feed.token_create'|trans }}
{% endif %}</a>
</div>
</div>
</div>
{% if rss.token %}
{% if feed.token %}
<div class="row">
<div class="col s12">
<h6 class="grey-text">{{ 'config.form_rss.rss_links'|trans }}</h6>
<h6 class="grey-text">{{ 'config.form_feed.feed_links'|trans }}</h6>
<ul>
<li><a href="{{ path('unread_rss', {'username': rss.username, 'token': rss.token}) }}">{{ 'config.form_rss.rss_link.unread'|trans }}</a></li>
<li><a href="{{ path('starred_rss', {'username': rss.username, 'token': rss.token}) }}">{{ 'config.form_rss.rss_link.starred'|trans }}</a></li>
<li><a href="{{ path('archive_rss', {'username': rss.username, 'token': rss.token}) }}">{{ 'config.form_rss.rss_link.archive'|trans }}</a></li>
<li><a href="{{ path('all_rss', {'username': rss.username, 'token': rss.token}) }}">{{ 'config.form_rss.rss_link.all'|trans }}</a></li>
<li><a href="{{ path('unread_feed', {'username': feed.username, 'token': feed.token}) }}">{{ 'config.form_feed.feed_link.unread'|trans }}</a></li>
<li><a href="{{ path('starred_feed', {'username': feed.username, 'token': feed.token}) }}">{{ 'config.form_feed.feed_link.starred'|trans }}</a></li>
<li><a href="{{ path('archive_feed', {'username': feed.username, 'token': feed.token}) }}">{{ 'config.form_feed.feed_link.archive'|trans }}</a></li>
<li><a href="{{ path('all_feed', {'username': feed.username, 'token': feed.token}) }}">{{ 'config.form_feed.feed_link.all'|trans }}</a></li>
</ul>
</div>
</div>
@ -165,14 +165,14 @@
<div class="row">
<div class="input-field col s12">
{{ form_label(form.rss.rss_limit) }}
{{ form_errors(form.rss.rss_limit) }}
{{ form_widget(form.rss.rss_limit) }}
{{ form_label(form.feed.feed_limit) }}
{{ form_errors(form.feed.feed_limit) }}
{{ form_widget(form.feed.feed_limit) }}
</div>
</div>
{{ form_widget(form.rss.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }}
{{ form_rest(form.rss) }}
{{ form_widget(form.feed.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }}
{{ form_rest(form.feed) }}
</form>
</div>

View file

@ -2,8 +2,8 @@
{% block head %}
{{ parent() }}
{% if tag is defined and app.user.config.rssToken %}
<link rel="alternate" type="application/rss+xml" href="{{ path('tag_rss', {'username': app.user.username, 'token': app.user.config.rssToken, 'slug': tag.slug}) }}" />
{% if tag is defined and app.user.config.feedToken %}
<link rel="alternate" type="application/atom+xml" href="{{ path('tag_feed', {'username': app.user.username, 'token': app.user.config.feedToken, 'slug': tag.slug}) }}" />
{% endif %}
{% endblock %}
@ -28,8 +28,8 @@
<div class="nb-results">
{{ 'entry.list.number_on_the_page'|transchoice(entries.count) }}
<a href="{{ path('switch_view_mode') }}"><i class="material-icons">{% if listMode == 0 %}view_list{% else %}view_module{% endif %}</i></a>
{% if app.user.config.rssToken %}
{% include "@WallabagCore/themes/common/Entry/_rss_link.html.twig" %}
{% if app.user.config.feedToken %}
{% include "@WallabagCore/themes/common/Entry/_feed_link.html.twig" %}
{% endif %}
</div>
{% if entries.getNbPages > 1 %}

View file

@ -26,7 +26,7 @@
</a>
{% endif %}
{% if app.user.config.rssToken %}
<a rel="alternate" type="application/rss+xml" href="{{ path('tag_rss', {'username': app.user.username, 'token': app.user.config.rssToken, 'slug': tag.slug}) }}" class="card-tag-rss"><i class="material-icons">rss_feed</i></a>
<a rel="alternate" type="application/atom+xml" href="{{ path('tag_feed', {'username': app.user.username, 'token': app.user.config.feedToken, 'slug': tag.slug}) }}" class="card-tag-rss"><i class="material-icons">rss_feed</i></a>
{% endif %}
</li>
{% endfor %}

View file

@ -5,7 +5,7 @@ namespace Wallabag\CoreBundle\Tools;
class Utils
{
/**
* Generate a token used for RSS.
* Generate a token used for Feeds.
*
* @param int $length Length of the token
*

View file

@ -28,6 +28,7 @@ class WallabagExtension extends \Twig_Extension implements \Twig_Extension_Globa
{
return [
new \Twig_SimpleFilter('removeWww', [$this, 'removeWww']),
new \Twig_SimpleFilter('removeScheme', [$this, 'removeScheme']),
new \Twig_SimpleFilter('removeSchemeAndWww', [$this, 'removeSchemeAndWww']),
];
}
@ -46,11 +47,14 @@ class WallabagExtension extends \Twig_Extension implements \Twig_Extension_Globa
return preg_replace('/^www\./i', '', $url);
}
public function removeScheme($url)
{
return preg_replace('#^https?://#i', '', $url);
}
public function removeSchemeAndWww($url)
{
return $this->removeWww(
preg_replace('@^https?://@i', '', $url)
);
return $this->removeWww($this->removeScheme($url)
}
/**

View file

@ -18,19 +18,19 @@ class CreateConfigListener implements EventSubscriberInterface
private $em;
private $theme;
private $itemsOnPage;
private $rssLimit;
private $feedLimit;
private $language;
private $readingSpeed;
private $actionMarkAsRead;
private $listMode;
private $session;
public function __construct(EntityManager $em, $theme, $itemsOnPage, $rssLimit, $language, $readingSpeed, $actionMarkAsRead, $listMode, Session $session)
public function __construct(EntityManager $em, $theme, $itemsOnPage, $feedLimit, $language, $readingSpeed, $actionMarkAsRead, $listMode, Session $session)
{
$this->em = $em;
$this->theme = $theme;
$this->itemsOnPage = $itemsOnPage;
$this->rssLimit = $rssLimit;
$this->feedLimit = $feedLimit;
$this->language = $language;
$this->readingSpeed = $readingSpeed;
$this->actionMarkAsRead = $actionMarkAsRead;
@ -54,7 +54,7 @@ class CreateConfigListener implements EventSubscriberInterface
$config = new Config($event->getUser());
$config->setTheme($this->theme);
$config->setItemsPerPage($this->itemsOnPage);
$config->setRssLimit($this->rssLimit);
$config->setFeedLimit($this->feedLimit);
$config->setLanguage($this->session->get('_locale', $this->language));
$config->setReadingSpeed($this->readingSpeed);
$config->setActionMarkAsRead($this->actionMarkAsRead);

View file

@ -9,18 +9,18 @@ use Wallabag\UserBundle\Entity\User;
class UserRepository extends EntityRepository
{
/**
* Find a user by its username and rss roken.
* Find a user by its username and Feed token.
*
* @param string $username
* @param string $rssToken
* @param string $feedToken
*
* @return User|null
* @return null|User
*/
public function findOneByUsernameAndRsstoken($username, $rssToken)
public function findOneByUsernameAndFeedtoken($username, $feedToken)
{
return $this->createQueryBuilder('u')
->leftJoin('u.config', 'c')
->where('c.rssToken = :rss_token')->setParameter('rss_token', $rssToken)
->where('c.feedToken = :feed_token')->setParameter('feed_token', $feedToken)
->andWhere('u.username = :username')->setParameter('username', $username)
->getQuery()
->getOneOrNullResult();

View file

@ -28,7 +28,7 @@ services:
- "@doctrine.orm.entity_manager"
- "%wallabag_core.theme%"
- "%wallabag_core.items_on_page%"
- "%wallabag_core.rss_limit%"
- "%wallabag_core.feed_limit%"
- "%wallabag_core.language%"
- "%wallabag_core.reading_speed%"
- "%wallabag_core.action_mark_as_read%"

View file

@ -33,7 +33,7 @@ class ConfigControllerTest extends WallabagCoreTestCase
$this->assertCount(1, $crawler->filter('button[id=config_save]'));
$this->assertCount(1, $crawler->filter('button[id=change_passwd_save]'));
$this->assertCount(1, $crawler->filter('button[id=update_user_save]'));
$this->assertCount(1, $crawler->filter('button[id=rss_config_save]'));
$this->assertCount(1, $crawler->filter('button[id=feed_config_save]'));
}
public function testUpdate()
@ -297,7 +297,7 @@ class ConfigControllerTest extends WallabagCoreTestCase
$this->assertContains('flashes.config.notice.user_updated', $alert[0]);
}
public function testRssUpdateResetToken()
public function testFeedUpdateResetToken()
{
$this->logInAs('admin');
$client = $this->getClient();
@ -313,7 +313,7 @@ class ConfigControllerTest extends WallabagCoreTestCase
}
$config = $user->getConfig();
$config->setRssToken(null);
$config->setFeedToken(null);
$em->persist($config);
$em->flush();
@ -322,7 +322,7 @@ class ConfigControllerTest extends WallabagCoreTestCase
$this->assertSame(200, $client->getResponse()->getStatusCode());
$this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(['_text']));
$this->assertContains('config.form_rss.no_token', $body[0]);
$this->assertContains('config.form_feed.no_token', $body[0]);
$client->request('GET', '/generate-token');
$this->assertSame(302, $client->getResponse()->getStatusCode());
@ -330,7 +330,7 @@ class ConfigControllerTest extends WallabagCoreTestCase
$crawler = $client->followRedirect();
$this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(['_text']));
$this->assertNotContains('config.form_rss.no_token', $body[0]);
$this->assertNotContains('config.form_feed.no_token', $body[0]);
}
public function testGenerateTokenAjax()
@ -351,7 +351,7 @@ class ConfigControllerTest extends WallabagCoreTestCase
$this->assertArrayHasKey('token', $content);
}
public function testRssUpdate()
public function testFeedUpdate()
{
$this->logInAs('admin');
$client = $this->getClient();
@ -360,10 +360,10 @@ class ConfigControllerTest extends WallabagCoreTestCase
$this->assertSame(200, $client->getResponse()->getStatusCode());
$form = $crawler->filter('button[id=rss_config_save]')->form();
$form = $crawler->filter('button[id=feed_config_save]')->form();
$data = [
'rss_config[rss_limit]' => 12,
'feed_config[feed_limit]' => 12,
];
$client->submit($form, $data);
@ -372,31 +372,31 @@ class ConfigControllerTest extends WallabagCoreTestCase
$crawler = $client->followRedirect();
$this->assertContains('flashes.config.notice.rss_updated', $crawler->filter('body')->extract(['_text'])[0]);
$this->assertContains('flashes.config.notice.feed_updated', $crawler->filter('body')->extract(['_text'])[0]);
}
public function dataForRssFailed()
public function dataForFeedFailed()
{
return [
[
[
'rss_config[rss_limit]' => 0,
'feed_config[feed_limit]' => 0,
],
'This value should be 1 or more.',
],
[
[
'rss_config[rss_limit]' => 1000000000000,
'feed_config[feed_limit]' => 1000000000000,
],
'validator.rss_limit_too_high',
'validator.feed_limit_too_high',
],
];
}
/**
* @dataProvider dataForRssFailed
* @dataProvider dataForFeedFailed
*/
public function testRssFailed($data, $expectedMessage)
public function testFeedFailed($data, $expectedMessage)
{
$this->logInAs('admin');
$client = $this->getClient();
@ -405,7 +405,7 @@ class ConfigControllerTest extends WallabagCoreTestCase
$this->assertSame(200, $client->getResponse()->getStatusCode());
$form = $crawler->filter('button[id=rss_config_save]')->form();
$form = $crawler->filter('button[id=feed_config_save]')->form();
$crawler = $client->submit($form, $data);

View file

@ -0,0 +1,228 @@
<?php
namespace Tests\Wallabag\CoreBundle\Controller;
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
class FeedControllerTest extends WallabagCoreTestCase
{
public function validateDom($xml, $type, $nb = null, $tagValue = null)
{
$doc = new \DOMDocument();
$doc->loadXML($xml);
$xpath = new \DOMXpath($doc);
$xpath->registerNamespace('a', 'http://www.w3.org/2005/Atom');
if (null === $nb) {
$this->assertGreaterThan(0, $xpath->query('//a:entry')->length);
} else {
$this->assertEquals($nb, $xpath->query('//a:entry')->length);
}
$this->assertEquals(1, $xpath->query('/a:feed')->length);
$this->assertEquals(1, $xpath->query('/a:feed/a:title')->length);
$this->assertContains('favicon.ico', $xpath->query('/a:feed/a:icon')->item(0)->nodeValue);
$this->assertContains('logo-square.png', $xpath->query('/a:feed/a:logo')->item(0)->nodeValue);
$this->assertEquals(1, $xpath->query('/a:feed/a:updated')->length);
$this->assertEquals(1, $xpath->query('/a:feed/a:generator')->length);
$this->assertEquals('wallabag', $xpath->query('/a:feed/a:generator')->item(0)->nodeValue);
$this->assertEquals('admin', $xpath->query('/a:feed/a:author/a:name')->item(0)->nodeValue);
$this->assertEquals(1, $xpath->query('/a:feed/a:subtitle')->length);
if (null !== $tagValue && 0 === strpos($type, 'tag')) {
$this->assertEquals('wallabag — '.$type.' '.$tagValue.' feed', $xpath->query('/a:feed/a:title')->item(0)->nodeValue);
$this->assertEquals('Atom feed for entries tagged with ' . $tagValue, $xpath->query('/a:feed/a:subtitle')->item(0)->nodeValue);
} else {
$this->assertEquals('wallabag — '.$type.' feed', $xpath->query('/a:feed/a:title')->item(0)->nodeValue);
$this->assertEquals('Atom feed for ' . $type . ' entries', $xpath->query('/a:feed/a:subtitle')->item(0)->nodeValue);
}
$this->assertEquals(1, $xpath->query('/a:feed/a:link[@rel="self"]')->length);
$this->assertContains($type, $xpath->query('/a:feed/a:link[@rel="self"]')->item(0)->getAttribute('href'));
$this->assertEquals(1, $xpath->query('/a:feed/a:link[@rel="last"]')->length);
foreach ($xpath->query('//a:entry') as $item) {
$this->assertEquals(1, $xpath->query('a:title', $item)->length);
$this->assertEquals(1, $xpath->query('a:link[@rel="via"]', $item)->length);
$this->assertEquals(1, $xpath->query('a:link[@rel="alternate"]', $item)->length);
$this->assertEquals(1, $xpath->query('a:id', $item)->length);
$this->assertEquals(1, $xpath->query('a:published', $item)->length);
$this->assertEquals(1, $xpath->query('a:content', $item)->length);
}
}
public function dataForBadUrl()
{
return [
[
'/feed/admin/YZIOAUZIAO/unread',
],
[
'/feed/wallace/YZIOAUZIAO/starred',
],
[
'/feed/wallace/YZIOAUZIAO/archives',
],
[
'/feed/wallace/YZIOAUZIAO/all',
],
];
}
/**
* @dataProvider dataForBadUrl
*/
public function testBadUrl($url)
{
$client = $this->getClient();
$client->request('GET', $url);
$this->assertSame(404, $client->getResponse()->getStatusCode());
}
public function testUnread()
{
$client = $this->getClient();
$em = $client->getContainer()->get('doctrine.orm.entity_manager');
$user = $em
->getRepository('WallabagUserBundle:User')
->findOneByUsername('admin');
$config = $user->getConfig();
$config->setFeedToken('SUPERTOKEN');
$config->setFeedLimit(2);
$em->persist($config);
$em->flush();
$client->request('GET', '/feed/admin/SUPERTOKEN/unread');
$this->assertSame(200, $client->getResponse()->getStatusCode());
$this->validateDom($client->getResponse()->getContent(), 'unread', 2);
}
public function testStarred()
{
$client = $this->getClient();
$em = $client->getContainer()->get('doctrine.orm.entity_manager');
$user = $em
->getRepository('WallabagUserBundle:User')
->findOneByUsername('admin');
$config = $user->getConfig();
$config->setFeedToken('SUPERTOKEN');
$config->setFeedLimit(1);
$em->persist($config);
$em->flush();
$client = $this->getClient();
$client->request('GET', '/feed/admin/SUPERTOKEN/starred');
$this->assertSame(200, $client->getResponse()->getStatusCode(), 1);
$this->validateDom($client->getResponse()->getContent(), 'starred');
}
public function testArchives()
{
$client = $this->getClient();
$em = $client->getContainer()->get('doctrine.orm.entity_manager');
$user = $em
->getRepository('WallabagUserBundle:User')
->findOneByUsername('admin');
$config = $user->getConfig();
$config->setFeedToken('SUPERTOKEN');
$config->setFeedLimit(null);
$em->persist($config);
$em->flush();
$client = $this->getClient();
$client->request('GET', '/feed/admin/SUPERTOKEN/archive');
$this->assertSame(200, $client->getResponse()->getStatusCode());
$this->validateDom($client->getResponse()->getContent(), 'archive');
}
public function testAll()
{
$client = $this->getClient();
$em = $client->getContainer()->get('doctrine.orm.entity_manager');
$user = $em
->getRepository('WallabagUserBundle:User')
->findOneByUsername('admin');
$config = $user->getConfig();
$config->setFeedToken('SUPERTOKEN');
$config->setFeedLimit(null);
$em->persist($config);
$em->flush();
$client = $this->getClient();
$client->request('GET', '/feed/admin/SUPERTOKEN/all');
$this->assertSame(200, $client->getResponse()->getStatusCode());
$this->validateDom($client->getResponse()->getContent(), 'all');
}
public function testPagination()
{
$client = $this->getClient();
$em = $client->getContainer()->get('doctrine.orm.entity_manager');
$user = $em
->getRepository('WallabagUserBundle:User')
->findOneByUsername('admin');
$config = $user->getConfig();
$config->setFeedToken('SUPERTOKEN');
$config->setFeedLimit(1);
$em->persist($config);
$em->flush();
$client = $this->getClient();
$client->request('GET', '/feed/admin/SUPERTOKEN/unread');
$this->assertEquals(200, $client->getResponse()->getStatusCode());
$this->validateDom($client->getResponse()->getContent(), 'unread');
$client->request('GET', '/feed/admin/SUPERTOKEN/unread/2');
$this->assertEquals(200, $client->getResponse()->getStatusCode());
$this->validateDom($client->getResponse()->getContent(), 'unread');
$client->request('GET', '/feed/admin/SUPERTOKEN/unread/3000');
$this->assertEquals(302, $client->getResponse()->getStatusCode());
}
public function testTags()
{
$client = $this->getClient();
$em = $client->getContainer()->get('doctrine.orm.entity_manager');
$user = $em
->getRepository('WallabagUserBundle:User')
->findOneByUsername('admin');
$config = $user->getConfig();
$config->setFeedToken('SUPERTOKEN');
$config->setFeedLimit(null);
$em->persist($config);
$em->flush();
$client = $this->getClient();
$client->request('GET', '/admin/SUPERTOKEN/tags/foo-bar.xml');
$this->assertSame(200, $client->getResponse()->getStatusCode());
$this->validateDom($client->getResponse()->getContent(), 'tag', 2, 'foo-bar');
$client->request('GET', '/admin/SUPERTOKEN/tags/foo-bar.xml?page=3000');
$this->assertSame(302, $client->getResponse()->getStatusCode());
}
}

View file

@ -1,221 +0,0 @@
<?php
namespace Tests\Wallabag\CoreBundle\Controller;
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
class RssControllerTest extends WallabagCoreTestCase
{
public function validateDom($xml, $type, $urlPagination, $nb = null)
{
$doc = new \DOMDocument();
$doc->loadXML($xml);
$xpath = new \DOMXPath($doc);
if (null === $nb) {
$this->assertGreaterThan(0, $xpath->query('//item')->length);
} else {
$this->assertSame($nb, $xpath->query('//item')->length);
}
$this->assertSame(1, $xpath->query('/rss')->length);
$this->assertSame(1, $xpath->query('/rss/channel')->length);
$this->assertSame(1, $xpath->query('/rss/channel/title')->length);
$this->assertSame('wallabag - ' . $type . ' feed', $xpath->query('/rss/channel/title')->item(0)->nodeValue);
$this->assertSame(1, $xpath->query('/rss/channel/pubDate')->length);
$this->assertSame(1, $xpath->query('/rss/channel/generator')->length);
$this->assertSame('wallabag', $xpath->query('/rss/channel/generator')->item(0)->nodeValue);
$this->assertSame(1, $xpath->query('/rss/channel/description')->length);
$this->assertSame('wallabag ' . $type . ' elements', $xpath->query('/rss/channel/description')->item(0)->nodeValue);
$this->assertSame(1, $xpath->query('/rss/channel/link[@rel="self"]')->length);
$this->assertContains($urlPagination . '.xml', $xpath->query('/rss/channel/link[@rel="self"]')->item(0)->getAttribute('href'));
$this->assertSame(1, $xpath->query('/rss/channel/link[@rel="last"]')->length);
$this->assertContains($urlPagination . '.xml?page=', $xpath->query('/rss/channel/link[@rel="last"]')->item(0)->getAttribute('href'));
foreach ($xpath->query('//item') as $item) {
$this->assertSame(1, $xpath->query('title', $item)->length);
$this->assertSame(1, $xpath->query('source', $item)->length);
$this->assertSame(1, $xpath->query('link', $item)->length);
$this->assertSame(1, $xpath->query('guid', $item)->length);
$this->assertSame(1, $xpath->query('pubDate', $item)->length);
$this->assertSame(1, $xpath->query('description', $item)->length);
}
}
public function dataForBadUrl()
{
return [
[
'/admin/YZIOAUZIAO/unread.xml',
],
[
'/wallace/YZIOAUZIAO/starred.xml',
],
[
'/wallace/YZIOAUZIAO/archives.xml',
],
[
'/wallace/YZIOAUZIAO/all.xml',
],
];
}
/**
* @dataProvider dataForBadUrl
*/
public function testBadUrl($url)
{
$client = $this->getClient();
$client->request('GET', $url);
$this->assertSame(404, $client->getResponse()->getStatusCode());
}
public function testUnread()
{
$client = $this->getClient();
$em = $client->getContainer()->get('doctrine.orm.entity_manager');
$user = $em
->getRepository('WallabagUserBundle:User')
->findOneByUsername('admin');
$config = $user->getConfig();
$config->setRssToken('SUPERTOKEN');
$config->setRssLimit(2);
$em->persist($config);
$em->flush();
$client->request('GET', '/admin/SUPERTOKEN/unread.xml');
$this->assertSame(200, $client->getResponse()->getStatusCode());
$this->validateDom($client->getResponse()->getContent(), 'unread', 'unread', 2);
}
public function testStarred()
{
$client = $this->getClient();
$em = $client->getContainer()->get('doctrine.orm.entity_manager');
$user = $em
->getRepository('WallabagUserBundle:User')
->findOneByUsername('admin');
$config = $user->getConfig();
$config->setRssToken('SUPERTOKEN');
$config->setRssLimit(1);
$em->persist($config);
$em->flush();
$client = $this->getClient();
$client->request('GET', '/admin/SUPERTOKEN/starred.xml');
$this->assertSame(200, $client->getResponse()->getStatusCode(), 1);
$this->validateDom($client->getResponse()->getContent(), 'starred', 'starred');
}
public function testArchives()
{
$client = $this->getClient();
$em = $client->getContainer()->get('doctrine.orm.entity_manager');
$user = $em
->getRepository('WallabagUserBundle:User')
->findOneByUsername('admin');
$config = $user->getConfig();
$config->setRssToken('SUPERTOKEN');
$config->setRssLimit(null);
$em->persist($config);
$em->flush();
$client = $this->getClient();
$client->request('GET', '/admin/SUPERTOKEN/archive.xml');
$this->assertSame(200, $client->getResponse()->getStatusCode());
$this->validateDom($client->getResponse()->getContent(), 'archive', 'archive');
}
public function testAll()
{
$client = $this->getClient();
$em = $client->getContainer()->get('doctrine.orm.entity_manager');
$user = $em
->getRepository('WallabagUserBundle:User')
->findOneByUsername('admin');
$config = $user->getConfig();
$config->setRssToken('SUPERTOKEN');
$config->setRssLimit(null);
$em->persist($config);
$em->flush();
$client = $this->getClient();
$client->request('GET', '/admin/SUPERTOKEN/all.xml');
$this->assertSame(200, $client->getResponse()->getStatusCode());
$this->validateDom($client->getResponse()->getContent(), 'all', 'all');
}
public function testPagination()
{
$client = $this->getClient();
$em = $client->getContainer()->get('doctrine.orm.entity_manager');
$user = $em
->getRepository('WallabagUserBundle:User')
->findOneByUsername('admin');
$config = $user->getConfig();
$config->setRssToken('SUPERTOKEN');
$config->setRssLimit(1);
$em->persist($config);
$em->flush();
$client = $this->getClient();
$client->request('GET', '/admin/SUPERTOKEN/unread.xml');
$this->assertSame(200, $client->getResponse()->getStatusCode());
$this->validateDom($client->getResponse()->getContent(), 'unread', 'unread');
$client->request('GET', '/admin/SUPERTOKEN/unread.xml?page=2');
$this->assertSame(200, $client->getResponse()->getStatusCode());
$this->validateDom($client->getResponse()->getContent(), 'unread', 'unread');
$client->request('GET', '/admin/SUPERTOKEN/unread.xml?page=3000');
$this->assertSame(302, $client->getResponse()->getStatusCode());
}
public function testTags()
{
$client = $this->getClient();
$em = $client->getContainer()->get('doctrine.orm.entity_manager');
$user = $em
->getRepository('WallabagUserBundle:User')
->findOneByUsername('admin');
$config = $user->getConfig();
$config->setRssToken('SUPERTOKEN');
$config->setRssLimit(null);
$em->persist($config);
$em->flush();
$client = $this->getClient();
$client->request('GET', '/admin/SUPERTOKEN/tags/foo.xml');
$this->assertSame(200, $client->getResponse()->getStatusCode());
$this->validateDom($client->getResponse()->getContent(), 'tag (foo)', 'tags/foo');
$client->request('GET', '/admin/SUPERTOKEN/tags/foo.xml?page=3000');
$this->assertSame(302, $client->getResponse()->getStatusCode());
}
}

View file

@ -23,7 +23,7 @@ class SecurityControllerTest extends WallabagCoreTestCase
$client->followRedirects();
$crawler = $client->request('GET', '/config');
$this->assertContains('config.form_rss.description', $crawler->filter('body')->extract(['_text'])[0]);
$this->assertContains('config.form_feed.description', $crawler->filter('body')->extract(['_text'])[0]);
}
public function testLoginWith2FactorEmail()

View file

@ -5,15 +5,15 @@ namespace Tests\Wallabag\CoreBundle\ParamConverter;
use PHPUnit\Framework\TestCase;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
use Symfony\Component\HttpFoundation\Request;
use Wallabag\CoreBundle\ParamConverter\UsernameRssTokenConverter;
use Wallabag\CoreBundle\ParamConverter\UsernameFeedTokenConverter;
use Wallabag\UserBundle\Entity\User;
class UsernameRssTokenConverterTest extends TestCase
class UsernameFeedTokenConverterTest extends TestCase
{
public function testSupportsWithNoRegistry()
{
$params = new ParamConverter([]);
$converter = new UsernameRssTokenConverter();
$converter = new UsernameFeedTokenConverter();
$this->assertFalse($converter->supports($params));
}
@ -29,7 +29,7 @@ class UsernameRssTokenConverterTest extends TestCase
->will($this->returnValue([]));
$params = new ParamConverter([]);
$converter = new UsernameRssTokenConverter($registry);
$converter = new UsernameFeedTokenConverter($registry);
$this->assertFalse($converter->supports($params));
}
@ -45,7 +45,7 @@ class UsernameRssTokenConverterTest extends TestCase
->will($this->returnValue(['default' => null]));
$params = new ParamConverter([]);
$converter = new UsernameRssTokenConverter($registry);
$converter = new UsernameFeedTokenConverter($registry);
$this->assertFalse($converter->supports($params));
}
@ -83,7 +83,7 @@ class UsernameRssTokenConverterTest extends TestCase
->will($this->returnValue($em));
$params = new ParamConverter(['class' => 'superclass']);
$converter = new UsernameRssTokenConverter($registry);
$converter = new UsernameFeedTokenConverter($registry);
$this->assertFalse($converter->supports($params));
}
@ -121,7 +121,7 @@ class UsernameRssTokenConverterTest extends TestCase
->will($this->returnValue($em));
$params = new ParamConverter(['class' => 'WallabagUserBundle:User']);
$converter = new UsernameRssTokenConverter($registry);
$converter = new UsernameFeedTokenConverter($registry);
$this->assertTrue($converter->supports($params));
}
@ -129,7 +129,7 @@ class UsernameRssTokenConverterTest extends TestCase
public function testApplyEmptyRequest()
{
$params = new ParamConverter([]);
$converter = new UsernameRssTokenConverter();
$converter = new UsernameFeedTokenConverter();
$res = $converter->apply(new Request(), $params);
@ -147,7 +147,7 @@ class UsernameRssTokenConverterTest extends TestCase
->getMock();
$repo->expects($this->once())
->method('findOneByUsernameAndRsstoken')
->method('findOneByUsernameAndFeedToken')
->with('test', 'test')
->will($this->returnValue(null));
@ -170,7 +170,7 @@ class UsernameRssTokenConverterTest extends TestCase
->will($this->returnValue($em));
$params = new ParamConverter(['class' => 'WallabagUserBundle:User']);
$converter = new UsernameRssTokenConverter($registry);
$converter = new UsernameFeedTokenConverter($registry);
$request = new Request([], [], ['username' => 'test', 'token' => 'test']);
$converter->apply($request, $params);
@ -185,7 +185,7 @@ class UsernameRssTokenConverterTest extends TestCase
->getMock();
$repo->expects($this->once())
->method('findOneByUsernameAndRsstoken')
->method('findOneByUsernameAndFeedtoken')
->with('test', 'test')
->will($this->returnValue($user));
@ -208,7 +208,7 @@ class UsernameRssTokenConverterTest extends TestCase
->will($this->returnValue($em));
$params = new ParamConverter(['class' => 'WallabagUserBundle:User', 'name' => 'user']);
$converter = new UsernameRssTokenConverter($registry);
$converter = new UsernameFeedTokenConverter($registry);
$request = new Request([], [], ['username' => 'test', 'token' => 'test']);
$converter->apply($request, $params);

View file

@ -32,6 +32,31 @@ class WallabagExtensionTest extends TestCase
$this->assertSame('gist.github.com', $extension->removeWww('gist.github.com'));
}
public function testRemoveScheme()
{
$entryRepository = $this->getMockBuilder('Wallabag\CoreBundle\Repository\EntryRepository')
->disableOriginalConstructor()
->getMock();
$tagRepository = $this->getMockBuilder('Wallabag\CoreBundle\Repository\TagRepository')
->disableOriginalConstructor()
->getMock();
$tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')
->disableOriginalConstructor()
->getMock();
$translator = $this->getMockBuilder('Symfony\Component\Translation\TranslatorInterface')
->disableOriginalConstructor()
->getMock();
$extension = new WallabagExtension($entryRepository, $tagRepository, $tokenStorage, 0, $translator);
$this->assertEquals('lemonde.fr', $extension->removeScheme('lemonde.fr'));
$this->assertEquals('gist.github.com', $extension->removeScheme('gist.github.com'));
$this->assertEquals('gist.github.com', $extension->removeScheme('https://gist.github.com'));
}
public function testRemoveSchemeAndWww()
{
$entryRepository = $this->getMockBuilder('Wallabag\CoreBundle\Repository\EntryRepository')

View file

@ -62,7 +62,7 @@ class CreateConfigListenerTest extends TestCase
$config = new Config($user);
$config->setTheme('baggy');
$config->setItemsPerPage(20);
$config->setRssLimit(50);
$config->setFeedLimit(50);
$config->setLanguage('fr');
$config->setReadingSpeed(1);