Skip to content
Permalink
Browse files
Removed also_create_classifications_from_other_languages.
  • Loading branch information
felixfontein committed Jun 16, 2017
1 parent bfbfdfb commit d3bebf9eab91efb43994dca3c1774286bab7298f
@@ -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)


@@ -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
=============
@@ -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
@@ -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': '',
@@ -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>'.
"""
@@ -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
@@ -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,
@@ -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.
@@ -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.
@@ -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.
@@ -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,
@@ -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,
@@ -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.
@@ -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 = {}

0 comments on commit d3bebf9

Please sign in to comment.