Skip to content
Permalink
Browse files
Improving comments.
  • Loading branch information
felixfontein committed Oct 9, 2016
1 parent 936a4de commit 8ab593794ccbd289ed63b034fbb99d0f407f331d
Showing with 5 additions and 2 deletions.
  1. +5 −2 nikola/post.py
@@ -96,7 +96,8 @@ def __init__(
the meta file, as well as any translations available, and
the .html fragment file path.
destination_base must be None or an TranslatableSetting instance
destination_base must be None or a TranslatableSetting instance. If
specified, it will be prepended to the destination path.
"""
self.config = config
self.compiler = compiler
@@ -165,9 +166,11 @@ def __init__(
for lang in sorted(self.translated_to):
default_metadata.update(self.meta[lang])

# Find paths from metadata
# Compose paths
self.folders = {lang: self.folder_relative for lang in self.config['TRANSLATIONS'].keys()}
if self.folder_base is not None:
# self.folder_base must be a TranslatableSetting whose value
# will be prepended to the folder's path for each language
self.folders = {lang: os.path.normpath(os.path.join(self.folder_base(lang), folder)) for lang, folder in self.folders.items()}
self.folder = self.folders[self.default_lang]

0 comments on commit 8ab5937

Please sign in to comment.