Navigation Menu

Skip to content

Commit

Permalink
Translatabiity fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed May 3, 2018
1 parent df9399f commit 494e770
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion nikola/conf.py.in
Expand Up @@ -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',
Expand Down
2 changes: 2 additions & 0 deletions nikola/nikola.py
Expand Up @@ -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']))
Expand Down

0 comments on commit 494e770

Please sign in to comment.