Skip to content

Commit

Permalink
Restore TRANSLATIONS_PATTERN defaults
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Jun 11, 2017
1 parent 5586f21 commit ef6c005
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion nikola/conf.py.in
Expand Up @@ -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.
Expand Down
4 changes: 1 addition & 3 deletions nikola/nikola.py
Expand Up @@ -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

Expand Down Expand Up @@ -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,
Expand Down
2 changes: 0 additions & 2 deletions nikola/plugins/command/import_wordpress.py
Expand Up @@ -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)
Expand Down Expand Up @@ -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(
Expand Down
3 changes: 1 addition & 2 deletions nikola/plugins/command/init.py
Expand Up @@ -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
Expand Down Expand Up @@ -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': """(
Expand Down

0 comments on commit ef6c005

Please sign in to comment.