File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change
1
+ site_name : test gitrevisiondatelocalized_plugin
2
+ use_directory_urls : true
3
+
4
+ theme :
5
+ name : ' material'
6
+
7
+ plugins :
8
+ - search
9
+ - git-revision-date-localized
Original file line number Diff line number Diff line change @@ -289,6 +289,21 @@ def test_material_theme(tmp_path):
289
289
assert re .search (r"Letztes Update\:\s[\w].+" , contents )
290
290
291
291
292
+ def test_material_theme_no_locale (tmp_path ):
293
+ """
294
+ When using mkdocs-material theme, test correct working
295
+ """
296
+ # theme set to 'material' with 'language' set to 'de'
297
+ testproject_path = validate_mkdocs_file (
298
+ tmp_path , "tests/basic_setup/mkdocs_theme_no_locale.yml"
299
+ )
300
+
301
+ # In mkdocs-material, a 'last update' should appear
302
+ # in German because locale is set to 'de'
303
+ index_file = testproject_path / "site/index.html"
304
+ contents = index_file .read_text (encoding = "utf8" )
305
+ assert re .search (r"Last update\:\s[\w].+" , contents )
306
+
292
307
def test_type_timeago (tmp_path ):
293
308
# type: 'timeago'
294
309
testproject_path = validate_mkdocs_file (
You can’t perform that action at this time.
0 commit comments