Socket
Book a DemoInstallSign in
Socket

devise-i18n-views

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

devise-i18n-views

0.3.7
bundlerRubygems
Version published
Maintainers
2
Created
Source

devise-i18n-views

If you're not familiar, Devise "is a flexible authentication solution for Rails based on Warden". Internationalization (aka i18n) is a "means of adapting computer software to different languages, regional differences and technical requirements of a target market".

While Devise supports internationalization in controllers, models, and in other areas, it does not support internationalization in its views. devise-i18n adds translations for the things Devise has internationalized, but does not add support for internationalized views, either.

devise-i18n-views does add support for internationalization in views, and provides the translations too.

Prerequisites

It would be senseless to use devise-i18n-views without Devise, so consider that a prerequisite. devise-i18n-views contains views compatible with Devise v2 and above.

Additionally, to have Devise fully translated, you will want devise-i18n as well.

Install

Add the following line to your Gemfile

gem 'devise-i18n-views'

and run bundle install. Assuming you have not previously generated Devise's views into your project, that's all you need to do. If you have previously done this, you will need to regenerate your views (see the next section) and then reapply whatever customizations that made you do this in the first place.

Customizing Views

The devise:views:i18n_templates generator will copy all devise-i18n-views's views to your application, so you can modify the files as you wish:

rails g devise:views:i18n_templates

You should only do this if you really need to, though, because doing this will make it so that you won't get the updated views should they change in a future version of devise-i18n-views. To "uncustomize" the views, just delete them, and your app will go back to grabbing devise-i18n-views's default views.

Customizating Translations

If, for whatever reason, you want to change devise-i18n-views's translations, you can generate the locale file into your project with

rails g devise:views:locale it

which will generate config/locales/devise.views.it.yml. If you're doing this to add a missing translation or to improve an existing one, it'd be nice if you could share your suggestions with us!

Contributing to devise-i18n-views

If you would like to submit a new or updated translation, you can do so on the devise-i18n-views project on Locale or with a pull request on GitHub. These two places will be kept in sync.

devise-i18n-views/locales/en.yml is the original, and only, file that needs to be translated.

Copyright (c) 2012 mcasimir. See LICENSE.txt for further details.

A ruby translation project managed on Locale that's open to all!

FAQs

Package last updated on 29 Nov 2015

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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.