Code Monkey home page Code Monkey logo

devise-i18n-views's Introduction

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!

devise-i18n-views's People

Contributors

arturt avatar bbonamin avatar bricesanchez avatar coupling avatar danielweinmann avatar demonodojo avatar gcerquant avatar hron84 avatar humancopy avatar jasonbarnabe avatar joel avatar jyrkij avatar kendrikat avatar mabras avatar mar1cx avatar martyciz avatar mcasimir avatar myabc avatar panos78 avatar rafaelmcarvalho avatar raszi avatar rickygu avatar saicheg avatar shingo-nakanishi avatar teefan avatar timurkhafizov avatar tmaier avatar tombu avatar weijen avatar zpvip avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

devise-i18n-views's Issues

Add ja locale

I translated with Localeapp, but the translations did not merged this repository.
Please merge ja locale.

Ukrainian locale should named just :uk

For example, there is no uk-UA locale in rails-i18n:

Available locales are:

af, ar, az, bg, bn, bs, ca, cs, cy, da, de, de-AT, de-CH, el, en, en-AU, en-CA, en-GB, en-IE, en-IN, en-NZ, en-US, en-ZA, eo, es, es-419, es-AR, es-CL, es-CO, es-CR, es-EC, es-MX, es-PA, es-PE, es-US, es-VE, et, eu, fa, fi, fr, fr-CA, fr-CH, gl, he, hi, hi-IN, hr, hu, id, is, it, it-CH, ja, km, kn, ko, lo, lt, lv, mk, mn, mr-IN, ms, nb, ne, nl, nn, or, pl, pt, pt-BR, rm, ro, ru, sk, sl, sr, sv, sw, ta, th, tl, tr, tt, uk, ug, ur, uz, vi, wo, zh-CN, zh-HK, zh-TW, zh-YUE

https://github.com/svenfuchs/rails-i18n

more languages

Hi,

could it be possible to add hindi, zn-HK, and malay ?

thanks

reset password is broken

version 0.3.7
devise 4.1.1

Create a brand new rails project last week, including devise, devise-i18n and devise-i18n-views out of the box, nl as locale.

Resetting the password in the app gives me:

Reset password token is ongeldig.

When removing devise-i18n-views, the problem does not occur.

Bootstrap views

You really have to add the Twitter Bootstrap and/or Foundation templates.

Time for a new release?

Since 0.2.6, several new locales were added. When will there be a new release that includes these?

Update registrations/edit

This is missing in registrations/edit

  - if devise_mapping.confirmable? && resource.pending_reconfirmation?
    %p Currently waiting confirmation for: #{resource.unconfirmed_email}

Support devise view generator (or add an alternative)

The rails g devise:views command will generate the default devise view templates in the app/views folder allowing the user to customize them. A similar command could be provided here to allow easier copying of the i18n devise views. It's easy to copy them from Github, but this might add some nice polish.

Input labels

Maybe I'm missing something, but shouldn't form input labels also be translated?

ActionView::Template::Error for hu.yml although language is :en

I have installed this gem alongside devise in my project, but I receive the following error in my production deployment (not in development on my machine):

ActionView::Template::Error (can not load translations from /.../bundle/ruby/2.2.0/gems/devise-i18n-views-0.3.4/lib/../locales/hu.yml: #<Errno::EACCES: Permission denied @ rb_sysopen - /.../bundle/ruby/2.2.0/gems/devise-i18n-views-0.3.4/lib/../locales/hu.yml>):
    1: <h2><%= t('.sign_in', :default => "Sign in") %></h2>

I'm not even using the :hu language so this is a bit annoying. Is this gem loading all languages if no available locales are set? And is it possible something's wrong with the hu.yml?

Missing translation in fr

fr:
devise:
passwords:
edit:
change_your_password: Changer votre mot de passe
new_password: Nouveau mot de passe
confirm_new_password: Confirmez votre nouveau mot de passe
change_my_password: Changer mon mot de passe
registrations:
edit:
update: Modifier
unhappy: "Pas content "

Errno::EACCES: Permission denied

Right after installing the gem I got this error white trying to use it.

I18n::InvalidLocaleData at /users/sign_in
can not load translations from /home/vagrant/.rvm/gems/ruby-2.2.2/gems/devise-i18n-views-0.3.4/lib/../locales/pt-BR.yml: #<Errno::EACCES: Permission denied @ rb_sysopen - /home/vagrant/.rvm/gems/ruby-2.2.2/gems/devise-i18n-views-0.3.4/lib/../locales/pt-BR.yml>

I don't know why but it is generating most of the translation files with a very restrictive permission

$ ll -lah /home/vagrant/.rvm/gems/ruby-2.2.2/gems/devise-i18n-views-0.3.4/lib/../locales/
total 124K
drwxr-xr-x 2 root root 4.0K Jul  3 02:47 ./
drwxr-xr-x 6 root root 4.0K Jul  3 02:47 ../
-rw------- 1 root root 3.8K Jul  3 02:47 bg.yml
-rw------- 1 root root 2.9K Jul  3 02:47 ca.yml
-rw------- 1 root root 2.7K Jul  3 02:47 cs.yml
-rw------- 1 root root 2.6K Jul  3 02:47 da-DK.yml
-rw------- 1 root root 2.9K Jul  3 02:47 de.yml
-rw------- 1 root root 4.3K Jul  3 02:47 el.yml
-rw-r--r-- 1 root root 2.7K Jul  3 02:47 en.yml
-rw------- 1 root root 2.5K Jul  3 02:47 es-AR.yml
-rw------- 1 root root 2.9K Jul  3 02:47 es-ES.yml
-rw------- 1 root root 3.0K Jul  3 02:47 es-MX.yml
-rw------- 1 root root 2.9K Jul  3 02:47 es.yml
-rw------- 1 root root 2.5K Jul  3 02:47 fi.yml
-rw------- 1 root root 2.9K Jul  3 02:47 fr.yml
-rw------- 1 root root 2.8K Jul  3 02:47 hu.yml
-rw------- 1 root root 2.6K Jul  3 02:47 it.yml
-rw------- 1 root root 3.3K Jul  3 02:47 ja.yml
-rw------- 1 root root 2.5K Jul  3 02:47 nb.yml
-rw------- 1 root root 2.8K Jul  3 02:47 nl.yml
-rw------- 1 root root 2.7K Jul  3 02:47 pl.yml
-rw------- 1 root root 2.7K Jul  3 02:47 pt-BR.yml
-rw------- 1 root root 2.5K Jul  3 02:47 pt-PT.yml
-rw------- 1 root root 3.5K Jul  3 02:47 ru.yml
-rw------- 1 root root 2.8K Jul  3 02:47 sk.yml
-rw------- 1 root root 4.6K Jul  3 02:47 th.yml
-rw------- 1 root root 2.7K Jul  3 02:47 tr.yml
-rw-r--r-- 1 root root 2.6K Jul  3 02:47 zh-CN.yml
-rw------- 1 root root 2.5K Jul  3 02:47 zh-TW.yml

Any ideas?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.