Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: getnikola/nikola
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: af939e7b1849
Choose a base ref
...
head repository: getnikola/nikola
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 46de7ef5b85b
Choose a head ref
  • 4 commits
  • 4 files changed
  • 1 contributor

Commits on May 23, 2017

  1. Copy the full SHA
    e1a4288 View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    f168211 View commit details
  3. Copy the full SHA
    9017ce0 View commit details
  4. Wrong language...

    felixfontein committed May 23, 2017
    Copy the full SHA
    46de7ef View commit details
Showing with 6 additions and 5 deletions.
  1. +1 −0 docs/template-variables.rst
  2. +3 −3 nikola/conf.py.in
  3. +1 −1 nikola/plugins/task/authors.py
  4. +1 −1 nikola/plugins/task/sections.py
1 change: 1 addition & 0 deletions docs/template-variables.rst
Original file line number Diff line number Diff line change
@@ -303,6 +303,7 @@ The archive navigation variables are available only if ``create_archive_navigati

============================== ============== ========================================================================
Name Type Description
============================== ============== ========================================================================
``kind`` str Always ``"archive"``
``archive_name`` str? Name of the archive
``create_archive_navigation`` bool ``CREATE_ARCHIVE_NAVIGATION`` setting
6 changes: 3 additions & 3 deletions nikola/conf.py.in
Original file line number Diff line number Diff line change
@@ -298,12 +298,12 @@ POSTS_SECTIONS = True
# {'en': 'private', 'de': 'Privat'},
# {'en': 'business', 'fr': 'Arbeit'},
# ]
# SECTION_TRANSLATIONS = []
# POST_SECTION_TRANSLATIONS = []

# If set to True, a section in a language will be treated as a translation
# of the literally same section in all other languages. Enable this if you
# do not translate sections, for example.
# SECTION_TRANSLATIONS_ADD_DEFAULTS = False
# POST_SECTION_TRANSLATIONS_ADD_DEFAULTS = False

# Paths for different autogenerated bits. These are combined with the
# translation paths.
@@ -432,7 +432,7 @@ HIDDEN_CATEGORIES = []
# For example:
# [
# {'en': 'private', 'de': 'Privat'},
# {'en': 'business', 'fr': 'Arbeit'},
# {'en': 'business', 'fr': 'travail'},
# ]
# CATEGORY_TRANSLATIONS = []

2 changes: 1 addition & 1 deletion nikola/plugins/task/authors.py
Original file line number Diff line number Diff line change
@@ -89,7 +89,7 @@ def is_enabled(self, lang=None):

def classify(self, post, lang):
"""Classify the given post for the given language."""
return [post.author()]
return [post.author(lang=lang)]

def get_classification_friendly_name(self, author, lang, only_last_component=False):
"""Extract a friendly name from the classification."""
2 changes: 1 addition & 1 deletion nikola/plugins/task/sections.py
Original file line number Diff line number Diff line change
@@ -141,7 +141,7 @@ def postprocess_posts_per_classification(self, posts_per_section_per_language, f
continue
sections.add(section)
self.enable_for_lang[lang] = (len(sections) > 1)
self.translation_manager.read_from_config(self.site, 'SECTION', posts_per_section_per_language, False)
self.translation_manager.read_from_config(self.site, 'POST_SECTION', posts_per_section_per_language, False)

def should_generate_classification_page(self, dirname, post_list, lang):
"""Only generates list of posts for classification if this function returns True."""