Spree Extension: Simple Product Translations
This extension allows you to translate product details on an intuitive way based on tabs.
Currently it will load tabs for all locales in
In your Gemfile you just add:
Then install the gem:
Then copy the migrations and assets to your spree application:
rake spree_product_translations:install rake spree_simple_product_translations:install
To apply the Smoothness theme to the jQuery UI tabs add the following to app/assets/stylesheets/admin/all.css:
*= require jquery-ui-smoothness
Finally migrate your database:
If you have pre-existing data, you'll need to run this rake task:
In the current version of Globalize3 there is an issue with fallbacks. When you add new translations in the forms, but leave some of them blank, they won't fall back to the default locale. This is because Globalize3 only loads fallbacks when the values are nil. Because of the way Rails handles these attributes, they will be stored as blank strings into the database.
gem 'globalize3', :git => 'git://github.com/jeroenj/globalize3.git', :branch => 'fallbacks-master'
For those interested, you can follow the pull request here.
Empty forms (properties & taxons)
Spree is using symbols instead of objects to define
form_for's for properties and taxons. This causes the forms to be empty. This can be fixed by overriding both edit pages with the changes found in this pull request.
To add in future releases
- Add form to:
- Configuration option for which locales te load
- Better design?
Feel free to fork this project and provide with any necesary patches. Tests are welcome too.
Copyright (c) 2011 Jeroen Jacobs, released under the New BSD License