Kouhei Sutou
null+****@clear*****
Fri Sep 20 14:30:08 JST 2013
Kouhei Sutou 2013-09-20 14:30:08 +0900 (Fri, 20 Sep 2013) New Revision: 713ae168874837749ceee3e42f1fafa2d591d879 https://github.com/groonga/groonga/commit/713ae168874837749ceee3e42f1fafa2d591d879 Message: Substitute source link label only if HTML is in Japanese Modified files: tools/prepare-sphinx-html.rb Modified: tools/prepare-sphinx-html.rb (+3 -2) =================================================================== --- tools/prepare-sphinx-html.rb 2013-09-20 13:52:35 +0900 (ba1b2c8) +++ tools/prepare-sphinx-html.rb 2013-09-20 14:30:08 +0900 (5396d26) @@ -47,7 +47,8 @@ def fix_html_link(html, language) end end -def add_language_annotation_to_source_label(html) +def add_language_annotation_to_source_label(html, language) + return html unless language == "ja" html.gsub(/>(ソースコードを表示)</) do label = $1 ">#{label}(英語)<" @@ -155,7 +156,7 @@ language_dirs.each do |language_dir| content = fix_link(content, extension, language) if extension == "html" content = insert_facebook_html(content, language) - content = add_language_annotation_to_source_label(content) + content = add_language_annotation_to_source_label(content, language) end dest_path.open("wb") do |dest| dest.print(content.strip) -------------- next part -------------- HTML����������������������������... 下载