File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -595,7 +595,7 @@ def assemble_template(body_file)
595
595
<<-TEMPLATE
596
596
<!DOCTYPE html>
597
597
598
- <html>
598
+ <html lang=" #{ @options . locale &. name || 'en' } " >
599
599
<head>
600
600
#{ head_file . read }
601
601
Original file line number Diff line number Diff line change @@ -388,6 +388,21 @@ def test_template_stylesheets
388
388
assert_include File . binread ( 'index.html' ) , %Q[href="./#{ base } "]
389
389
end
390
390
391
+ def test_html_lang
392
+ @g . generate
393
+
394
+ content = File . binread ( "index.html" )
395
+ assert_include ( content , '<html lang="en">' )
396
+ end
397
+
398
+ def test_html_lang_from_locale
399
+ @options . locale = RDoc ::I18n ::Locale . new 'ja'
400
+ @g . generate
401
+
402
+ content = File . binread ( "index.html" )
403
+ assert_include ( content , '<html lang="ja">' )
404
+ end
405
+
391
406
def test_title
392
407
title = "RDoc Test" . freeze
393
408
@options . title = title
You can’t perform that action at this time.
0 commit comments