From e2a6d9fe0d98ca3cf1e1038fe030f6034015f096 Mon Sep 17 00:00:00 2001 From: Wen-Tien Chang Date: Mon, 1 Mar 2010 14:57:21 +0800 Subject: [PATCH] Add locale link in template --- lib/tasks/dev.rake | 2 +- lib/template/locale.snippet.en | 4 ++++ lib/template/locale.snippet.zh_tw | 4 ++++ lib/template/root.layout.en | 1 + lib/template/root.layout.zh_tw | 1 + 5 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 lib/template/locale.snippet.en create mode 100644 lib/template/locale.snippet.zh_tw diff --git a/lib/tasks/dev.rake b/lib/tasks/dev.rake index 01244b36..23f06ea6 100644 --- a/lib/tasks/dev.rake +++ b/lib/tasks/dev.rake @@ -15,7 +15,7 @@ namespace :dev do :content_en => File.open("#{RAILS_ROOT}/lib/template/#{page_name}.page.en").read ) end - ["nav", "footer"].each do |page_name| + ["nav", "footer", "locale"].each do |page_name| Snippet.create!( :name => page_name, :parent_name => "root", :content_zh_tw => File.open("#{RAILS_ROOT}/lib/template/#{page_name}.snippet.zh_tw").read, :content_en => File.open("#{RAILS_ROOT}/lib/template/#{page_name}.snippet.en").read ) diff --git a/lib/template/locale.snippet.en b/lib/template/locale.snippet.en new file mode 100644 index 00000000..490dd3a5 --- /dev/null +++ b/lib/template/locale.snippet.en @@ -0,0 +1,4 @@ + \ No newline at end of file diff --git a/lib/template/locale.snippet.zh_tw b/lib/template/locale.snippet.zh_tw new file mode 100644 index 00000000..490dd3a5 --- /dev/null +++ b/lib/template/locale.snippet.zh_tw @@ -0,0 +1,4 @@ + \ No newline at end of file diff --git a/lib/template/root.layout.en b/lib/template/root.layout.en index d9e80fca..d1db9974 100644 --- a/lib/template/root.layout.en +++ b/lib/template/root.layout.en @@ -17,6 +17,7 @@ diff --git a/lib/template/root.layout.zh_tw b/lib/template/root.layout.zh_tw index d9e80fca..d1db9974 100644 --- a/lib/template/root.layout.zh_tw +++ b/lib/template/root.layout.zh_tw @@ -17,6 +17,7 @@