Skip to content
Browse files
Fixed typo.
  • Loading branch information
felixfontein committed Sep 9, 2015
1 parent ed0212b commit 023f28768cc66e72dd595de5c9479c798f07f289
Showing 1 changed file with 3 additions and 3 deletions.
@@ -54,11 +54,11 @@ def set_site(self, site):
site.register_path_handler('section_index_atom', self.index_section_atom_path)
return super(Indexes, self).set_site(site)

def _get_filtered_posts(self, language, show_untranslated_posts):
def _get_filtered_posts(self, lang, show_untranslated_posts):
if show_untranslated_posts:
return [x for x in if x.is_translation_available(language)]
return [x for x in if x.is_translation_available(lang)]

def _compute_number_of_pages(self, filtered_posts, posts_count):
return min(1, (len(filtered_posts) + posts_count - 1) // posts_count)
@@ -95,7 +95,7 @@ def page_path(i, displayed_i, num_pages, force_addition, extension=None):
return utils.adjust_name_for_index_path("index" + feed, None, lang), i, displayed_i,
lang,, force_addition, extension)

filtered_posts = self._get_filtered_posts(language, kw["show_untranslated_posts"])
filtered_posts = self._get_filtered_posts(lang, kw["show_untranslated_posts"])

indexes_title = kw['indexes_title'](lang) or kw['blog_title'](lang)
self.number_of_pages[lang] = self._compute_number_of_pages(filtered_posts, kw['index_display_post_count'])

0 comments on commit 023f287

Please sign in to comment.