Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/yfractal/i18n_debug_page

Mountable rails engin for rails app to check i18n translations in page.
https://github.com/yfractal/i18n_debug_page

debug i18n rails rails-engine

Last synced: 21 days ago
JSON representation

Mountable rails engin for rails app to check i18n translations in page.

Awesome Lists containing this project

README

        

# I18n Debug Page
Mountable rails engin for rails app to check i18n translations in page.

When we develop a rails app we want to get better debug info. The gem [i18n-debug](https://github.com/fphilipe/i18n-debug) provide a very handy way to present rails translations' lookup.

But the log is mixed in rails log and most time the log is really long. It's better if we have seperate place to present such thing, so I18n Debug Page comes.

## Example

## Install

```ruby
# Gemfile
gem 'i18n_debug_page', '~> 0.1.1', group: :development
```

Run:

```bash
$ bundle install
```

Include `I18nDebugPage` in `ApplicationController`

```
# app/controllers/application_controller.rb
include I18nDebugPage if defined? I18nDebugPage

```

Mount the engine
```ruby
# config/routes.rb
mount I18nDebugPage::Engine => "/" if Rails.env.development?
```

Then you can find i18n debug log in path `/i18n_debug_logs`

## TODO
- Provide better UI
- Make the installation more easier

## Additional Information
This gem was inspired by [status-page](https://github.com/rails-engine/status-page) and [i18n-debug](https://github.com/fphilipe/i18n-debug)

## License

The MIT License (MIT)