• Stars
    star
    120
  • Rank 295,983 (Top 6 %)
  • Language
    Ruby
  • License
    MIT License
  • Created over 12 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

I18n support for devise views

devise-i18n-views has been merged into devise-i18n. You should stop using devise-i18n-views and start using devise-i18n 1.0.0 or later. There will be no further releases of devise-i18n-views.

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

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

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

More Repositories

1

mobile-angular-ui

Angular.js Mobile UI Framework with Bootstrap 3
JavaScript
2,867
star
2

gulp-rollup

gulp plugin for Rollup ES6 module bundler
JavaScript
93
star
3

kaminari-bootstrap

Kaminari Views for Twitter Bootstrap
Ruby
85
star
4

generator-mobileangularui

Mobile Angular Ui Yeoman Generator
JavaScript
30
star
5

meta-tags-helpers

Meta tags helpers for Rails
Ruby
20
star
6

release-flow

Git flow conventional releases
JavaScript
14
star
7

docker-autoheal

Restart unhealthy containers based on healthchecks
JavaScript
10
star
8

regsecret-operator

Kubernetes operator to automate imagePullSecrets creation
Go
9
star
9

mobile-angular-ui-ui-router

UI Router support for Mobile Angular UI
JavaScript
6
star
10

angular-multiple-transclusion

Simple unobtrusive angular multiple transclusion support with ng-transclude
JavaScript
6
star
11

active_record_schema

ActiveRecord extension allowing to write schema in models and to generate migrations from models
Ruby
4
star
12

remoting

Remoting – turn plain rake tasks in scripts to administer the server remotely
Ruby
4
star
13

mobile-angular-ui-website

gh-pages repo for mobileangularui website
JavaScript
3
star
14

dind-node-build-runner

Docker image for node and docker builds
Shell
3
star
15

mobilizer

Extract mobile stylesheet from responsive css files
JavaScript
3
star
16

journalbeat-docker

Journalbeat docker image
Makefile
2
star
17

evp

Event Pipeline
JavaScript
2
star
18

bootwire

Application and dependencies bootstrap for node.js
JavaScript
2
star
19

valid-config

Define and validate configuration with an extended json schema
JavaScript
1
star
20

depcheck-ci

Npm depcheck util that plays nice with ci
JavaScript
1
star
21

better_rails_admin

Bug fixes, better Dsl and new features for Rails Admin
Ruby
1
star
22

docker-eventstore

Eventstore image and k8 configuration
Shell
1
star
23

rambler

A clean DSL to code non-resourceful Rails controllers
Ruby
1
star
24

friendly_id_schema

A Ruby Micro Gem for use FriendlyId with ActiveRecordSchema
Ruby
1
star
25

gulp-mobilizer

Mobilizer task for Gulp
JavaScript
1
star
26

rails_mongoid_cms

Rails Template to create a Ready to deploy CMS based on Mongoid
CSS
1
star