Prepare conf.py.in for translation.

Signed-off-by: Chris “Kwpolska” Warrick <kwpolska@gmail.com>
Use json.dumps() for settings set by nikola init.

Previously, all variables were strings that were substituted
into X = ${y} or X = "${y}", depending on the intended
type of the variable.  As of now, all but three variables (which
contain comments and are formatted specially) are handled by
json.dumps(), which outputs properly escaped code that is substituted
into expressions of type 2 above.

Signed-off-by: Chris “Kwpolska” Warrick <kwpolska@gmail.com>
The three preformatted settings were missing.

Signed-off-by: Chris “Kwpolska” Warrick <kwpolska@gmail.com>
mako cuts comments out

Signed-off-by: Chris “Kwpolska” Warrick <kwpolska@gmail.com>
dict comprehensions are not supported by v2.6

Signed-off-by: Chris “Kwpolska” Warrick <kwpolska@gmail.com>
make COMMENT_SYSTEM{,_ID} configurable (via punchagan/statiki#20)

Signed-off-by: Chris “Kwpolska” Warrick <kwpolska@gmail.com>
make import_* compatible with ~1

Signed-off-by: Chris “Kwpolska” Warrick <kwpolska@gmail.com>
fix indentation in utils tests

Signed-off-by: Chris “Kwpolska” Warrick <kwpolska@gmail.com>
Introduce the TranslatableSetting class.

This class includes a lot of tricks to maintain 100% backwards
compatibility.  We can actually sneak it into v6.4.0 without any
problems as all those mechanisms will handle it for us.

For the record, here is a comprehensive list of all the tricks:

1. can be initialized with either a string or a dict
2. the underlying structure is a defaultdics, which handles:
   (a) not having translations for some languages
   (b) not translating stuff at all
   (c) providing invalid language names
3. two interfaces: S()/S(lang) and str(S)/unicode(S)
   (uses pre-defined locale with S.lang)

Signed-off-by: Chris “Kwpolska” Warrick <kwpolska@gmail.com>
fix minor bugs in TranslatableSetting

Signed-off-by: Chris “Kwpolska” Warrick <kwpolska@gmail.com>
Add tests for TranslatableSetting.

Signed-off-by: Chris “Kwpolska” Warrick <kwpolska@gmail.com>
remove an invalid variable setting that would break everything

Signed-off-by: Chris “Kwpolska” Warrick <kwpolska@gmail.com>
Actually implement TranslatedSetting in nikola.py.

Signed-off-by: Chris “Kwpolska” Warrick <kwpolska@gmail.com>
Make use of LocaleBorg() by default.

Signed-off-by: Chris “Kwpolska” Warrick <kwpolska@gmail.com>
flake8 is an asshole sometimes

Signed-off-by: Chris “Kwpolska” Warrick <kwpolska@gmail.com>
make it possible to not have some settings

Signed-off-by: Chris “Kwpolska” Warrick <kwpolska@gmail.com>
fix tests

Signed-off-by: Chris “Kwpolska” Warrick <kwpolska@gmail.com>
fix RSS building

Signed-off-by: Chris “Kwpolska” Warrick <kwpolska@gmail.com>
Temporarily freeze a working version of typogrify.

Signed-off-by: Chris “Kwpolska” Warrick <kwpolska@gmail.com>
Fix #851 -- make it possible to have per-language site data.

The list of variables is currently limited to a subset by the
TRANSLATABLE_SETTINGS value in nikola.py:

    TRANSLATABLE_SETTINGS = ('BLOG_AUTHOR',
                             'BLOG_TITLE',
                             'BLOG_DESCRIPTION',
                             'LICENSE',
                             'CONTENT_FOOTER',
                             'SOCIAL_BUTTONS_CODE',
                             'SEARCH_FORM',
                             'BODY_END',
                             'EXTRA_HEAD_DATA',)

Moreover, some things (like CONTENT_FOOTER) are error-prone
and require big changes to conf.py.in.

Signed-off-by: Chris “Kwpolska” Warrick <kwpolska@gmail.com>