Skip to content

Commit

Permalink
Also supporting JS_DATE_FORMAT.
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfontein committed Sep 6, 2015
1 parent bcbffc4 commit 1823d2f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CHANGES.txt
Expand Up @@ -8,7 +8,7 @@ Features
* Made CATEGORY_PATH translatable (Issue #1914)
* Display post counts for archive links (Issue #2011)
* Document link/path handlers (Issue #2008)
* Made DATE_FORMAT translatable (Issue #2032)
* Made DATE_FORMAT and JS_DATE_FORMAT translatable (Issue #2032)

Bugfixes
--------
Expand Down
4 changes: 2 additions & 2 deletions nikola/conf.py.in
Expand Up @@ -140,11 +140,11 @@ TIMEZONE = ${TIMEZONE}
# Note that this does not affect DATE_FORMAT.
# FORCE_ISO8601 = False

# (Translatable) Date format used to display post dates.
# Date format used to display post dates. (translatable)
# (str used by datetime.datetime.strftime)
# DATE_FORMAT = '%Y-%m-%d %H:%M'

# Date format used to display post dates, if local dates are used.
# Date format used to display post dates, if local dates are used. (translatable)
# (str used by moment.js)
# JS_DATE_FORMAT = 'YYYY-MM-DD HH:mm'

Expand Down
4 changes: 3 additions & 1 deletion nikola/nikola.py
Expand Up @@ -554,6 +554,7 @@ def __init__(self, **config):
'TAG_PATH',
'CATEGORY_PATH',
'DATE_FORMAT',
'JS_DATE_FORMAT',
)

self._GLOBAL_CONTEXT_TRANSLATABLE = ('blog_author',
Expand All @@ -566,7 +567,8 @@ def __init__(self, **config):
'search_form',
'body_end',
'extra_head_data',
'date_format',)
'date_format',
'js_date_format',)
# WARNING: navigation_links SHOULD NOT be added to the list above.
# Themes ask for [lang] there and we should provide it.

Expand Down

0 comments on commit 1823d2f

Please sign in to comment.