File tree Expand file tree Collapse file tree 2 files changed +7
-8
lines changed
mkdocs_git_revision_date_localized_plugin Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -21,23 +21,22 @@ def __init__(self):
21
21
def on_config (self , config ):
22
22
23
23
# Get locale settings
24
- mkdocs_locale = config .get ('locale' )
24
+ mkdocs_locale = self . config .get ('locale' )
25
25
plugin_locale = self .config ['locale' ]
26
- theme_locale = vars (config ['theme' ]).get ('_vars' , {}).get ('locale' )
26
+ theme_locale = vars (self . config ['theme' ]).get ('_vars' , {}).get ('locale' )
27
27
if theme_locale is None :
28
- theme_locale = vars (config ['theme' ]).get ('_vars' , {}).get ('language' )
28
+ theme_locale = vars (self . config ['theme' ]).get ('_vars' , {}).get ('language' )
29
29
30
30
# First prio: plugin locale
31
31
if plugin_locale != '' :
32
- if plugin_locale != mkdocs_locale :
33
- print (f"WARNING - plugin locale setting '{ plugin_locale } ' will overwrite mkdocs locale '{ mkdocs_locale } '" )
34
- self .locale = mkdocs_locale
32
+ self .locale = plugin_locale
35
33
return
36
34
37
35
# Second prio: theme
38
36
if theme_locale :
39
37
self .locale = theme_locale
40
- # Third is mkdocs locale setting (might be add in the future)
38
+
39
+ # Third is mkdocs locale setting (might be added in the future)
41
40
if mkdocs_locale :
42
41
self .locale = mkdocs_locale
43
42
Original file line number Diff line number Diff line change 5
5
6
6
setup (
7
7
name = 'mkdocs-git-revision-date-localized-plugin' ,
8
- version = '0.3.3 ' ,
8
+ version = '0.4 ' ,
9
9
description = 'Mkdocs plugin that enables displaying the localized date of the last git modification of a markdown file.' ,
10
10
long_description = long_description ,
11
11
long_description_content_type = "text/markdown" ,
You can’t perform that action at this time.
0 commit comments