Skip to content

Commit

Permalink
add i18n support
Browse files Browse the repository at this point in the history
fix visit method not found in rspec
  • Loading branch information
Leon Kai Yu committed Jan 1, 2013
1 parent 2e9f275 commit 59443e7
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/bootstrap_helper/breadcrumb.rb
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions lib/bootstrap_helper/locale/en.yml
@@ -0,0 +1,2 @@
"en":
home: "Home"
2 changes: 2 additions & 0 deletions lib/bootstrap_helper/locale/zh-CN.yml
@@ -0,0 +1,2 @@
"zh-CN":
home: "首页"
2 changes: 2 additions & 0 deletions lib/bootstrap_helper/locale/zh-TW.yml
@@ -0,0 +1,2 @@
"zh-TW":
home: "首頁"
2 changes: 2 additions & 0 deletions spec/spec_helper.rb
Expand Up @@ -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:
Expand Down

0 comments on commit 59443e7

Please sign in to comment.