aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--messages.pot36
-rw-r--r--pyaggr3g470r/templates/feed.html14
-rw-r--r--pyaggr3g470r/translations/fr/LC_MESSAGES/messages.mobin15318 -> 15239 bytes
-rw-r--r--pyaggr3g470r/translations/fr/LC_MESSAGES/messages.po43
-rw-r--r--pyaggr3g470r/views/feed.py8
5 files changed, 47 insertions, 54 deletions
diff --git a/messages.pot b/messages.pot
index e54e116e..d4d54557 100644
--- a/messages.pot
+++ b/messages.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
-"POT-Creation-Date: 2015-03-17 18:22+0100\n"
+"POT-Creation-Date: 2015-03-23 19:20+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -299,55 +299,51 @@ msgstr ""
msgid "articles"
msgstr ""
-#: pyaggr3g470r/templates/feed.html:14
-msgid "of the database"
+#: pyaggr3g470r/templates/feed.html:13
+msgid "Address of the feed"
+msgstr ""
+
+#: pyaggr3g470r/templates/feed.html:15
+msgid "Address of the site"
msgstr ""
-#: pyaggr3g470r/templates/feed.html:18
+#: pyaggr3g470r/templates/feed.html:21
msgid "Last download:"
msgstr ""
-#: pyaggr3g470r/templates/feed.html:22
+#: pyaggr3g470r/templates/feed.html:25
msgid ""
"That feed has encountered too much consecutive errors and won't be "
"retrieved anymore."
msgstr ""
-#: pyaggr3g470r/templates/feed.html:24
+#: pyaggr3g470r/templates/feed.html:27
msgid ""
"The download of this feed has encountered some problems. However its "
"error counter will be reinitialized at the next successful retrieving."
msgstr ""
-#: pyaggr3g470r/templates/feed.html:28
-msgid "Here's the last error encountered while retrieving this feed:"
-msgstr ""
-
#: pyaggr3g470r/templates/feed.html:31
-msgid "Address of the feed"
-msgstr ""
-
-#: pyaggr3g470r/templates/feed.html:33
-msgid "Address of the site"
+msgid "Here's the last error encountered while retrieving this feed:"
msgstr ""
-#: pyaggr3g470r/templates/feed.html:37
+#: pyaggr3g470r/templates/feed.html:35
msgid "The last article was posted"
msgstr ""
-#: pyaggr3g470r/templates/feed.html:37
+#: pyaggr3g470r/templates/feed.html:35
msgid "day(s) ago."
msgstr ""
-#: pyaggr3g470r/templates/feed.html:38
+#: pyaggr3g470r/templates/feed.html:36
msgid "Daily average"
msgstr ""
-#: pyaggr3g470r/templates/feed.html:38
+#: pyaggr3g470r/templates/feed.html:36
msgid "between the"
msgstr ""
-#: pyaggr3g470r/templates/feed.html:38
+#: pyaggr3g470r/templates/feed.html:36
msgid "and the"
msgstr ""
diff --git a/pyaggr3g470r/templates/feed.html b/pyaggr3g470r/templates/feed.html
index 4b050573..c7dfecc2 100644
--- a/pyaggr3g470r/templates/feed.html
+++ b/pyaggr3g470r/templates/feed.html
@@ -9,11 +9,14 @@
</div>
<div class="jumbotron">
<p>
- {{ _('This feed contains') }} {{ feed.articles.all()|count }} <a href="/articles/{{ feed.id }}/100">{{ _('articles') }}</a>
- {% if nb_articles != 0 %}
- ({{ ((feed.articles.all()|count * 100 ) / nb_articles) | round(2, 'floor') }}% {{ _('of the database') }}).<br />
+ {{ _('This feed contains') }} {{ feed.articles.all()|count }} <a href="/articles/{{ feed.id }}/100">{{ _('articles') }}</a>.<br />
+ {{ _('Address of the feed') }}: <a href="{{ feed.link }}" target="_blank">{{ feed.link }}</a><br />
+ {% if feed.site_link != "" %}
+ {{ _('Address of the site') }}: <a href="{{ feed.site_link }}" target="_blank">{{ feed.site_link }}</a><br />
{% endif %}
+ <br />
+
{% if feed.last_retrieved %}
{{ _("Last download:") }} {{ feed.last_retrieved | datetime }}<br />
{% endif %}
@@ -28,11 +31,6 @@
{{ _("Here's the last error encountered while retrieving this feed:") }} <pre>{{ feed.last_error }}</pre><br />
{% endif %}
- {{ _('Address of the feed') }}: <a href="{{ feed.link }}">{{ feed.link }}</a><br />
- {% if feed.site_link != "" %}
- {{ _('Address of the site') }}: <a href="{{ feed.site_link }}">{{ feed.site_link }}</a><br />
- {% endif %}
-
{% if feed.articles.all()|count != 0 %}
{{ _('The last article was posted') }} {{ elapsed.days }} {{ _('day(s) ago.') }}<br />
{{ _('Daily average') }}: {{ average }}, {{ _('between the') }} {{ first_post_date | datetime }} {{ _('and the') }} {{ end_post_date | datetime }}.
diff --git a/pyaggr3g470r/translations/fr/LC_MESSAGES/messages.mo b/pyaggr3g470r/translations/fr/LC_MESSAGES/messages.mo
index 8f232509..9f133872 100644
--- a/pyaggr3g470r/translations/fr/LC_MESSAGES/messages.mo
+++ b/pyaggr3g470r/translations/fr/LC_MESSAGES/messages.mo
Binary files differ
diff --git a/pyaggr3g470r/translations/fr/LC_MESSAGES/messages.po b/pyaggr3g470r/translations/fr/LC_MESSAGES/messages.po
index fdf98b3b..4a22ef8c 100644
--- a/pyaggr3g470r/translations/fr/LC_MESSAGES/messages.po
+++ b/pyaggr3g470r/translations/fr/LC_MESSAGES/messages.po
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
-"POT-Creation-Date: 2015-03-17 18:22+0100\n"
-"PO-Revision-Date: 2015-03-17 18:22+0100\n"
+"POT-Creation-Date: 2015-03-23 19:20+0100\n"
+"PO-Revision-Date: 2015-03-23 19:21+0100\n"
"Last-Translator: Cédric Bonhomme <cedric@cedricbonhomme.org>\n"
"Language-Team: fr <LL@li.org>\n"
"Language: fr\n"
@@ -319,22 +319,26 @@ msgstr "Ce flux contient"
msgid "articles"
msgstr "articles"
-#: pyaggr3g470r/templates/feed.html:14
-msgid "of the database"
-msgstr "de la base de données"
+#: pyaggr3g470r/templates/feed.html:13
+msgid "Address of the feed"
+msgstr "Adresse du flux"
-#: pyaggr3g470r/templates/feed.html:18
+#: pyaggr3g470r/templates/feed.html:15
+msgid "Address of the site"
+msgstr "Adresse du site"
+
+#: pyaggr3g470r/templates/feed.html:21
msgid "Last download:"
msgstr "Dernier téléchargement:"
-#: pyaggr3g470r/templates/feed.html:22
+#: pyaggr3g470r/templates/feed.html:25
msgid ""
"That feed has encountered too much consecutive errors and won't be retrieved "
"anymore."
msgstr ""
"Ce flux a rencontré trop d'erreurs consécutives et ne sera plus récupéré."
-#: pyaggr3g470r/templates/feed.html:24
+#: pyaggr3g470r/templates/feed.html:27
msgid ""
"The download of this feed has encountered some problems. However its error "
"counter will be reinitialized at the next successful retrieving."
@@ -343,35 +347,27 @@ msgstr ""
"compteur d'erreurs sera réinitialisé lors de la prochaine récupération "
"réussie."
-#: pyaggr3g470r/templates/feed.html:28
+#: pyaggr3g470r/templates/feed.html:31
msgid "Here's the last error encountered while retrieving this feed:"
msgstr "Voici la dernière erreur survenue lors de la récupération ce flux:"
-#: pyaggr3g470r/templates/feed.html:31
-msgid "Address of the feed"
-msgstr "Adresse du flux"
-
-#: pyaggr3g470r/templates/feed.html:33
-msgid "Address of the site"
-msgstr "Adresse du site"
-
-#: pyaggr3g470r/templates/feed.html:37
+#: pyaggr3g470r/templates/feed.html:35
msgid "The last article was posted"
msgstr "Le dernier article a été posté il y a"
-#: pyaggr3g470r/templates/feed.html:37
+#: pyaggr3g470r/templates/feed.html:35
msgid "day(s) ago."
msgstr "jours."
-#: pyaggr3g470r/templates/feed.html:38
+#: pyaggr3g470r/templates/feed.html:36
msgid "Daily average"
msgstr "Moyenne journalière"
-#: pyaggr3g470r/templates/feed.html:38
+#: pyaggr3g470r/templates/feed.html:36
msgid "between the"
msgstr "entre le"
-#: pyaggr3g470r/templates/feed.html:38
+#: pyaggr3g470r/templates/feed.html:36
msgid "and the"
msgstr "et le"
@@ -894,6 +890,9 @@ msgstr "activé avec succès."
msgid "successfully disabled."
msgstr "désactivé avec succès."
+#~ msgid "of the database"
+#~ msgstr "de la base de données"
+
#~ msgid "Email notification"
#~ msgstr "Notification par email"
diff --git a/pyaggr3g470r/views/feed.py b/pyaggr3g470r/views/feed.py
index 2e39ee4b..4fe4e5da 100644
--- a/pyaggr3g470r/views/feed.py
+++ b/pyaggr3g470r/views/feed.py
@@ -3,6 +3,7 @@
from datetime import datetime
from flask import Blueprint, g, render_template
+from sqlalchemy import desc
from pyaggr3g470r import controllers, utils
from pyaggr3g470r.decorators import pyagg_default_decorator, \
@@ -25,9 +26,9 @@ def feed(feed_id=None):
"Presents detailed information about a feed."
feed = controllers.FeedController(g.user.id).get(id=feed_id)
word_size = 6
- articles = controllers.ArticleController(g.user.id)\
- .read(feed_id=feed_id).all()
- nb_articles = controllers.ArticleController(g.user.id).read().count()
+ articles = controllers.ArticleController(g.user.id) \
+ .read(feed_id=feed_id) \
+ .order_by(desc("Article.date")).all()
top_words = utils.top_words(articles, n=50, size=int(word_size))
tag_cloud = utils.tag_cloud(top_words)
@@ -49,5 +50,4 @@ def feed(feed_id=None):
feed=feed, tag_cloud=tag_cloud,
first_post_date=first_article,
end_post_date=last_article,
- nb_articles=nb_articles,
average=average, delta=delta, elapsed=elapsed)
bgstack15