Skip to content
Permalink
Browse files

Handle absolute paths in TRANSLATIONS (Issue #2982) (#2989)

  • Loading branch information
ralsina committed Mar 17, 2018
1 parent 064d63f commit cc82f60a6c89a15db1f8f8a2231b52f3a7f2c68c
Showing with 6 additions and 1 deletion.
  1. +2 −1 CHANGES.txt
  2. +4 −0 nikola/nikola.py
@@ -34,8 +34,9 @@ Features
Bugfixes
--------

* Handle '/' and other absolute paths better in POSTS / PAGES / TRANSLATIONS
(Issue #2982)
* Fix loading non-default languages
* Handle '/' and other absolute paths better in POSTS / PAGES
* Support KaTeX for reST display math (Issue #2888)
* Use npm for asset management instead of bower, which was deprecated
(Issue #2790)
@@ -617,6 +617,10 @@ def __init__(self, **config):
# Translatability configuration.
self.config['TRANSLATIONS'] = self.config.get('TRANSLATIONS',
{self.config['DEFAULT_LANG']: ''})
for k, v in self.config['TRANSLATIONS'].items():
if os.path.isabs(v):
self.config['TRANSLATIONS'][k] = os.path.relpath(v, '/')

utils.TranslatableSetting.default_lang = self.config['DEFAULT_LANG']

self.TRANSLATABLE_SETTINGS = ('BLOG_AUTHOR',

0 comments on commit cc82f60

Please sign in to comment.
You can’t perform that action at this time.