Skip to content
Permalink
Browse files
Let's initialize the LocaleBorg even with default config
  • Loading branch information
ralsina committed Jun 15, 2015
1 parent 7ca989b commit dbdcdcc78fb5a3fc1438d562100527bb77aaba8a
Showing with 7 additions and 8 deletions.
  1. +2 −2 nikola/__main__.py
  2. +5 −6 nikola/nikola.py
@@ -108,7 +108,8 @@ def main(args=None):
root = get_root_dir()
if root:
os.chdir(root)
needs_config_file = (argname != 'help')
# Help and imports don't require config, but can use one if it exists
needs_config_file = (argname != 'help') and not argname.startswith('import_')
else:
needs_config_file = False

@@ -154,7 +155,6 @@ def main(args=None):
config['__quiet__'] = quiet
config['__configuration_filename__'] = conf_filename
config['__cwd__'] = original_cwd

site = Nikola(**config)
DN = DoitNikola(site, quiet)
if _RETURN_DOITNIKOLA:
@@ -615,12 +615,11 @@ def __init__(self, **config):
self.default_lang = self.config['DEFAULT_LANG']
self.translations = self.config['TRANSLATIONS']

if self.configured:
locale_fallback, locale_default, locales = sanitized_locales(
self.config.get('LOCALE_FALLBACK', None),
self.config.get('LOCALE_DEFAULT', None),
self.config.get('LOCALES', {}), self.translations)
utils.LocaleBorg.initialize(locales, self.default_lang)
locale_fallback, locale_default, locales = sanitized_locales(
self.config.get('LOCALE_FALLBACK', None),
self.config.get('LOCALE_DEFAULT', None),
self.config.get('LOCALES', {}), self.translations)
utils.LocaleBorg.initialize(locales, self.default_lang)

# BASE_URL defaults to SITE_URL
if 'BASE_URL' not in self.config:

0 comments on commit dbdcdcc

Please sign in to comment.