🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

rosette

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rosette

bundlerRubygems
Version
1.0.0
Version published
Maintainers
1
Created
Source

Rosette

Rosette is a Ruby on Rails engine that helps you add missing translations to your application.

If your main app is configured to raise on missing translations, Rosette will catch any I18n::MissingTranslationData error and display a form to add the missing translations.

The form includes an input for each available locale set by config.i18n.available_locales.

Installation

Add this line to your application's Gemfile:

gem "rosette"

And then execute:

$ bundle

Make sure your app raises error for missing translations in development:

# config/environments/development.rb

config.i18n.raise_on_missing_translations = true

and that you explicitly set the available locales:

# config/application.rb

config.i18n.available_locales = [:fr, :en]

Whether you currently use or are interested in starting to use i18n-task to normalize your locales files, add this initializer:

# config/initializers/rosette.rb

Rosette.normalize = true

Preview

This is how you will be able to add your missing translations for each available locale set in config/application.rb:

CLI

This gem also provides a command line interface. Run bundle exec rosette to get the list of all the tasks:

License

The gem is available as open source under the terms of the MIT License.

FAQs

Package last updated on 20 Apr 2023

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