Skip to content

Commit

Permalink
Improving comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfontein committed Oct 9, 2016
1 parent 936a4de commit 8ab5937
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions nikola/post.py
Expand Up @@ -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
Expand Down Expand Up @@ -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]

Expand Down

0 comments on commit 8ab5937

Please sign in to comment.