diff --git a/README.markdown b/README.markdown
index 74c1c77..e079079 100644
--- a/README.markdown
+++ b/README.markdown
@@ -3,9 +3,14 @@ Recently Viewed
### Installation
- script/extension install git://github.com/romul/spree-recently-viewed.git
+ in the Gemfile add:
+
+ gem 'spree_recently_viewed', :git => 'git://github.com/kennyadsl/spree_recently_viewed.git'
+ for i18n add a file named {language}_spree_recently_viewed.yml in your /config/locales/ directory.
+
### Usage
- <%= stylesheet_link_tag "/recently/viewed/products.css?product_id=#{@product.id}" %>
+ in the view file you prefer add the following line:
+ <%= render 'shared/recently_viewed_products' %>
diff --git a/app/views/shared/_recently_viewed_products.html.erb b/app/views/shared/_recently_viewed_products.html.erb
index ee62781..b2bb938 100644
--- a/app/views/shared/_recently_viewed_products.html.erb
+++ b/app/views/shared/_recently_viewed_products.html.erb
@@ -1,8 +1,8 @@
<% if get_recently_viewed_products.any? %>
-
Recently viewed products
+ <%= t :recently_viewed_products %>
<% get_recently_viewed_products.each do |p| %>
- - <%= link_to p.name, p %>
+ - <%= link_to p.name, p %>
<% end -%>
-<% end %>
\ No newline at end of file
+<% end %>
diff --git a/config/locales/en.yml b/config/locales/en.yml
new file mode 100644
index 0000000..fecdd5f
--- /dev/null
+++ b/config/locales/en.yml
@@ -0,0 +1,3 @@
+en:
+ recently_viewed_products: "Recently viewed products"
+
diff --git a/lib/spree_recently_viewed_hooks.rb b/lib/spree_recently_viewed_hooks.rb
index 6a921dc..c550c41 100644
--- a/lib/spree_recently_viewed_hooks.rb
+++ b/lib/spree_recently_viewed_hooks.rb
@@ -1,11 +1,2 @@
class RecentlyViewedHooks < Spree::ThemeSupport::HookListener
-
- insert_after :inside_head do
- '
- <% if @product %>
- <%= stylesheet_link_tag("/recently/viewed/products.css?product_id=#{@product.id}") %>
- <% end %>
- '
- end
-
end
diff --git a/spree_recently_viewed.gemspec b/spree_recently_viewed.gemspec
index b0b3768..f9dbea4 100644
--- a/spree_recently_viewed.gemspec
+++ b/spree_recently_viewed.gemspec
@@ -5,6 +5,7 @@ Gem::Specification.new do |s|
s.summary = 'Adds recently viewed products to Spree'
#s.description = 'Add (optional) gem description here'
s.required_ruby_version = '>= 1.8.7'
+ s.author = 'Nebulab'
s.files = Dir['CHANGELOG', 'README.md', 'LICENSE', 'lib/**/*', 'app/**/*']
s.require_path = 'lib'
@@ -12,5 +13,5 @@ Gem::Specification.new do |s|
s.has_rdoc = true
- s.add_dependency('spree_core', '>= 0.40.0')
-end
\ No newline at end of file
+ s.add_dependency('spree_core', '>= 0.30.1')
+end