Skip to content
Permalink
Browse files
Translatable Settings support for ALL_PAGE_DEPS
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Apr 15, 2018
1 parent 89d5ceb commit 4637b40ca870c253132b99c7bb833e96e4020853
Showing with 7 additions and 0 deletions.
  1. +7 −0 nikola/nikola.py
@@ -682,6 +682,9 @@ def __init__(self, **config):
'posts_section_title',
'front_index_header',
)

self._ALL_PAGE_DEPENDENCIES_TRANSLATABLE = ('rss_path',
)
# WARNING: navigation_links SHOULD NOT be added to the list above.
# Themes ask for [lang] there and we should provide it.

@@ -2153,6 +2156,8 @@ def generic_renderer(self, lang, output_name, template_name, filters, file_deps=

for k in self._GLOBAL_CONTEXT_TRANSLATABLE:
deps_dict[k] = deps_dict['global'][k](lang)
for k in self._ALL_PAGE_DEPENDENCIES_TRANSLATABLE:
deps_dict[k] = deps_dict['all_page_dependencies'][k](lang)

deps_dict['navigation_links'] = deps_dict['global']['navigation_links'](lang)

@@ -2282,6 +2287,8 @@ def atom_link(link_rel, link_type, link_href):

for k in self._GLOBAL_CONTEXT_TRANSLATABLE:
deps_context[k] = deps_context['global'][k](lang)
for k in self._ALL_PAGE_DEPENDENCIES_TRANSLATABLE:
deps_dict[k] = deps_dict['all_page_dependencies'][k](lang)

deps_context['navigation_links'] = deps_context['global']['navigation_links'](lang)

0 comments on commit 4637b40

Please sign in to comment.