kaminari-i18n 0.1.3 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +25 -0
- data/.rspec +1 -0
- data/Gemfile +3 -7
- data/LICENSE.txt +3 -1
- data/README.md +6 -40
- data/Rakefile +6 -23
- data/kaminari-i18n.gemspec +24 -50
- data/lib/kaminari-i18n.rb +2 -6
- data/lib/kaminari-i18n/railtie.rb +24 -0
- data/lib/kaminari-i18n/version.rb +3 -0
- data/locales/az.yml +14 -0
- data/locales/de.yml +17 -0
- data/locales/en.yml +17 -0
- data/locales/es.yml +17 -0
- data/locales/fi.yml +16 -0
- data/locales/fr.yml +16 -0
- data/locales/it.yml +16 -0
- data/locales/ja.yml +14 -0
- data/locales/ko.yml +14 -0
- data/locales/pl.yml +18 -0
- data/locales/pt-BR.yml +17 -0
- data/locales/ru.yml +18 -0
- data/locales/sk.yml +17 -0
- data/locales/zh.yml +14 -0
- data/spec/kaminari-i18n_spec.rb +8 -0
- data/spec/spec_helper.rb +13 -0
- metadata +100 -38
- data/.document +0 -5
- data/Gemfile.lock +0 -93
- data/VERSION +0 -1
- data/lib/generators/kaminari/locale_generator.rb +0 -22
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 6055c493b409757fe88dcb57ee4ac03f5a45b899
|
4
|
+
data.tar.gz: 34f79f3ce374c2ea86af9c8e95f016f67e10d722
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: f23977f6c69630d9f8e2050bcc5dab69c49db5099436e35e14987269b10a5fdd46ca2c82d917eea6b8044b877fa06103b187dad0fe2d4c78e7dc28c849712d79
|
7
|
+
data.tar.gz: 01ef8ae8d8b69dbd3cb01c25257163ead44a2dc9d3f36a35f93c8cb614a145c234319b5a2e3bb6161c3d576dcb48afd25d65585fef8de31b5eca3a9b6d40a3e5
|
data/.gitignore
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
.bundle
|
4
|
+
.config
|
5
|
+
.yardoc
|
6
|
+
.ruby-version
|
7
|
+
.ruby-gemset
|
8
|
+
.localeapp
|
9
|
+
Gemfile.lock
|
10
|
+
InstalledFiles
|
11
|
+
_yardoc
|
12
|
+
coverage
|
13
|
+
doc/
|
14
|
+
lib/bundler/man
|
15
|
+
pkg
|
16
|
+
rdoc
|
17
|
+
spec/reports
|
18
|
+
test/tmp
|
19
|
+
test/version_tmp
|
20
|
+
tmp
|
21
|
+
*.bundle
|
22
|
+
*.so
|
23
|
+
*.o
|
24
|
+
*.a
|
25
|
+
mkmf.log
|
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color
|
data/Gemfile
CHANGED
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -1,45 +1,11 @@
|
|
1
1
|
# kaminari-i18n
|
2
2
|
|
3
|
-
|
3
|
+
A ruby translation project for [kaminari](https://github.com/amatsuda/kaminari) managed on [Locale](http://www.localeapp.com/) that's open to all!
|
4
4
|
|
5
|
-
|
5
|
+
## Contributing to kaminari-i18n
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
pagination:
|
11
|
-
first: "«"
|
12
|
-
last: "»"
|
13
|
-
previous: "‹"
|
14
|
-
next: "›"
|
15
|
-
truncate: "..."
|
16
|
-
|
17
|
-
```
|
18
|
-
|
19
|
-
### Install
|
20
|
-
|
21
|
-
``` rb
|
22
|
-
gem 'kaminari-i18n'
|
23
|
-
```
|
24
|
-
|
25
|
-
### Usage
|
26
|
-
|
27
|
-
```
|
28
|
-
rails g kaminari:locale en
|
29
|
-
```
|
30
|
-
|
31
|
-
== Contributing to kaminari-i18n
|
32
|
-
|
33
|
-
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
|
34
|
-
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
|
35
|
-
* Fork the project.
|
36
|
-
* Start a feature/bugfix branch.
|
37
|
-
* Commit and push until you are happy with your contribution.
|
38
|
-
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
39
|
-
* 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.
|
40
|
-
|
41
|
-
== Copyright
|
42
|
-
|
43
|
-
Copyright (c) 2012 mcasimir. See LICENSE.txt for
|
44
|
-
further details.
|
7
|
+
- Edit the translations directly on the [kaminari-i18n](http://www.localeapp.com/projects/1985) project on Locale.
|
8
|
+
- **That's it!**
|
9
|
+
- The maintainer will then pull translations from the Locale project and push to Github.
|
45
10
|
|
11
|
+
Happy translating!
|
data/Rakefile
CHANGED
@@ -1,26 +1,9 @@
|
|
1
|
-
|
1
|
+
require "bundler/gem_tasks"
|
2
2
|
|
3
|
-
require '
|
4
|
-
require '
|
5
|
-
|
6
|
-
|
7
|
-
rescue Bundler::BundlerError => e
|
8
|
-
$stderr.puts e.message
|
9
|
-
$stderr.puts "Run `bundle install` to install missing gems"
|
10
|
-
exit e.status_code
|
3
|
+
require 'rspec/core'
|
4
|
+
require 'rspec/core/rake_task'
|
5
|
+
RSpec::Core::RakeTask.new(:spec) do |spec|
|
6
|
+
spec.pattern = FileList['spec/**/*_spec.rb']
|
11
7
|
end
|
12
|
-
require 'rake'
|
13
8
|
|
14
|
-
|
15
|
-
Jeweler::Tasks.new do |gem|
|
16
|
-
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
|
17
|
-
gem.name = "kaminari-i18n"
|
18
|
-
gem.homepage = "http://github.com/mcasimir/kaminari-i18n"
|
19
|
-
gem.license = "MIT"
|
20
|
-
gem.summary = %Q{I18n support for Kaminari}
|
21
|
-
gem.description = %Q{I18n support for Kaminari}
|
22
|
-
gem.email = "maurizio.cas@gmail.com"
|
23
|
-
gem.authors = ["mcasimir"]
|
24
|
-
# dependencies defined in Gemfile
|
25
|
-
end
|
26
|
-
Jeweler::RubygemsDotOrgTasks.new
|
9
|
+
task :default => :spec
|
data/kaminari-i18n.gemspec
CHANGED
@@ -1,55 +1,29 @@
|
|
1
|
-
#
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'kaminari-i18n/version'
|
5
5
|
|
6
|
-
Gem::Specification.new do |
|
7
|
-
|
8
|
-
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "kaminari-i18n"
|
8
|
+
spec.version = KaminariI18n::VERSION
|
9
|
+
spec.authors = ["Christopher Dell"]
|
10
|
+
spec.email = ["chris@tigrish.com"]
|
11
|
+
spec.summary = %q{Translations for the kaminari gem}
|
12
|
+
spec.description = %q{Translations for the kaminari gem}
|
13
|
+
spec.homepage = ""
|
14
|
+
spec.license = "MIT"
|
9
15
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
s.email = "maurizio.cas@gmail.com"
|
15
|
-
s.extra_rdoc_files = [
|
16
|
-
"LICENSE.txt",
|
17
|
-
"README.md"
|
18
|
-
]
|
19
|
-
s.files = [
|
20
|
-
".document",
|
21
|
-
"Gemfile",
|
22
|
-
"Gemfile.lock",
|
23
|
-
"LICENSE.txt",
|
24
|
-
"README.md",
|
25
|
-
"Rakefile",
|
26
|
-
"VERSION",
|
27
|
-
"kaminari-i18n.gemspec",
|
28
|
-
"lib/generators/kaminari/locale_generator.rb",
|
29
|
-
"lib/kaminari-i18n.rb"
|
30
|
-
]
|
31
|
-
s.homepage = "http://github.com/mcasimir/kaminari-i18n"
|
32
|
-
s.licenses = ["MIT"]
|
33
|
-
s.require_paths = ["lib"]
|
34
|
-
s.rubygems_version = "1.8.24"
|
35
|
-
s.summary = "I18n support for Kaminari"
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
36
20
|
|
37
|
-
|
38
|
-
|
21
|
+
spec.add_dependency "rails"
|
22
|
+
spec.add_dependency "kaminari"
|
39
23
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
s.add_dependency(%q<rails>, [">= 0"])
|
46
|
-
s.add_dependency(%q<bundler>, [">= 0"])
|
47
|
-
s.add_dependency(%q<jeweler>, [">= 0"])
|
48
|
-
end
|
49
|
-
else
|
50
|
-
s.add_dependency(%q<rails>, [">= 0"])
|
51
|
-
s.add_dependency(%q<bundler>, [">= 0"])
|
52
|
-
s.add_dependency(%q<jeweler>, [">= 0"])
|
53
|
-
end
|
24
|
+
spec.add_development_dependency "bundler", "~> 1.6"
|
25
|
+
spec.add_development_dependency "rake"
|
26
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
27
|
+
spec.add_development_dependency "i18n-spec"
|
28
|
+
spec.add_development_dependency "localeapp"
|
54
29
|
end
|
55
|
-
|
data/lib/kaminari-i18n.rb
CHANGED
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'rails'
|
2
|
+
|
3
|
+
module KaminariI18n
|
4
|
+
class Engine < ::Rails::Engine
|
5
|
+
end
|
6
|
+
|
7
|
+
class Railtie < ::Rails::Railtie #:nodoc:
|
8
|
+
initializer 'kaminari-i18n' do |app|
|
9
|
+
KaminariI18n::Railtie.instance_eval do
|
10
|
+
pattern = pattern_from app.config.i18n.available_locales
|
11
|
+
|
12
|
+
files = Dir[File.join(File.dirname(__FILE__), '../../locales', "#{pattern}.yml")]
|
13
|
+
I18n.load_path.concat(files)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
protected
|
18
|
+
|
19
|
+
def self.pattern_from(args)
|
20
|
+
array = Array(args || [])
|
21
|
+
array.blank? ? '*' : "{#{array.join ','}}"
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
data/locales/az.yml
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
az:
|
2
|
+
helpers:
|
3
|
+
page_entries_info:
|
4
|
+
more_pages:
|
5
|
+
display_entries: Göstərilir %{entry_name} <b>%{first} - %{last}</b> <b>%{total}-dən</b> cəmi
|
6
|
+
one_page:
|
7
|
+
display_entries: Göstərilir <b>bütün %{count}</b> %{entry_name}
|
8
|
+
views:
|
9
|
+
pagination:
|
10
|
+
first: "« İlk"
|
11
|
+
last: Axırıncı »
|
12
|
+
next: Növbəti ›
|
13
|
+
previous: "‹ Əvvəlki"
|
14
|
+
truncate: "…"
|
data/locales/de.yml
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
de:
|
2
|
+
helpers:
|
3
|
+
page_entries_info:
|
4
|
+
more_pages:
|
5
|
+
display_entries: Zeige %{entry_name} <b>%{first} - %{last}</b> von insgesamt <b>%{total}</b>
|
6
|
+
one_page:
|
7
|
+
display_entries:
|
8
|
+
one: Zeige <b>%{count}</b> %{entry_name}
|
9
|
+
other: Zeige <b>alle %{count}</b> %{entry_name}
|
10
|
+
zero: Kein %{entry_name} gefunden
|
11
|
+
views:
|
12
|
+
pagination:
|
13
|
+
first: "« Start"
|
14
|
+
last: Ende »
|
15
|
+
next: Weiter »
|
16
|
+
previous: "‹ Zurück"
|
17
|
+
truncate: "…"
|
data/locales/en.yml
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
en:
|
2
|
+
helpers:
|
3
|
+
page_entries_info:
|
4
|
+
more_pages:
|
5
|
+
display_entries: Displaying %{entry_name} <b>%{first} - %{last}</b> of <b>%{total}</b> in total
|
6
|
+
one_page:
|
7
|
+
display_entries:
|
8
|
+
one: Displaying <b>%{count}</b> %{entry_name}
|
9
|
+
other: Displaying <b>all %{count}</b> %{entry_name}
|
10
|
+
zero: No %{entry_name} found
|
11
|
+
views:
|
12
|
+
pagination:
|
13
|
+
first: "« First"
|
14
|
+
last: Last »
|
15
|
+
next: Next ›
|
16
|
+
previous: "‹ Prev"
|
17
|
+
truncate: "…"
|
data/locales/es.yml
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
es:
|
2
|
+
helpers:
|
3
|
+
page_entries_info:
|
4
|
+
more_pages:
|
5
|
+
display_entries: Mostrando <b>%{first} - %{last}</b> %{entry_name} de <b>%{total}</b> en total
|
6
|
+
one_page:
|
7
|
+
display_entries:
|
8
|
+
one: Mostrando <b>%{count}</b> %{entry_name}
|
9
|
+
other: Mostrando <b>un total de %{count}</b> %{entry_name}
|
10
|
+
zero: No se han encontrado %{entry_name}
|
11
|
+
views:
|
12
|
+
pagination:
|
13
|
+
first: "« Primera"
|
14
|
+
last: "Última »"
|
15
|
+
next: Siguiente ›
|
16
|
+
previous: "‹ Anterior"
|
17
|
+
truncate: "…"
|
data/locales/fi.yml
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
fi:
|
2
|
+
helpers:
|
3
|
+
page_entries_info:
|
4
|
+
more_pages:
|
5
|
+
display_entries:
|
6
|
+
one_page:
|
7
|
+
display_entries:
|
8
|
+
one: Näytetään <b>yksi</b> %{entry_name}
|
9
|
+
other: Näytetään <b>%{count}</b> %{entry_name}
|
10
|
+
views:
|
11
|
+
pagination:
|
12
|
+
first: "« Ensimmäinen"
|
13
|
+
last: Viimeinen »
|
14
|
+
next: Seuraava ›
|
15
|
+
previous: "‹ Edellinen"
|
16
|
+
truncate: "…"
|
data/locales/fr.yml
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
fr:
|
2
|
+
helpers:
|
3
|
+
page_entries_info:
|
4
|
+
more_pages:
|
5
|
+
display_entries: "%{entry_name} <b>%{first} - %{last}</b> sur <b>%{total}</b> au total"
|
6
|
+
one_page:
|
7
|
+
display_entries:
|
8
|
+
one: "<b>%{count}</b> %{entry_name}"
|
9
|
+
other: "<b>tous les %{count}</b> %{entry_name}"
|
10
|
+
views:
|
11
|
+
pagination:
|
12
|
+
first: "« Premier"
|
13
|
+
last: Dernier »
|
14
|
+
next: Suivant ›
|
15
|
+
previous: "‹ Précédent"
|
16
|
+
truncate: "…"
|
data/locales/it.yml
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
it:
|
2
|
+
helpers:
|
3
|
+
page_entries_info:
|
4
|
+
more_pages:
|
5
|
+
display_entries: "%{entry_name} <b>%{first} - %{last}</b> di <b>%{total}</b> totali"
|
6
|
+
one_page:
|
7
|
+
display_entries:
|
8
|
+
one: "<b>%{count}</b> %{entry_name}"
|
9
|
+
other: "<b>Tutti %{count}</b> %{entry_name}"
|
10
|
+
views:
|
11
|
+
pagination:
|
12
|
+
first: "« Inizio"
|
13
|
+
last: Fine »
|
14
|
+
next: Succ. ›
|
15
|
+
previous: "‹ Prec."
|
16
|
+
truncate: "…"
|
data/locales/ja.yml
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
ja:
|
2
|
+
helpers:
|
3
|
+
page_entries_info:
|
4
|
+
more_pages:
|
5
|
+
display_entries: "<b>%{total}</b>中の%{entry_name}を表示しています <b>%{first} - %{last}</b>"
|
6
|
+
one_page:
|
7
|
+
display_entries: "<b>%{count}</b>レコード表示中です %{entry_name}"
|
8
|
+
views:
|
9
|
+
pagination:
|
10
|
+
first: "« 最初"
|
11
|
+
last: "最後 »"
|
12
|
+
next: "次 ›"
|
13
|
+
previous: "‹ 前"
|
14
|
+
truncate: "…"
|
data/locales/ko.yml
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
ko:
|
2
|
+
helpers:
|
3
|
+
page_entries_info:
|
4
|
+
more_pages:
|
5
|
+
display_entries: "<b>%{total}</b>중의 %{entry_name}를(을) 표시하고 있습니다 <b>%{first} - %{last}</b>"
|
6
|
+
one_page:
|
7
|
+
display_entries: "<b>%{count}</b> 레코드 표시 중입니다 %{entry_name}"
|
8
|
+
views:
|
9
|
+
pagination:
|
10
|
+
first: "« 처음"
|
11
|
+
last: "마지막 »"
|
12
|
+
next: "다음 ›"
|
13
|
+
previous: "‹ 이전"
|
14
|
+
truncate: "…"
|
data/locales/pl.yml
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
pl:
|
2
|
+
helpers:
|
3
|
+
page_entries_info:
|
4
|
+
more_pages:
|
5
|
+
display_entries: Wyświetla %{entry_name} <b>%{first} - %{last}</b> z <b>%{total}</b> łącznie
|
6
|
+
one_page:
|
7
|
+
display_entries:
|
8
|
+
few: Wyświetla <b>wszystkie %{count}</b> %{entry_name}
|
9
|
+
one: Wyświetla <b>%{count}</b> %{entry_name}
|
10
|
+
other: Wyświetla <b>wszystkie %{count}</b> %{entry_name}
|
11
|
+
zero: Nie znaleziono %{entry_name}
|
12
|
+
views:
|
13
|
+
pagination:
|
14
|
+
first: "« Pierwsza"
|
15
|
+
last: Ostatnia »
|
16
|
+
next: Dalej ›
|
17
|
+
previous: "‹ Wstecz"
|
18
|
+
truncate: "…"
|
data/locales/pt-BR.yml
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
pt-BR:
|
2
|
+
helpers:
|
3
|
+
page_entries_info:
|
4
|
+
more_pages:
|
5
|
+
display_entries: Exibindo %{entry_name} <b>%{first} - %{last}</b> de um total de <b>%{total}</b>
|
6
|
+
one_page:
|
7
|
+
display_entries:
|
8
|
+
one: Exibindo <b>1</b> %{entry_name}
|
9
|
+
other: Exibindo <b>%{count}</b> %{entry_name}
|
10
|
+
zero: Nenhum %{entry_name} encontrado
|
11
|
+
views:
|
12
|
+
pagination:
|
13
|
+
first: "« Primeiro"
|
14
|
+
last: "Último »"
|
15
|
+
next: Próximo ›
|
16
|
+
previous: "‹ Anterior"
|
17
|
+
truncate: "…"
|
data/locales/ru.yml
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
ru:
|
2
|
+
helpers:
|
3
|
+
page_entries_info:
|
4
|
+
more_pages:
|
5
|
+
display_entries: "Показана %{entry_name} <b>%{first} - %{last}</b> из <b>%{total}</b>"
|
6
|
+
one_page:
|
7
|
+
display_entries:
|
8
|
+
few: "Показаны <b>%{count}</b> %{entry_name}"
|
9
|
+
many: '"Показаны <b>%{count}</b> %{entry_name}"'
|
10
|
+
one: "Показано <b>%{count}</b> %{entry_name}"
|
11
|
+
other: Показаны <b>все %{count}</b> %{entry_name}"
|
12
|
+
views:
|
13
|
+
pagination:
|
14
|
+
first: "« Первая"
|
15
|
+
last: "Последняя »"
|
16
|
+
next: "Следующая ›"
|
17
|
+
previous: "‹ Предыдущая"
|
18
|
+
truncate: "…"
|
data/locales/sk.yml
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
sk:
|
2
|
+
helpers:
|
3
|
+
page_entries_info:
|
4
|
+
more_pages:
|
5
|
+
display_entries: Zobrazujem %{entry_name} <b>%{first} - %{last}</b> z celkovo <b>%{total}</b>
|
6
|
+
one_page:
|
7
|
+
display_entries:
|
8
|
+
few: Zobrazujem <b>%{count}</b> %{entry_name}
|
9
|
+
one: Zobrazujem <b>%{count}</b> %{entry_name}
|
10
|
+
other: Zobrazujem <b>%{count}</b> %{entry_name}
|
11
|
+
views:
|
12
|
+
pagination:
|
13
|
+
first: "« Prvá"
|
14
|
+
last: Posledná »
|
15
|
+
next: "Ďalej ›"
|
16
|
+
previous: "‹ Späť"
|
17
|
+
truncate: "…"
|
data/locales/zh.yml
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
zh:
|
2
|
+
helpers:
|
3
|
+
page_entries_info:
|
4
|
+
more_pages:
|
5
|
+
display_entries: "显示 %{entry_name} <b>%{first} - %{last}</b> 共<b>%{total}</b> 页"
|
6
|
+
one_page:
|
7
|
+
display_entries: "显示 <b>所有 %{count}</b> %{entry_name}"
|
8
|
+
views:
|
9
|
+
pagination:
|
10
|
+
first: "« 第一页"
|
11
|
+
last: "最后一页 »"
|
12
|
+
next: "下一页 ›"
|
13
|
+
previous: "‹ 上一页"
|
14
|
+
truncate: "…"
|
@@ -0,0 +1,8 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
|
2
|
+
|
3
|
+
Dir.glob('locales/*.yml').each do |locale_file|
|
4
|
+
describe "a kaminari-i18n #{locale_file} locale file" do
|
5
|
+
it_behaves_like 'a valid locale file', locale_file
|
6
|
+
it { locale_file.should be_a_subset_of 'locales/en.yml' }
|
7
|
+
end
|
8
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
2
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
3
|
+
require 'rspec'
|
4
|
+
require 'i18n-spec'
|
5
|
+
require 'kaminari-i18n'
|
6
|
+
|
7
|
+
# Requires supporting files with custom matchers and macros, etc,
|
8
|
+
# in ./support/ and its subdirectories.
|
9
|
+
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
|
10
|
+
|
11
|
+
RSpec.configure do |config|
|
12
|
+
|
13
|
+
end
|
metadata
CHANGED
@@ -1,108 +1,170 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kaminari-i18n
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.2.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
|
-
-
|
7
|
+
- Christopher Dell
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2014-07-30 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: rails
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - ">="
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '0'
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: kaminari
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
28
39
|
- !ruby/object:Gem::Version
|
29
40
|
version: '0'
|
30
41
|
- !ruby/object:Gem::Dependency
|
31
42
|
name: bundler
|
32
43
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
44
|
requirements:
|
35
|
-
- -
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.6'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.6'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '3.0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '3.0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: i18n-spec
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
36
88
|
- !ruby/object:Gem::Version
|
37
89
|
version: '0'
|
38
90
|
type: :development
|
39
91
|
prerelease: false
|
40
92
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
93
|
requirements:
|
43
|
-
- -
|
94
|
+
- - ">="
|
44
95
|
- !ruby/object:Gem::Version
|
45
96
|
version: '0'
|
46
97
|
- !ruby/object:Gem::Dependency
|
47
|
-
name:
|
98
|
+
name: localeapp
|
48
99
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
100
|
requirements:
|
51
|
-
- -
|
101
|
+
- - ">="
|
52
102
|
- !ruby/object:Gem::Version
|
53
103
|
version: '0'
|
54
104
|
type: :development
|
55
105
|
prerelease: false
|
56
106
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
107
|
requirements:
|
59
|
-
- -
|
108
|
+
- - ">="
|
60
109
|
- !ruby/object:Gem::Version
|
61
110
|
version: '0'
|
62
|
-
description:
|
63
|
-
email:
|
111
|
+
description: Translations for the kaminari gem
|
112
|
+
email:
|
113
|
+
- chris@tigrish.com
|
64
114
|
executables: []
|
65
115
|
extensions: []
|
66
|
-
extra_rdoc_files:
|
67
|
-
- LICENSE.txt
|
68
|
-
- README.md
|
116
|
+
extra_rdoc_files: []
|
69
117
|
files:
|
70
|
-
- .
|
118
|
+
- ".gitignore"
|
119
|
+
- ".rspec"
|
71
120
|
- Gemfile
|
72
|
-
- Gemfile.lock
|
73
121
|
- LICENSE.txt
|
74
122
|
- README.md
|
75
123
|
- Rakefile
|
76
|
-
- VERSION
|
77
124
|
- kaminari-i18n.gemspec
|
78
|
-
- lib/generators/kaminari/locale_generator.rb
|
79
125
|
- lib/kaminari-i18n.rb
|
80
|
-
|
126
|
+
- lib/kaminari-i18n/railtie.rb
|
127
|
+
- lib/kaminari-i18n/version.rb
|
128
|
+
- locales/az.yml
|
129
|
+
- locales/de.yml
|
130
|
+
- locales/en.yml
|
131
|
+
- locales/es.yml
|
132
|
+
- locales/fi.yml
|
133
|
+
- locales/fr.yml
|
134
|
+
- locales/it.yml
|
135
|
+
- locales/ja.yml
|
136
|
+
- locales/ko.yml
|
137
|
+
- locales/pl.yml
|
138
|
+
- locales/pt-BR.yml
|
139
|
+
- locales/ru.yml
|
140
|
+
- locales/sk.yml
|
141
|
+
- locales/zh.yml
|
142
|
+
- spec/kaminari-i18n_spec.rb
|
143
|
+
- spec/spec_helper.rb
|
144
|
+
homepage: ''
|
81
145
|
licenses:
|
82
146
|
- MIT
|
147
|
+
metadata: {}
|
83
148
|
post_install_message:
|
84
149
|
rdoc_options: []
|
85
150
|
require_paths:
|
86
151
|
- lib
|
87
152
|
required_ruby_version: !ruby/object:Gem::Requirement
|
88
|
-
none: false
|
89
153
|
requirements:
|
90
|
-
- -
|
154
|
+
- - ">="
|
91
155
|
- !ruby/object:Gem::Version
|
92
156
|
version: '0'
|
93
|
-
segments:
|
94
|
-
- 0
|
95
|
-
hash: -2557809157026959631
|
96
157
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
97
|
-
none: false
|
98
158
|
requirements:
|
99
|
-
- -
|
159
|
+
- - ">="
|
100
160
|
- !ruby/object:Gem::Version
|
101
161
|
version: '0'
|
102
162
|
requirements: []
|
103
163
|
rubyforge_project:
|
104
|
-
rubygems_version:
|
164
|
+
rubygems_version: 2.2.2
|
105
165
|
signing_key:
|
106
|
-
specification_version:
|
107
|
-
summary:
|
108
|
-
test_files:
|
166
|
+
specification_version: 4
|
167
|
+
summary: Translations for the kaminari gem
|
168
|
+
test_files:
|
169
|
+
- spec/kaminari-i18n_spec.rb
|
170
|
+
- spec/spec_helper.rb
|
data/.document
DELETED
data/Gemfile.lock
DELETED
@@ -1,93 +0,0 @@
|
|
1
|
-
GEM
|
2
|
-
remote: http://rubygems.org/
|
3
|
-
specs:
|
4
|
-
actionmailer (3.2.7)
|
5
|
-
actionpack (= 3.2.7)
|
6
|
-
mail (~> 2.4.4)
|
7
|
-
actionpack (3.2.7)
|
8
|
-
activemodel (= 3.2.7)
|
9
|
-
activesupport (= 3.2.7)
|
10
|
-
builder (~> 3.0.0)
|
11
|
-
erubis (~> 2.7.0)
|
12
|
-
journey (~> 1.0.4)
|
13
|
-
rack (~> 1.4.0)
|
14
|
-
rack-cache (~> 1.2)
|
15
|
-
rack-test (~> 0.6.1)
|
16
|
-
sprockets (~> 2.1.3)
|
17
|
-
activemodel (3.2.7)
|
18
|
-
activesupport (= 3.2.7)
|
19
|
-
builder (~> 3.0.0)
|
20
|
-
activerecord (3.2.7)
|
21
|
-
activemodel (= 3.2.7)
|
22
|
-
activesupport (= 3.2.7)
|
23
|
-
arel (~> 3.0.2)
|
24
|
-
tzinfo (~> 0.3.29)
|
25
|
-
activeresource (3.2.7)
|
26
|
-
activemodel (= 3.2.7)
|
27
|
-
activesupport (= 3.2.7)
|
28
|
-
activesupport (3.2.7)
|
29
|
-
i18n (~> 0.6)
|
30
|
-
multi_json (~> 1.0)
|
31
|
-
arel (3.0.2)
|
32
|
-
builder (3.0.0)
|
33
|
-
erubis (2.7.0)
|
34
|
-
git (1.2.5)
|
35
|
-
hike (1.2.1)
|
36
|
-
i18n (0.6.0)
|
37
|
-
jeweler (1.8.4)
|
38
|
-
bundler (~> 1.0)
|
39
|
-
git (>= 1.2.5)
|
40
|
-
rake
|
41
|
-
rdoc
|
42
|
-
journey (1.0.4)
|
43
|
-
json (1.7.4)
|
44
|
-
mail (2.4.4)
|
45
|
-
i18n (>= 0.4.0)
|
46
|
-
mime-types (~> 1.16)
|
47
|
-
treetop (~> 1.4.8)
|
48
|
-
mime-types (1.19)
|
49
|
-
multi_json (1.3.6)
|
50
|
-
polyglot (0.3.3)
|
51
|
-
rack (1.4.1)
|
52
|
-
rack-cache (1.2)
|
53
|
-
rack (>= 0.4)
|
54
|
-
rack-ssl (1.3.2)
|
55
|
-
rack
|
56
|
-
rack-test (0.6.1)
|
57
|
-
rack (>= 1.0)
|
58
|
-
rails (3.2.7)
|
59
|
-
actionmailer (= 3.2.7)
|
60
|
-
actionpack (= 3.2.7)
|
61
|
-
activerecord (= 3.2.7)
|
62
|
-
activeresource (= 3.2.7)
|
63
|
-
activesupport (= 3.2.7)
|
64
|
-
bundler (~> 1.0)
|
65
|
-
railties (= 3.2.7)
|
66
|
-
railties (3.2.7)
|
67
|
-
actionpack (= 3.2.7)
|
68
|
-
activesupport (= 3.2.7)
|
69
|
-
rack-ssl (~> 1.3.2)
|
70
|
-
rake (>= 0.8.7)
|
71
|
-
rdoc (~> 3.4)
|
72
|
-
thor (>= 0.14.6, < 2.0)
|
73
|
-
rake (0.9.2.2)
|
74
|
-
rdoc (3.12)
|
75
|
-
json (~> 1.4)
|
76
|
-
sprockets (2.1.3)
|
77
|
-
hike (~> 1.2)
|
78
|
-
rack (~> 1.0)
|
79
|
-
tilt (~> 1.1, != 1.3.0)
|
80
|
-
thor (0.15.4)
|
81
|
-
tilt (1.3.3)
|
82
|
-
treetop (1.4.10)
|
83
|
-
polyglot
|
84
|
-
polyglot (>= 0.3.1)
|
85
|
-
tzinfo (0.3.33)
|
86
|
-
|
87
|
-
PLATFORMS
|
88
|
-
ruby
|
89
|
-
|
90
|
-
DEPENDENCIES
|
91
|
-
bundler
|
92
|
-
jeweler
|
93
|
-
rails
|
data/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
0.1.3
|
@@ -1,22 +0,0 @@
|
|
1
|
-
module Kaminari
|
2
|
-
class LocaleGenerator < Rails::Generators::NamedBase
|
3
|
-
|
4
|
-
def install
|
5
|
-
create_file "config/locales/kaminari.#{name}.yml" do
|
6
|
-
<<-eos
|
7
|
-
#{name}:
|
8
|
-
views:
|
9
|
-
pagination:
|
10
|
-
first: "«"
|
11
|
-
last: "»"
|
12
|
-
previous: "‹"
|
13
|
-
next: "›"
|
14
|
-
truncate: "..."
|
15
|
-
|
16
|
-
eos
|
17
|
-
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
end
|
22
|
-
end
|