Skip to content

Commit

Permalink
Translatable Settings support for ALL_PAGE_DEPS
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Apr 15, 2018
1 parent 89d5ceb commit 4637b40
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions nikola/nikola.py
Expand Up @@ -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.

Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit 4637b40

Please sign in to comment.