Add zh_tw locale file
This commit is contained in:
parent
5ab32baf88
commit
e6d083acda
|
@ -26,7 +26,7 @@ class Admin::SnippetsController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
VALID_LOCALES.each do |locale|
|
VALID_LOCALES.each do |locale|
|
||||||
@snippet.write_attribute( "content_#{locale}", "<ul>\n#{lis}</ul>" )
|
@snippet.send( :write_attribute, "content_#{locale}", "<ul>\n#{lis}</ul>" )
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -15,11 +15,11 @@
|
||||||
<body>
|
<body>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div id ="nav" class="span-24">
|
<div id ="nav" class="span-24">
|
||||||
<%= link_to 'Home', root_path %> |
|
<%= link_to t(:home, :scope => :admin), root_path %> |
|
||||||
<%= link_to 'Pages', admin_pages_path %> |
|
<%= link_to t(:page, :scope => :admin), admin_pages_path %> |
|
||||||
<%= link_to 'Snippet', admin_snippets_path %> |
|
<%= link_to t(:snippet, :scope => :admin), admin_snippets_path %> |
|
||||||
<%= link_to 'Layout', admin_layouts_path %> |
|
<%= link_to t(:layout, :scope => :admin), admin_layouts_path %> |
|
||||||
<%= link_to 'Announcement', admin_announcements_path %>
|
<%= link_to t(:announcement, :scope => :admin), admin_announcements_path %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<%= yield %>
|
<%= yield %>
|
||||||
|
|
|
@ -40,7 +40,7 @@ Rails::Initializer.run do |config|
|
||||||
|
|
||||||
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
||||||
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}')]
|
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}')]
|
||||||
config.i18n.default_locale = "en"
|
config.i18n.default_locale = "zh_tw"
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
zh_tw:
|
||||||
|
admin:
|
||||||
|
home: 首頁
|
||||||
|
page: 頁面管理
|
||||||
|
snippet: 片段管理
|
||||||
|
layout: 樣版管理
|
||||||
|
announcement: 公告管理
|
Loading…
Reference in New Issue