i18n-verify 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE.txt +20 -0
- data/README.markdown +95 -0
- metadata +68 -0
data/LICENSE.txt
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2011 fastcatch
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.markdown
ADDED
@@ -0,0 +1,95 @@
|
|
1
|
+
i18n-verify
|
2
|
+
===========
|
3
|
+
|
4
|
+
This is a set of tools that make your life easier if you have lots of translations in a Rails project.
|
5
|
+
|
6
|
+
Installation
|
7
|
+
============
|
8
|
+
|
9
|
+
You normally would want to install this gem as stand-alons (i.e. not throu environment.rb / Gemfile) because it is not to be called from the application but as a command line utility.
|
10
|
+
|
11
|
+
Install it by:
|
12
|
+
|
13
|
+
gem install i18n-verify
|
14
|
+
|
15
|
+
If you do want to include it in your environment.rb or Gemfile just insert the standard line (perhaps in the :development group in Gemfile; and don't forget to run `bundle install`.
|
16
|
+
|
17
|
+
Usage
|
18
|
+
=====
|
19
|
+
|
20
|
+
i18n-verify is a set of rake tasks:
|
21
|
+
|
22
|
+
* `rake i18n:find_key` for finding keys
|
23
|
+
* `rake i18n:is_complete` for checking if translations are complete
|
24
|
+
* `rake i18n:duplicates` for finding keys with more than one translation for any given locale
|
25
|
+
|
26
|
+
All of them will automatically pick up translation files configured for i18n (both yml and rb).
|
27
|
+
|
28
|
+
i18n:find_key
|
29
|
+
-------------
|
30
|
+
|
31
|
+
It looks for keys that match regexp.
|
32
|
+
|
33
|
+
Syntax:
|
34
|
+
|
35
|
+
rake i18n:find_key[regexp,group_by_filename]
|
36
|
+
|
37
|
+
Beware with `regexp`: escape your period ('.') characters. Output format is defined by `group_by_filename`.
|
38
|
+
|
39
|
+
Examples:
|
40
|
+
|
41
|
+
* `rake i18n:find_key[models]`
|
42
|
+
* `rake i18n:find_key[\.models\.attributes,true]`
|
43
|
+
|
44
|
+
i18n:is_complete
|
45
|
+
----------------
|
46
|
+
|
47
|
+
It checks pairs of locales for keys that are defined in one but not in the other.
|
48
|
+
|
49
|
+
Syntax:
|
50
|
+
|
51
|
+
rake i18n:is_complete [locales=<list>]
|
52
|
+
|
53
|
+
`locales` defaults to all and should be a comma separated list with no spaces.
|
54
|
+
|
55
|
+
Examples:
|
56
|
+
|
57
|
+
* `rake i18n:is_complete`
|
58
|
+
* `rake i18n:is_complete locales=en,fr,es`
|
59
|
+
|
60
|
+
i18n:duplicates
|
61
|
+
----------------
|
62
|
+
|
63
|
+
It checks for keys that appear more than once in the translations for any given locale. This is a nasty mistake because you can never be sure which one loads last thus becoming 'the' one in your app.
|
64
|
+
|
65
|
+
rake i18n:duplicates [locales=<list>]
|
66
|
+
|
67
|
+
`locales` defaults to all and should be a comma separated list with no spaces.
|
68
|
+
|
69
|
+
Examples:
|
70
|
+
|
71
|
+
* `rake i18n:duplicates`
|
72
|
+
* `rake i18n:duplicates locales=en`
|
73
|
+
|
74
|
+
To do
|
75
|
+
=====
|
76
|
+
|
77
|
+
* Add spell checking support
|
78
|
+
* Write tests (tests for rake tasks, that is!)
|
79
|
+
* ...
|
80
|
+
|
81
|
+
Contributing to i18n-verify
|
82
|
+
===========================
|
83
|
+
|
84
|
+
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
|
85
|
+
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
|
86
|
+
* Fork the project
|
87
|
+
* Start a feature/bugfix branch
|
88
|
+
* Commit and push until you are happy with your contribution
|
89
|
+
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
90
|
+
* 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.
|
91
|
+
|
92
|
+
Copyright
|
93
|
+
=========
|
94
|
+
|
95
|
+
Copyright (c) 2011 fastcatch. See LICENSE.txt for further details.
|
metadata
ADDED
@@ -0,0 +1,68 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: i18n-verify
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 29
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 1
|
10
|
+
version: 0.0.1
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- fastcatch
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2011-07-11 00:00:00 +02:00
|
19
|
+
default_executable:
|
20
|
+
dependencies: []
|
21
|
+
|
22
|
+
description: It helps you find keys, undefined translations, duplicate keys, and more
|
23
|
+
email: axz10@cwru.edu
|
24
|
+
executables: []
|
25
|
+
|
26
|
+
extensions: []
|
27
|
+
|
28
|
+
extra_rdoc_files: []
|
29
|
+
|
30
|
+
files:
|
31
|
+
- LICENSE.txt
|
32
|
+
- README.markdown
|
33
|
+
has_rdoc: true
|
34
|
+
homepage: http://github.com/fastcatch/i18n-verify
|
35
|
+
licenses:
|
36
|
+
- MIT
|
37
|
+
post_install_message:
|
38
|
+
rdoc_options: []
|
39
|
+
|
40
|
+
require_paths:
|
41
|
+
- lib
|
42
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
43
|
+
none: false
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
hash: 3
|
48
|
+
segments:
|
49
|
+
- 0
|
50
|
+
version: "0"
|
51
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
52
|
+
none: false
|
53
|
+
requirements:
|
54
|
+
- - ">="
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
hash: 3
|
57
|
+
segments:
|
58
|
+
- 0
|
59
|
+
version: "0"
|
60
|
+
requirements: []
|
61
|
+
|
62
|
+
rubyforge_project:
|
63
|
+
rubygems_version: 1.5.2
|
64
|
+
signing_key:
|
65
|
+
specification_version: 3
|
66
|
+
summary: Tools to verify your Ruby on Rails localizations
|
67
|
+
test_files: []
|
68
|
+
|