Permalink
Browse files

add i18n support

fix visit method not found in rspec
  • Loading branch information...
1 parent 2e9f275 commit 59443e7962e9e96d4a09582a902139de072e4726 Leon Kai Yu committed Jan 1, 2013
View
2 lib/bootstrap_helper/breadcrumb.rb
@@ -15,7 +15,7 @@ module InstanceMethods
protected
def set_breadcrumbs
- @breadcrumbs = ["<a href='/'>Home</a>".html_safe]
+ @breadcrumbs = ["<a href='/'>#{t('home')}</a>".html_safe]
end
def drop_breadcrumb(title=nil, url=nil)
View
2 lib/bootstrap_helper/locale/en.yml
@@ -0,0 +1,2 @@
+"en":
+ home: "Home"
View
2 lib/bootstrap_helper/locale/zh-CN.yml
@@ -0,0 +1,2 @@
+"zh-CN":
+ home: "首页"
View
2 lib/bootstrap_helper/locale/zh-TW.yml
@@ -0,0 +1,2 @@
+"zh-TW":
+ home: "首頁"
View
2 spec/spec_helper.rb
@@ -14,6 +14,8 @@
RSpec.configure do |config|
+ config.include Capybara::DSL
+
# ## Mock Framework
#
# If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:

0 comments on commit 59443e7

Please sign in to comment.