[Groonga-commit] groonga/groonga at 2e8be08 [master] Use more proper label for "Show Source"

Back to archive index

HAYASHI Kentaro null+****@clear*****
Fri Sep 20 13:31:49 JST 2013


HAYASHI Kentaro	2013-09-20 13:31:49 +0900 (Fri, 20 Sep 2013)

  New Revision: 2e8be089f3c2aa70a11300019005ce46c35fd920
  https://github.com/groonga/groonga/commit/2e8be089f3c2aa70a11300019005ce46c35fd920

  Message:
    Use more proper label for "Show Source"

  Modified files:
    tools/prepare-sphinx-html.rb

  Modified: tools/prepare-sphinx-html.rb (+8 -0)
===================================================================
--- tools/prepare-sphinx-html.rb    2013-09-20 13:30:06 +0900 (424fec6)
+++ tools/prepare-sphinx-html.rb    2013-09-20 13:31:49 +0900 (a92463d)
@@ -47,6 +47,13 @@ def fix_html_link(html, language)
   end
 end
 
+def fix_source_label(html)
+  html = html.gsub(/>(ソースコードを表示)</) do
+    label = $1
+    ">#{label}(英語)<"
+  end
+end
+
 def fix_js_link(js, language)
   fix_link_path(js)
 end
@@ -148,6 +155,7 @@ language_dirs.each do |language_dir|
         content = fix_link(content, extension, language)
         if extension == "html"
           content = insert_facebook_html(content, language)
+          content = fix_source_label(content)
         end
         dest_path.open("wb") do |dest|
           dest.print(content.strip)
-------------- next part --------------
HTML����������������������������...
下载 



More information about the Groonga-commit mailing list
Back to archive index