File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed
Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -10,12 +10,24 @@ namespace :book do
1010 task :build do
1111
1212 begin
13+ lang = "ru"
14+ begin
15+ l10n_text = open ( "https://raw.githubusercontent.com/asciidoctor/asciidoctor/master/data/locale/attributes-#{ lang } .adoc" ) . read
16+ File . open ( 'attributes.asc' , 'w' ) { |file | file . puts l10n_text }
17+ progit_txt = File . open ( 'progit.asc' ) . read
18+ if not progit_txt . include? ( "attributes.asc" )
19+ progit_txt . gsub! ( 'include::book/license.asc' , "include::attributes.asc[]\n include::book/license.asc" )
20+ File . open ( 'progit.asc' , 'w' ) { |file | file . puts progit_txt }
21+ end
22+ rescue
23+ end
1324 version_string = ENV [ 'TRAVIS_TAG' ] || `git describe --tags` . chomp
1425 if version_string . empty?
1526 version_string = '0'
1627 end
17- date_string = Time . now . strftime ( "%Y-%m-%d" )
18- params = "--attribute revnumber='#{ version_string } ' --attribute revdate='#{ date_string } '"
28+ date_string = Time . now . strftime ( "%d-%m-%Y" )
29+ params = "--attribute revnumber='#{ version_string } ' --attribute revdate='#{ date_string } ' --attribute lang=#{ lang } "
30+
1931 puts "Generating contributors list"
2032 `git shortlog -s | grep -v -E "(Straub|Chacon|dependabot)" | cut -f 2- | column -c 96 > book/contributors.txt`
2133
Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ $$VERSION$$, $$DATE$$
88:toclevels: 2
99:pdf-page-size: A4
1010:front-cover-image: image:book/cover.png[width=1050,height=1600]
11- :figure-caption: Рисунок
1211
1312ifdef::ebook-format[:leveloffset: -1]
1413
You can’t perform that action at this time.
0 commit comments