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.
Rosetta is a library for Rails that helps you identify the translations that are being used on your app pages. The library adds an expandable menu to each page that shows all phrases being used in the page along with additional info depending on the Repository used.
It is especially useful if you use the OneSky translation service since it gives you direct links to edit the translations on OneSky. This makes it easy for copy writers of your app to see the texts in context and edit the translations.
When using regular translations, it shows the file where translation is so you can more easily find and edit it.
Rosetta requires a Ruby version >= 2.3
The phrases menu is different depending on the way you manage your translations. There are currently 2 repositories: Local (default) and OneSky
This is the default repository and shows translations managed manually via YML files. It shows the file where each translation is stored to be able to easily find it.
It requires no further configuration.
Use this repository if you manage your translations using the OneSky translation service. It adds a link to each translations pointing to the edit page for that text in OneSky.
It requires 2 configuration options:
Add this to your Gemfile:
gem 'rosetta', '~> 1.1'
and run the bundle install
command.
To generate the initializer file run rails g rosetta:install
By default, Rosetta is disabled. You need to explicitly enable it when desired. Usually that will depend on the current user making the request.
To enable it in a per-request basis add a before_action :enable_rosetta
to the desired controller and add an if
condition if necessary. Example:
before_action :enable_rosetta, if: ->() { current_user.admin? }
In order to show the menu with the translations you need to indicate where you want to render it. Usually this will be in your application's layout. Add this at the end of the body of your layours/application.html.erb
:
<%= render rosetta_menu %>
You can configure the library through the initializer.
Example:
Rosetta.setup do |config|
# OneSky repository config
config.repository = Rosetta::Repositories::Onesky.new
config.repository.project_id = ENV['ONESKY_PROJECT_ID']
config.repository.subdomain = ENV['ONESKY_SUBDOMAIN']
# Local repository config
config.repository = Rosetta::Repositories::Local
end
When first developing, you need to run bundle install
.
Run the specs with rspec spec
.
Launch the dummy app with rails s
.
Rosetta is maintained and funded by MarsBased
The names and logos for MarsBased are trademarks of MarsBased.
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that rosetta 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.