aboutsummaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCédric Bonhomme <kimble.mandel@gmail.com>2013-02-02 21:42:22 +0100
committerCédric Bonhomme <kimble.mandel@gmail.com>2013-02-02 21:42:22 +0100
commit523f26aa17197e3642c611cd8de5a435ee207085 (patch)
tree5d6a939fc481b42efcd9d7f7b9130e178ad786ce /source
parentminor bugfix in the anchors introduced previously. (diff)
downloadnewspipe-523f26aa17197e3642c611cd8de5a435ee207085.tar.gz
newspipe-523f26aa17197e3642c611cd8de5a435ee207085.tar.bz2
newspipe-523f26aa17197e3642c611cd8de5a435ee207085.zip
language codes remplaced by language name.
Diffstat (limited to 'source')
-rwxr-xr-xsource/pyAggr3g470r.py4
-rw-r--r--source/templates/languages.html2
2 files changed, 3 insertions, 3 deletions
diff --git a/source/pyAggr3g470r.py b/source/pyAggr3g470r.py
index d61d4e73..b3392151 100755
--- a/source/pyAggr3g470r.py
+++ b/source/pyAggr3g470r.py
@@ -457,7 +457,7 @@ class pyAggr3g470r(object):
Filter by languages.
"""
try:
- from guess_language import guess_language
+ from guess_language import guess_language_name
except:
tmpl = lookup.get_template("error.html")
return tmpl.render(message='<p>Module <i><a href="https://bitbucket.org/spirit/guess_language/">guess_language</a></i> not installed.</p>')
@@ -465,7 +465,7 @@ class pyAggr3g470r(object):
feeds = self.mongo.get_all_feeds()
for feed in feeds:
for article in self.mongo.get_articles(feed["feed_id"]):
- language = guess_language(utils.clear_string(article["article_content"]))
+ language = guess_language_name(utils.clear_string(article["article_content"]))
if language not in result.keys():
result[language] = {}
if feed["feed_id"] not in result[language].keys():
diff --git a/source/templates/languages.html b/source/templates/languages.html
index 0d209a8e..a6d0f5ec 100644
--- a/source/templates/languages.html
+++ b/source/templates/languages.html
@@ -4,7 +4,7 @@
<h1>Summary</h1>
<ul>
%for language in articles_sorted_by_languages.keys():
- <li><a href="#${language}">${language}</a>: ${sum(map(len, articles_sorted_by_languages[language].values()))} articles</li>
+ <li><a href="#${language}">${language}</a>: ${sum(map(len, articles_sorted_by_languages[${language}].values()))} articles</li>
%endfor
</ul>
%for language in articles_sorted_by_languages.keys():
bgstack15