Navigation Menu

Skip to content

Commit

Permalink
Removed also_create_classifications_from_other_languages.
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfontein committed Jun 16, 2017
1 parent bfbfdfb commit d3bebf9
Show file tree
Hide file tree
Showing 11 changed files with 6 additions and 21 deletions.
5 changes: 3 additions & 2 deletions CHANGES.txt
Expand Up @@ -5,8 +5,6 @@ Features
--------

* Use ``PRETTY_URLS`` by default on all sites (Issue #1838)
* `also_create_classifications_from_other_languages` is deprecated
and no longer used by standard taxonomies (Issue #2785)
* Feed link generation is completely refactored (PR #2844)


Expand All @@ -25,6 +23,9 @@ Removed features
* Drop insecure post encryption feature
* Stop supporting all deprecated config options
* Drop annotations support (annotateit.org closed down in March 2017)
* `also_create_classifications_from_other_languages` was removed
(Issue #2785)


New in v7.8.8
=============
Expand Down
11 changes: 1 addition & 10 deletions nikola/plugin_categories.py
Expand Up @@ -593,13 +593,6 @@ class Taxonomy(BasePlugin):
Whether post lists resp. indexes should be created for empty
classifications.
also_create_classifications_from_other_languages = False:
Whether to include all classifications for all languages in every
language, or only the classifications for one language in its language's
pages.
WARNING: This is deprecated and will be removed eventually.
add_other_languages_variable = False:
In case this is `True`, each classification page will get a list
of triples `(other_lang, other_classification, title)` of classifications
Expand Down Expand Up @@ -636,7 +629,6 @@ class Taxonomy(BasePlugin):
apply_to_pages = False
minimum_post_count_per_classification_in_overview = 1
omit_empty_classifications = False
also_create_classifications_from_other_languages = False # deprecated
add_other_languages_variable = False
path_handler_docstrings = {
'taxonomy_index': '',
Expand Down Expand Up @@ -781,8 +773,7 @@ def provide_context_and_uptodate(self, classification, lang, node=None):
the second will be put into the uptodate list of all generated tasks.
For hierarchical taxonomies, node is the `hierarchy_utils.TreeNode` element
corresponding to the classification. Note that `node` can still be `None`
if `also_create_classifications_from_other_languages` is `True`.
corresponding to the classification.
Context must contain `title`, which should be something like 'Posts about <classification>'.
"""
Expand Down
2 changes: 1 addition & 1 deletion nikola/plugins/misc/taxonomies_classifier.py
Expand Up @@ -161,7 +161,7 @@ def create_hierarchy(hierarchy, parent=None, level=0):
if not taxonomy.is_enabled(lang):
continue
for tlang in site.config['TRANSLATIONS'].keys():
if lang != tlang and not taxonomy.also_create_classifications_from_other_languages:
if lang != tlang:
continue
for classification, posts in site.posts_per_classification[taxonomy.classification_name][tlang].items():
# Obtain path as tuple
Expand Down
1 change: 0 additions & 1 deletion nikola/plugins/task/archive.py
Expand Up @@ -52,7 +52,6 @@ class Archive(Taxonomy):
apply_to_pages = False
minimum_post_count_per_classification_in_overview = 1
omit_empty_classifications = False
also_create_classifications_from_other_languages = False
add_other_languages_variable = True
path_handler_docstrings = {
'archive_index': False,
Expand Down
1 change: 0 additions & 1 deletion nikola/plugins/task/authors.py
Expand Up @@ -46,7 +46,6 @@ class ClassifyAuthors(Taxonomy):
apply_to_pages = False
minimum_post_count_per_classification_in_overview = 1
omit_empty_classifications = False
also_create_classifications_from_other_languages = False
add_other_languages_variable = True
path_handler_docstrings = {
'author_index': """ Link to the authors index.
Expand Down
1 change: 0 additions & 1 deletion nikola/plugins/task/categories.py
Expand Up @@ -52,7 +52,6 @@ class ClassifyCategories(Taxonomy):
apply_to_pages = False
minimum_post_count_per_classification_in_overview = 1
omit_empty_classifications = True
also_create_classifications_from_other_languages = False
add_other_languages_variable = True
path_handler_docstrings = {
'category_index': """A link to the category index.
Expand Down
1 change: 0 additions & 1 deletion nikola/plugins/task/indexes.py
Expand Up @@ -45,7 +45,6 @@ class Indexes(Taxonomy):
apply_to_posts = True
apply_to_pages = False
omit_empty_classifications = False
also_create_classifications_from_other_languages = False
path_handler_docstrings = {
'index_index': False,
'index': """Link to a numbered index.
Expand Down
1 change: 0 additions & 1 deletion nikola/plugins/task/page_index.py
Expand Up @@ -48,7 +48,6 @@ class PageIndex(Taxonomy):
apply_to_posts = False
apply_to_pages = True
omit_empty_classifications = True
also_create_classifications_from_other_languages = False
path_handler_docstrings = {
'page_index_folder_index': None,
'page_index_folder': None,
Expand Down
1 change: 0 additions & 1 deletion nikola/plugins/task/sections.py
Expand Up @@ -45,7 +45,6 @@ class ClassifySections(Taxonomy):
apply_to_posts = True
apply_to_pages = False
omit_empty_classifications = True
also_create_classifications_from_other_languages = False
add_other_languages_variable = True
path_handler_docstrings = {
'section_index_index': False,
Expand Down
1 change: 0 additions & 1 deletion nikola/plugins/task/tags.py
Expand Up @@ -48,7 +48,6 @@ class ClassifyTags(Taxonomy):
apply_to_posts = True
apply_to_pages = False
omit_empty_classifications = True
also_create_classifications_from_other_languages = False
add_other_languages_variable = True
path_handler_docstrings = {
'tag_index': """A link to the tag index.
Expand Down
2 changes: 1 addition & 1 deletion nikola/plugins/task/taxonomies.py
Expand Up @@ -425,7 +425,7 @@ def gen_tasks(self):
for lang in self.site.config["TRANSLATIONS"]:
classifications = {}
for tlang, posts_per_classification in self.site.posts_per_classification[taxonomy.classification_name].items():
if lang != tlang and not taxonomy.also_create_classifications_from_other_languages:
if lang != tlang:
continue
classifications.update(posts_per_classification)
result = {}
Expand Down

0 comments on commit d3bebf9

Please sign in to comment.