Permalink
Browse files

First commit

  • Loading branch information...
0 parents commit d908d3a06f2c1d9c1acc4b38979c17a510e1caa8 @tigrish committed Dec 15, 2011
Showing with 317 additions and 0 deletions.
  1. BIN .DS_Store
  2. +5 −0 .document
  3. +15 −0 .gitignore
  4. +1 −0 .rspec
  5. +1 −0 .rvmrc
  6. +1 −0 .travis.yml
  7. +9 −0 Gemfile
  8. +30 −0 Gemfile.lock
  9. +20 −0 LICENSE.txt
  10. +19 −0 README.md
  11. +49 −0 Rakefile
  12. +1 −0 VERSION
  13. +79 −0 devise-i18n.gemspec
  14. +10 −0 lib/devise-i18n.rb
  15. BIN locale/.DS_Store
  16. +57 −0 locale/en-US.yml
  17. +8 −0 spec/devise-i18n_spec.rb
  18. +12 −0 spec/spec_helper.rb
BIN .DS_Store
Binary file not shown.
@@ -0,0 +1,5 @@
+lib/**/*.rb
+bin/*
+-
+features/**/*.feature
+LICENSE.txt
@@ -0,0 +1,15 @@
+# rcov generated
+coverage
+
+# rdoc generated
+rdoc
+
+# yard generated
+doc
+.yardoc
+
+# bundler
+.bundle
+
+# jeweler generated
+pkg
1 .rspec
@@ -0,0 +1 @@
+--color
1 .rvmrc
@@ -0,0 +1 @@
+rvm 1.9.2@devise-i18n
@@ -0,0 +1 @@
+rvm: 1.9.2
@@ -0,0 +1,9 @@
+source "http://rubygems.org"
+
+group :development do
+ gem "rspec", "~> 2.3.0"
+ gem "bundler", "~> 1.0.10" # so that we know we have Psych
+ gem "jeweler", "~> 1.6.4"
+ gem "rcov", ">= 0"
+ gem 'i18n-spec'
+end
@@ -0,0 +1,30 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ diff-lcs (1.1.3)
+ git (1.2.5)
+ i18n-spec (0.0.6)
+ jeweler (1.6.4)
+ bundler (~> 1.0)
+ git (>= 1.2.5)
+ rake
+ rake (0.9.2.2)
+ rcov (0.9.11)
+ rspec (2.3.0)
+ rspec-core (~> 2.3.0)
+ rspec-expectations (~> 2.3.0)
+ rspec-mocks (~> 2.3.0)
+ rspec-core (2.3.1)
+ rspec-expectations (2.3.0)
+ diff-lcs (~> 1.1.2)
+ rspec-mocks (2.3.0)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ bundler (~> 1.0.10)
+ i18n-spec
+ jeweler (~> 1.6.4)
+ rcov
+ rspec (~> 2.3.0)
@@ -0,0 +1,20 @@
+Copyright (c) 2011 Christopher Dell
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,19 @@
+# devise-i18n
+
+[![Build Status](https://secure.travis-ci.org/tigrish/devise-i18n.png)](http://travis-ci.org/tigrish/devise-i18n)
+
+## Contributing to devise-i18n
+
+* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
+* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
+* Fork the project
+* Start a feature/bugfix branch
+* Commit and push until you are happy with your contribution
+* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
+* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
+
+## Copyright
+
+Copyright (c) 2011 Christopher Dell. See LICENSE.txt for
+further details.
+
@@ -0,0 +1,49 @@
+# encoding: utf-8
+
+require 'rubygems'
+require 'bundler'
+begin
+ Bundler.setup(:default, :development)
+rescue Bundler::BundlerError => e
+ $stderr.puts e.message
+ $stderr.puts "Run `bundle install` to install missing gems"
+ exit e.status_code
+end
+require 'rake'
+
+require 'jeweler'
+Jeweler::Tasks.new do |gem|
+ # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
+ gem.name = "devise-i18n"
+ gem.homepage = "http://github.com/tigrish/devise-i18n"
+ gem.license = "MIT"
+ gem.summary = %Q{Translations for the devise gem}
+ gem.description = %Q{Translations for the devise gem}
+ gem.email = "chris@tigrish.com"
+ gem.authors = ["Christopher Dell"]
+ # dependencies defined in Gemfile
+end
+Jeweler::RubygemsDotOrgTasks.new
+
+require 'rspec/core'
+require 'rspec/core/rake_task'
+RSpec::Core::RakeTask.new(:spec) do |spec|
+ spec.pattern = FileList['spec/**/*_spec.rb']
+end
+
+RSpec::Core::RakeTask.new(:rcov) do |spec|
+ spec.pattern = 'spec/**/*_spec.rb'
+ spec.rcov = true
+end
+
+task :default => :spec
+
+require 'rake/rdoctask'
+Rake::RDocTask.new do |rdoc|
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
+
+ rdoc.rdoc_dir = 'rdoc'
+ rdoc.title = "devise-i18n #{version}"
+ rdoc.rdoc_files.include('README*')
+ rdoc.rdoc_files.include('lib/**/*.rb')
+end
@@ -0,0 +1 @@
+0.0.0
@@ -0,0 +1,79 @@
+# Generated by jeweler
+# DO NOT EDIT THIS FILE DIRECTLY
+# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
+# -*- encoding: utf-8 -*-
+
+Gem::Specification.new do |s|
+ s.name = %q{devise-i18n}
+ s.version = "0.0.4"
+
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
+ s.authors = [%q{Christopher Dell}]
+ s.date = %q{2011-12-14}
+ s.description = %q{Translations for the devise gem}
+ s.email = %q{chris@tigrish.com}
+ s.extra_rdoc_files = [
+ "LICENSE.txt",
+ "README.md"
+ ]
+ s.files = [
+ ".document",
+ ".rspec",
+ ".rvmrc",
+ ".travis.yml",
+ "Gemfile",
+ "Gemfile.lock",
+ "LICENSE.txt",
+ "README.md",
+ "Rakefile",
+ "VERSION",
+ "lib/devise-i18n.rb",
+ "locale/bg.yml",
+ "locale/da.yml",
+ "locale/de.yml",
+ "locale/en-AU.yml",
+ "locale/en-GB.yml",
+ "locale/en-US.yml",
+ "locale/es.yml",
+ "locale/fr.yml",
+ "locale/hu.yml",
+ "locale/it.yml",
+ "locale/ja.yml",
+ "locale/nl.yml",
+ "locale/pt-PT.yml",
+ "locale/ru.yml",
+ "spec/spec_helper.rb",
+ "spec/devise-i18n_spec.rb",
+ "devise-i18n.gemspec"
+ ]
+ s.homepage = %q{http://github.com/tigrish/devise-i18n}
+ s.licenses = [%q{MIT}]
+ s.require_paths = [%q{lib}]
+ s.rubygems_version = %q{1.8.6}
+ s.summary = %q{Translations for the devise gem}
+
+ if s.respond_to? :specification_version then
+ s.specification_version = 3
+
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
+ s.add_development_dependency(%q<rspec>, ["~> 2.3.0"])
+ s.add_development_dependency(%q<bundler>, ["~> 1.0.10"])
+ s.add_development_dependency(%q<jeweler>, ["~> 1.6.4"])
+ s.add_development_dependency(%q<rcov>, [">= 0"])
+ s.add_development_dependency(%q<i18n-spec>, [">= 0"])
+ else
+ s.add_dependency(%q<rspec>, ["~> 2.3.0"])
+ s.add_dependency(%q<bundler>, ["~> 1.0.10"])
+ s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
+ s.add_dependency(%q<rcov>, [">= 0"])
+ s.add_dependency(%q<i18n-spec>, [">= 0"])
+ end
+ else
+ s.add_dependency(%q<rspec>, ["~> 2.3.0"])
+ s.add_dependency(%q<bundler>, ["~> 1.0.10"])
+ s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
+ s.add_dependency(%q<rcov>, [">= 0"])
+ s.add_dependency(%q<i18n-spec>, [">= 0"])
+ end
+end
+
@@ -0,0 +1,10 @@
+require 'rails'
+
+module DeviseI18n
+ class Railtie < ::Rails::Railtie #:nodoc:
+ initializer 'rails-i18n' do |app|
+ I18n.load_path << Dir[File.join(File.expand_path(File.dirname(__FILE__) + '/../locale'), '*.yml')]
+ I18n.load_path.flatten!
+ end
+ end
+end
Binary file not shown.
@@ -0,0 +1,57 @@
+en-US:
+ errors:
+ messages:
+ expired: "has expired, please request a new one"
+ not_found: "not found"
+ already_confirmed: "was already confirmed, please try signing in"
+ not_locked: "was not locked"
+ not_saved:
+ one: "1 error prohibited this %{resource} from being saved:"
+ other: "%{count} errors prohibited this %{resource} from being saved:"
+
+ devise:
+ failure:
+ already_authenticated: 'You are already signed in.'
+ unauthenticated: 'You need to sign in or sign up before continuing.'
+ unconfirmed: 'You have to confirm your account before continuing.'
+ locked: 'Your account is locked.'
+ invalid: 'Invalid email or password.'
+ invalid_token: 'Invalid authentication token.'
+ timeout: 'Your session expired, please sign in again to continue.'
+ inactive: 'Your account was not activated yet.'
+ sessions:
+ signed_in: 'Signed in successfully.'
+ signed_out: 'Signed out successfully.'
+ passwords:
+ send_instructions: 'You will receive an email with instructions about how to reset your password in a few minutes.'
+ updated: 'Your password was changed successfully. You are now signed in.'
+ updated_not_active: 'Your password was changed successfully.'
+ send_paranoid_instructions: "If your e-mail exists on our database, you will receive a password recovery link on your e-mail"
+ confirmations:
+ send_instructions: 'You will receive an email with instructions about how to confirm your account in a few minutes.'
+ send_paranoid_instructions: 'If your e-mail exists on our database, you will receive an email with instructions about how to confirm your account in a few minutes.'
+ confirmed: 'Your account was successfully confirmed. You are now signed in.'
+ registrations:
+ signed_up: 'Welcome! You have signed up successfully.'
+ inactive_signed_up: 'You have signed up successfully. However, we could not sign you in because your account is %{reason}.'
+ updated: 'You updated your account successfully.'
+ update_needs_confirmation: "You updated your account successfully, but we need to verify your new email address. Please check your email and click on the confirm link to finalize confirming your new email address."
+ destroyed: 'Bye! Your account was successfully cancelled. We hope to see you again soon.'
+ reasons:
+ inactive: 'inactive'
+ unconfirmed: 'unconfirmed'
+ locked: 'locked'
+ unlocks:
+ send_instructions: 'You will receive an email with instructions about how to unlock your account in a few minutes.'
+ unlocked: 'Your account was successfully unlocked. You are now signed in.'
+ send_paranoid_instructions: 'If your account exists, you will receive an email with instructions about how to unlock it in a few minutes.'
+ omniauth_callbacks:
+ success: 'Successfully authorized from %{kind} account.'
+ failure: 'Could not authorize you from %{kind} because "%{reason}".'
+ mailer:
+ confirmation_instructions:
+ subject: 'Confirmation instructions'
+ reset_password_instructions:
+ subject: 'Reset password instructions'
+ unlock_instructions:
+ subject: 'Unlock Instructions'
@@ -0,0 +1,8 @@
+require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
+
+Dir.glob('locale/*.yml').each do |locale_file|
+ describe 'a locale file' do
+ it_behaves_like 'a valid locale file', locale_file
+ it { locale_file.should be_a_complete_translation_of 'locale/en-US.yml' }
+ end
+end
@@ -0,0 +1,12 @@
+$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
+$LOAD_PATH.unshift(File.dirname(__FILE__))
+require 'rspec'
+require 'i18n-spec'
+
+# Requires supporting files with custom matchers and macros, etc,
+# in ./support/ and its subdirectories.
+Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
+
+RSpec.configure do |config|
+
+end

0 comments on commit d908d3a

Please sign in to comment.