Skip to content
Permalink
Browse files

Handle absolute paths in TRANSLATIONS (Issue #2982)

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

* Handle '/' and other absolute paths better in POSTS / PAGES
* Handle '/' and other absolute paths better in POSTS / PAGES / TRANSLATIONS
(Issue #2982)
* 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 a72eb96

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