diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1bfde87e..9bd4533d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,11 +1,11 @@
master
===
-3.3.13
+3.4.0
===
* Fix webrick restarts on Ruby 2.2
-* Empower link_to in a i18n context
+* Empower link_to in a i18n context.
* Add retina files support on automatic_image_sizes
3.3.12
diff --git a/middleman-core/features/i18n_link_to.feature b/middleman-core/features/i18n_link_to.feature
index d03c532b..1befe171 100644
--- a/middleman-core/features/i18n_link_to.feature
+++ b/middleman-core/features/i18n_link_to.feature
@@ -24,8 +24,10 @@ Feature: i18n Links
"""
Page: <%= t(:msg) %>
<% data.pages.each_with_index do |p, i| %>
- <%= link_to "Current #{p}", "/#{p}" %>
- <%= link_to "Other #{p}", "/#{p}", lang: ::I18n.locale == :en ? :es : :en %>
+ <%= link_to "Current #{p}", "/#{p}", class: 'current' %>
+ <%= link_to "Other #{p}", "/#{p}", title: "Other #{p}", locale: ::I18n.locale == :en ? :es : :en %>
+ <% link_to "/#{p}", class: 'current' do %>Current Block<% end %>
+ <% link_to "/#{p}", title: "Other #{p}", locale: ::I18n.locale == :en ? :es : :en do %>Other Block<% end %>
<% end %>
"""
And a file named "config.rb" with:
@@ -35,9 +37,13 @@ Feature: i18n Links
Given the Server is running at "empty-app"
When I go to "/hello.html"
Then I should see "Page: Hello"
- Then I should see 'Current hello.html'
- Then I should see 'Other hello.html'
+ Then I should see 'Current hello.html'
+ Then I should see 'Other hello.html'
+ Then I should see 'Current Block'
+ Then I should see 'Other Block'
When I go to "/es/hola.html"
Then I should see "Page: Hola"
- Then I should see 'Current hello.html'
- Then I should see 'Other hello.html'
\ No newline at end of file
+ Then I should see 'Current hello.html'
+ Then I should see 'Other hello.html'
+ Then I should see 'Current Block'
+ Then I should see 'Other Block'
\ No newline at end of file
diff --git a/middleman-core/lib/middleman-core/version.rb b/middleman-core/lib/middleman-core/version.rb
index 24ef9ca0..01894a8e 100644
--- a/middleman-core/lib/middleman-core/version.rb
+++ b/middleman-core/lib/middleman-core/version.rb
@@ -1,5 +1,5 @@
module Middleman
# Current Version
# @return [String]
- VERSION = '3.3.14' unless const_defined?(:VERSION)
+ VERSION = '3.4.0' unless const_defined?(:VERSION)
end
diff --git a/middleman-core/lib/middleman-more/core_extensions/i18n.rb b/middleman-core/lib/middleman-more/core_extensions/i18n.rb
index 8f88cfef..7ae83a7a 100644
--- a/middleman-core/lib/middleman-more/core_extensions/i18n.rb
+++ b/middleman-core/lib/middleman-more/core_extensions/i18n.rb
@@ -63,9 +63,9 @@ class Middleman::CoreExtensions::Internationalization < ::Middleman::Extension
name = block_given? ? '' : args.shift
href = args.first
- lang = options.delete(:lang) || ::I18n.locale
+ locale = options.delete(:locale) || ::I18n.locale
- url = extensions[:i18n].localized_path(href, lang)
+ url = extensions[:i18n].localized_path(href, locale)
new_args = []
new_args << name unless block_given?
new_args << url || href