0.0
The project is in a healthy, maintained state
This gem extends the internationalization (i18n) functionality in Ruby on Rails by adding a simple toggle button to your application’s UI. When activated, it overlays each translated string with a tooltip that displays its associated translation key on hover. This allows QA teams, product managers, and other non-technical stakeholders to quickly identify which translation keys correspond to specific pieces of text on the page—without diving into source code. Designed for simplicity and ease-of-use, the gem integrates seamlessly with the Rails asset pipeline and can be easily enabled or disabled as needed, streamlining your localization quality assurance process.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

I18nHoverKeys

A Rails extension that reveals translation keys when hovering over translated text, empowering QA teams and non-developers to identify the exact keys used in the interface.

Usage

Installation

  1. Add the gem to your Gemfile:

    gem 'i18n_hover_keys'
    
  2. Run bundle install to install the gem.

Usage in Views

Make sure you use the t (or translate) helper in your views for translations:

<%= t("general.information") %>

Include the toggle button in your layout or view where you want to toggle the feature:

<%= i18n_hover_toggle_button %>

Clicking this button enables hover mode:

  • Hover over any translated text, and a tooltip will show the corresponding translation key.
  • Click the button again to disable hover mode.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/eric-khoury/i18n_hover_keys.

License

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