aboutsummaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
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