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):
2121 def on_config (self , config ):
2222
2323 # Get locale settings
24- mkdocs_locale = config .get ('locale' )
24+ mkdocs_locale = self . config .get ('locale' )
2525 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' )
2727 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' )
2929
3030 # First prio: plugin locale
3131 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
3533 return
3634
3735 # Second prio: theme
3836 if theme_locale :
3937 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)
4140 if mkdocs_locale :
4241 self .locale = mkdocs_locale
4342
Original file line number Diff line number Diff line change 55
66setup (
77 name = 'mkdocs-git-revision-date-localized-plugin' ,
8- version = '0.3.3 ' ,
8+ version = '0.4 ' ,
99 description = 'Mkdocs plugin that enables displaying the localized date of the last git modification of a markdown file.' ,
1010 long_description = long_description ,
1111 long_description_content_type = "text/markdown" ,
You can’t perform that action at this time.
0 commit comments