Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
remote_i18n_extension
Advanced tools
This gem is built on top of the popular I18n gem providing the ability to fetch translations from remotely hosted locale files. In case of a missing translation the gem fallbacks to serving translations from local files(present under config/locales
) folder of your rails project.
This gem requires ruby 3.1.3
and Rails 7.0.4.3
To get started paste the following inside your Gemfile and run bundle
gem 'remote_i18n_extension', '~> 1.0', '>= 1.0.9'
or install via terminal using the following command:
gem install remote_i18n_extension
After that run the following command to generate the config file
rails g remote_i18n_extension:install
This will create the following config file config/initializers/remote_i18n_extension.rb
require 'remote_i18n_extension'
RemoteI18nExtension.config do |config|
# All the configurations are mandatory
# URL to your remote locales folder housing all the translations
# For now the library expects all the locales to be stored in a single (root) folder
# e.g. https://raw.githubusercontent.com/Gooner91/locales-repo/master/locales
# config.remote_host = ENV['LOCALES_REMOTE_HOST']
# Below configurations are for the ruby I18n module
# List of available locales
# config.available_locales = [:en, :de]
# config.locale = :en
# Paths to the translation files (in your local rails project for fallback)
# e.g. Dir[Rails.root.join("config", "locales", "*.{rb,yml}")]
# config.load_path = %w[]
end
https://raw.githubusercontent.com/Gooner91/locales-repo/master/locales
if all the translation files are uploaded in side the locales
folder provided in the above URL%i[:en :de]
:en
Dir[Rails.root.join("config", "locales", "*.yml")]
Fire up the server and you should be able to reference translations using the following method:
RemoteI18nExtension.t('activerecord.attributes.user.confirmation_sent_at')
A demo of the working of this gem can be seen on the following loom link: https://www.loom.com/share/78825da1d74248f1b80949bf4e72b1cc
This gem facilitates fetching the locales
that are hosted online. For that purpose the gem expects all the locales
/translation
files to be stored at one place.
Since this was a time bound activity, there are some improvments/fine tuning that can be done even further:
Remote
backend, test coverage should be increasedFAQs
Unknown package
We found that remote_i18n_extension 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.