Skip to content
Permalink
Browse files
Restore TRANSLATIONS_PATTERN defaults
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Jun 11, 2017
1 parent 5586f21 commit ef6c0058aff7a6de238bd8b95b3479522ce3a0d4
Showing with 3 additions and 8 deletions.
  1. +1 −1 nikola/conf.py.in
  2. +1 −3 nikola/nikola.py
  3. +0 −2 nikola/plugins/command/import_wordpress.py
  4. +1 −2 nikola/plugins/command/init.py
@@ -56,7 +56,7 @@ TRANSLATIONS = ${TRANSLATIONS}
# this pattern is also used for metadata:
# something.meta -> something.pl.meta

TRANSLATIONS_PATTERN = ${TRANSLATIONS_PATTERN}
TRANSLATIONS_PATTERN = '{path}.{lang}.{ext}'

# Links for the sidebar / navigation bar. (translatable)
# This is a dict. The keys are languages, and values are tuples.
@@ -87,9 +87,6 @@
DEFAULT_INDEX_READ_MORE_LINK = '<p class="more"><a href="{link}">{read_more}…</a></p>'
DEFAULT_FEED_READ_MORE_LINK = '<p><a href="{link}">{read_more}…</a> ({min_remaining_read})</p>'

# Default pattern for translation files' names
DEFAULT_TRANSLATIONS_PATTERN = '{path}.{lang}.{ext}'


config_changed = utils.config_changed

@@ -606,6 +603,7 @@ def __init__(self, **config):
'THEME': 'bootstrap3',
'THEME_COLOR': '#5670d4', # light "corporate blue"
'THUMBNAIL_SIZE': 180,
'TRANSLATIONS_PATTERN': '{path}.{lang}.{ext}',
'UNSLUGIFY_TITLES': False, # WARNING: conf.py.in overrides this with True for backwards compatibility
'URL_TYPE': 'rel_path',
'USE_BASE_TAG': False,
@@ -56,7 +56,6 @@
from nikola import utils, hierarchy_utils
from nikola.utils import req_missing, unicode_str
from nikola.plugins.basic_import import ImportMixin, links
from nikola.nikola import DEFAULT_TRANSLATIONS_PATTERN
from nikola.plugins.command.init import SAMPLE_CONF, prepare_config, format_default_translations_config

LOGGER = utils.get_logger('import_wordpress', utils.STDERR_HANDLER)
@@ -450,7 +449,6 @@ def populate_context(self, channel):
context = SAMPLE_CONF.copy()
self.lang = get_text_tag(channel, 'language', 'en')[:2]
context['DEFAULT_LANG'] = self.lang
context['TRANSLATIONS_PATTERN'] = DEFAULT_TRANSLATIONS_PATTERN
context['BLOG_TITLE'] = get_text_tag(channel, 'title',
'PUT TITLE HERE')
context['BLOG_DESCRIPTION'] = get_text_tag(
@@ -40,7 +40,7 @@
import tarfile

import nikola
from nikola.nikola import DEFAULT_TRANSLATIONS_PATTERN, DEFAULT_INDEX_READ_MORE_LINK, DEFAULT_FEED_READ_MORE_LINK, LEGAL_VALUES, urlsplit, urlunsplit
from nikola.nikola import DEFAULT_INDEX_READ_MORE_LINK, DEFAULT_FEED_READ_MORE_LINK, LEGAL_VALUES, urlsplit, urlunsplit
from nikola.plugin_categories import Command
from nikola.utils import ask, ask_yesno, get_logger, makedirs, STDERR_HANDLER, load_messages
from nikola.packages.tzlocal import get_localzone
@@ -68,7 +68,6 @@
'COMMENT_SYSTEM_ID': 'nikolademo',
'CATEGORY_ALLOW_HIERARCHIES': False,
'CATEGORY_OUTPUT_FLAT_HIERARCHY': False,
'TRANSLATIONS_PATTERN': DEFAULT_TRANSLATIONS_PATTERN,
'INDEX_READ_MORE_LINK': DEFAULT_INDEX_READ_MORE_LINK,
'FEED_READ_MORE_LINK': DEFAULT_FEED_READ_MORE_LINK,
'POSTS': """(

0 comments on commit ef6c005

Please sign in to comment.