Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

spree_simple_product_translations

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

spree_simple_product_translations

  • 0.1.0.beta1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

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 I18n.available_locales.

Installation

In your Gemfile you just add:

gem 'spree_simple_product_translations'

Then install the gem:

bundle install

Then copy the migrations and assets to your spree application:

rake spree_product_translations:install
rake spree_simple_product_translations:install

Finally migrate your database:

rake db:migrate

If you have pre-existing data, you'll need to run this rake task:

rake spree:extensions:product_translations:globalize_legacy_data

Fallbacks for empty translations

You might want to use fallbacks to the default locale if you haven't entered translations. By default fallbacks will only be loaded if the translation is nil. If you're entering translations through the forms, empty translations will be set to an empty string, causing fallbacks to not work. If you want to enable fallbacks for empty translations you can simply set the following configuration in an initializer in your app:

Spree::Config.set :fallbacks_for_empty_translations => true

Open issues

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:
    • Prototype
    • Taxonomy
  • Tests
  • Configuration option for which locales te load
  • Better design?

Patches

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

FAQs

Package last updated on 21 Sep 2011

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc