Skip to content

Rails I18n Extractor is a RubyMine plugin designed to assist in the internationalization of Ruby on Rails projects.

Notifications You must be signed in to change notification settings

kb714/intellij-i18n-rails-text-extractor

Repository files navigation

Rails I18n Extractor

Rails I18n Extractor is a RubyMine plugin designed to assist in the internationalization of Ruby on Rails projects. It enables developers to manually select hardcoded strings within their project and replace them with I18n translation keys, streamlining the process of preparing an application for localization. Additionally, the plugin facilitates the generation of corresponding entries in locale YAML files.

Features

  • Manual Text Selection: Users can manually select the text that needs to be internationalized.
  • YAML Generation: Automatically creates or updates locale YAML files with selected strings as I18n translation keys.
  • Custom Key Support: Offers the ability to specify custom translation keys for the selected strings.
  • packwerk: This plugin provides support for the Packwerk folder structure.

Installation

To install the Rails I18n Extractor plugin in RubyMine:

  1. Download the plugin .jar file.
  2. Open RubyMine and navigate to Preferences > Plugins.
  3. Click on the gear icon and select Install Plugin from Disk....
  4. Choose the downloaded file and restart RubyMine.

Usage

  1. Open any Ruby or ERB file in RubyMine.
  2. Select the hardcoded string you wish to internationalize.
  3. Right-click to open the context menu and select the Extract option.
  4. Follow the prompts to specify a custom translation key if desired. The plugin will replace the selected text with the appropriate I18n method call and generate or update the corresponding entry in your locale YAML file.

Contributing

Contributions to Rails I18n Extractor are warmly welcomed. If you'd like to contribute, please fork the repository and use a feature branch for your development. Pull requests are highly appreciated.

License

Rails I18n Extractor is made available under the MIT License.

About

Rails I18n Extractor is a RubyMine plugin designed to assist in the internationalization of Ruby on Rails projects.

Topics

Resources

Stars

Watchers

Forks

Languages