Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
spree_product_translations
Advanced tools
Makes product details, properties, prototypes, taxonomies and option types translatable by bridging the Globalize3 gem.
In your Gemfile, add:
gem 'spree_product_translations'
Then install the gem:
bundle install
Then copy the migrations to your spree application:
rake spree_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
it will copy the original data over to the new translation tables. Globalize3 doesn't default to the original model table for the default locale like v1 used to.
To edit the content in a specific language, simply change the locale on the language nav, and edit on the admin as usual.
If you have translations in your database (by using the spree-simple_product_translations extension for example) with empty translations (being a blank string instead of nil
) you might want to add this configuration option to an initializer in your app:
Spree::Config.set :fallbacks_for_empty_translations => true
It will then use fallbacks for empty strings too.
The tests are not updated since the original fork of the spree 0.11 compatible version. They will pretty sure fail. Feel free to fork the project and create a pull request with tests.
You might need to comment out the rspec gem requirement under config/environments/test.rb - for some reason, even with both the rspec gem and plugin installed, I would keep getting an annoying missing gem error.
Spree is officially making a choice for Test::Unit anyway, so this shouldn't create a problem.
(not that I don't like Rspec, I actually prefer it in other projects.)
If you see anything you need missing, or if you have a useful patch, feel free to submit them on the Issues section of the github project.
FAQs
Unknown package
We found that spree_product_translations demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.