Skip to content
Permalink
Browse files

Translatabiity fixes

Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed May 3, 2018
1 parent df9399f commit 494e77036205ee7292be92ace8d0ff5e21e4ad9e
Showing with 3 additions and 1 deletion.
  1. +1 −1 nikola/conf.py.in
  2. +2 −0 nikola/nikola.py
@@ -381,7 +381,7 @@ HIDDEN_CATEGORIES = []
# If True, only the first directory of a path will be used.
# CATEGORY_DESTPATH_FIRST_DIRECTORY_ONLY = True

# Map paths to prettier category names.
# Map paths to prettier category names. (translatable)
# CATEGORY_DESTPATH_NAMES = {
# DEFAULT_LANG: {
# 'webdev': 'Web Development',
@@ -750,6 +750,8 @@ def __init__(self, **config):
self.config[cat_config] = self.config[section_config]

self.config['CATEGORY_DESTPATH_NAMES'] = self.config.get('POSTS_SECTION_NAME', {})
# Need to mark this translatable manually.
self.config['CATEGORY_DESTPATH_NAMES'] = utils.TranslatableSetting('CATEGORY_DESTPATH_NAMES', self.config['CATEGORY_DESTPATH_NAMES'], self.config['TRANSLATIONS'])

self.config['CATEGORY_DESTPATH_AS_DEFAULT'] = not self.config.get('POSTS_SECTION_FROM_META')
utils.LOGGER.info("Setting CATEGORY_DESTPATH_AS_DEFAULT = " + str(self.config['CATEGORY_DESTPATH_AS_DEFAULT']))

0 comments on commit 494e770

Please sign in to comment.