-
-
Notifications
You must be signed in to change notification settings - Fork 56
Description
For this assertion:
mkdocs-git-revision-date-localized-plugin/mkdocs_git_revision_date_localized_plugin/plugin.py
Line 117 in 708128b
assert len(locale_set) == 2, "locale must be a 2 letter code, see https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes" |
...and the way locale
is used:
mkdocs-git-revision-date-localized-plugin/mkdocs_git_revision_date_localized_plugin/util.py
Line 9 in 708128b
from babel.dates import format_date, get_timezone |
mkdocs-git-revision-date-localized-plugin/mkdocs_git_revision_date_localized_plugin/util.py
Line 72 in 708128b
"date": format_date(loc_revision_date, format="long", locale=locale), |
Line 9 in 9747e59
timeago.render(nodes, locale); |
...and the document of Babel and timeago:
Instead of just 2 letter code, locale
also support longer format like en_US
, or even:
This assertion should be lifted, and document of this plugin may be changed accordingly, from ISO 639-1 to the document of Babel and timeago.
Change locale to locale: { default: en, babel: en_US, timeago: en_short }
or:
locale: en
locale_babel: en_US
locale_timeago: en_short
... may also be considered.