i18n-inflector 2.2.0 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/.yardopts CHANGED
@@ -4,7 +4,7 @@
4
4
  --no-private
5
5
  --hide-void-return
6
6
  -
7
- docs/RELATIONS
7
+ docs/USAGE
8
8
  docs/EXAMPLES
9
9
  docs/HISTORY
10
10
  ChangeLog
data/ChangeLog CHANGED
@@ -1,3 +1,159 @@
1
+ commit 76c7a61ca6b96e94a4362f31a36d6c79e476be97
2
+ Author: Paweł Wilk <siefca@gnu.org>
3
+ Date: Tue Feb 15 01:20:52 2011 +0100
4
+
5
+ Release 2.3.0
6
+
7
+ commit fe4469dc11a908dc6e0174955a8e37db092da674
8
+ Author: Paweł Wilk <siefca@gnu.org>
9
+ Date: Tue Feb 15 01:18:29 2011 +0100
10
+
11
+ Added missing token name validation checks to the interpolate method
12
+
13
+ commit 41a008ed23a89de0cefcd6cb920d3c496eb57ccb
14
+ Author: Paweł Wilk <siefca@gnu.org>
15
+ Date: Mon Feb 14 23:01:56 2011 +0100
16
+
17
+ Changed arguments passing when Proc objects are passed as inflection options
18
+
19
+ commit d6da97e49497b8c9d8349d0bafa2d0e801382d56
20
+ Author: Paweł Wilk <siefca@gnu.org>
21
+ Date: Mon Feb 14 23:01:04 2011 +0100
22
+
23
+ Documentation updated
24
+
25
+ commit b025fdbf5f210828b0ddec75f75d694442bda640
26
+ Author: Paweł Wilk <siefca@gnu.org>
27
+ Date: Mon Feb 14 17:48:42 2011 +0100
28
+
29
+ Changed wildcard token interpolation according to the principle of least surprise
30
+
31
+ commit ef7c7c6c786f2deb72e8d449cd0a3d36ccc6b7ce
32
+ Author: Paweł Wilk <siefca@gnu.org>
33
+ Date: Mon Feb 14 17:47:17 2011 +0100
34
+
35
+ Arguments to external inflection Methods and Procs are now passed through blocks
36
+
37
+ commit 2cfcc43a7fd7f343aeb563354bbe46e9db919279
38
+ Author: Paweł Wilk <siefca@gnu.org>
39
+ Date: Mon Feb 14 17:44:26 2011 +0100
40
+
41
+ Documentation updated
42
+
43
+ commit d3b667d9691fc86f4fe02c0e8b19281e22197709
44
+ Author: Paweł Wilk <siefca@gnu.org>
45
+ Date: Sun Feb 13 22:22:19 2011 +0100
46
+
47
+ Proc and Method object support improved
48
+
49
+ commit e437ef670a286169f2ebbba31d1ea988c721aabc
50
+ Author: Paweł Wilk <siefca@gnu.org>
51
+ Date: Sun Feb 13 22:21:40 2011 +0100
52
+
53
+ Added wildcard token examples to EXAMPLES
54
+
55
+ commit 13d8e02ab2369e6b345d28158f5209165c722179
56
+ Author: Paweł Wilk <siefca@gnu.org>
57
+ Date: Sun Feb 13 22:21:17 2011 +0100
58
+
59
+ TODO updated
60
+
61
+ commit b755aca6146c010df71e9b79c7faaf3156df559f
62
+ Author: Paweł Wilk <siefca@gnu.org>
63
+ Date: Sun Feb 13 22:20:57 2011 +0100
64
+
65
+ Wildcard token support enabled
66
+
67
+ commit b52b16e4a61ce20b3e2d4599fee5a4b082a3bf24
68
+ Author: Paweł Wilk <siefca@gnu.org>
69
+ Date: Sun Feb 13 22:20:35 2011 +0100
70
+
71
+ Removed usage documentation from long_comments.rb
72
+
73
+ commit 2f222adb9c4368199bb4849190e17afbae1fb482
74
+ Author: Paweł Wilk <siefca@gnu.org>
75
+ Date: Sun Feb 13 22:19:43 2011 +0100
76
+
77
+ Added wildcard token support
78
+
79
+ commit a54bae6164a98d0bee29632c678b17b76720c272
80
+ Author: Paweł Wilk <siefca@gnu.org>
81
+ Date: Sun Feb 13 22:16:55 2011 +0100
82
+
83
+ Documentation: link to USAGE fixed
84
+
85
+ commit e681df415d2d864678b22107236d430ebf6de27d
86
+ Author: Paweł Wilk <siefca@gnu.org>
87
+ Date: Sun Feb 13 22:16:08 2011 +0100
88
+
89
+ Documentation updated
90
+
91
+ commit e459b7471892d1f8dc410a5f89cf706a9b3a3b5e
92
+ Author: Paweł Wilk <siefca@gnu.org>
93
+ Date: Sun Feb 13 22:15:31 2011 +0100
94
+
95
+ docs/RELATIONS removed from static gemspec
96
+
97
+ commit d8c69ce2e097f1364d22a167dfd6849186738e5b
98
+ Author: Paweł Wilk <siefca@gnu.org>
99
+ Date: Sun Feb 13 22:15:04 2011 +0100
100
+
101
+ Gemfile updated
102
+
103
+ commit e679fbdf6c901d335fd27cbd664fa8b9b19b251e
104
+ Author: Paweł Wilk <siefca@gnu.org>
105
+ Date: Sun Feb 13 22:00:17 2011 +0100
106
+
107
+ Documentation about object relations moved to USAGE
108
+
109
+ commit dd4c51acb617595d8d3a7ff2cfa4b631e73f87df
110
+ Author: Paweł Wilk <siefca@gnu.org>
111
+ Date: Sun Feb 13 21:55:23 2011 +0100
112
+
113
+ Manifest.txt regenerated
114
+
115
+ commit 2edaf6479b48ab628c9a52cfc9b443949844e119
116
+ Author: Paweł Wilk <siefca@gnu.org>
117
+ Date: Sun Feb 13 21:55:00 2011 +0100
118
+
119
+ Inflector usage documentation moved to USAGE
120
+
121
+ commit 0e7ef2933baf1abbef13d9516c5f39f8f749bc1e
122
+ Author: Paweł Wilk <siefca@gnu.org>
123
+ Date: Fri Feb 11 13:41:11 2011 +0100
124
+
125
+ Exceptions of Methods and Procs are now ignored unless :inflector_raises is set
126
+
127
+ commit 5556f3ecdc4685f06599ec9b401704194988a3c5
128
+ Author: Paweł Wilk <siefca@gnu.org>
129
+ Date: Fri Feb 11 12:19:48 2011 +0100
130
+
131
+ Variable number of arguments supported in passed method calls
132
+
133
+ commit 9ffde532e9a1f2a0bc7ccb04dfbe884031725469
134
+ Author: Paweł Wilk <siefca@gnu.org>
135
+ Date: Fri Feb 11 04:13:42 2011 +0100
136
+
137
+ HISTORY & TODO updated
138
+
139
+ commit ff4f62bb19962559f08c76bdc1a6a3a1135dc1b4
140
+ Author: Paweł Wilk <siefca@gnu.org>
141
+ Date: Fri Feb 11 04:13:03 2011 +0100
142
+
143
+ Added the ability to pass Proc and Method objects as inflection options, fixed excluded_defaults
144
+
145
+ commit 9f65a7f971c8942ba99795426039b5ec3f0917e8
146
+ Author: Paweł Wilk <siefca@gnu.org>
147
+ Date: Fri Feb 11 04:11:32 2011 +0100
148
+
149
+ Added I18n::Inflector::Config::Markers::STRICT_KIND
150
+
151
+ commit 79809f3644791dc105f2a94c1cb3464f33fa6d53
152
+ Author: Paweł Wilk <siefca@gnu.org>
153
+ Date: Wed Feb 9 21:16:08 2011 +0100
154
+
155
+ Typo fixed in README
156
+
1
157
  commit a60370126b5981255aff1b6de47c98ea3e740c04
2
158
  Author: Paweł Wilk <siefca@gnu.org>
3
159
  Date: Wed Feb 9 18:49:52 2011 +0100
data/Gemfile CHANGED
@@ -9,7 +9,6 @@ gem "test_declarative", ">=0.0.4", :group => [:development, :test]
9
9
  gem "yard", ">=0.6.4", :group => [:development, :test]
10
10
  gem "bundler", ">=1.0.7", :group => [:development, :test]
11
11
  gem "hoe-bundler", ">=1.0.0", :group => [:development, :test]
12
- gem "hoe-yard", ">=0.1.2", :group => [:development, :test]
13
12
  gem "hoe", ">=2.8.0", :group => [:development, :test]
14
13
 
15
14
  # vim: syntax=ruby
data/Manifest.txt CHANGED
@@ -12,8 +12,8 @@ docs/EXAMPLES
12
12
  docs/HISTORY
13
13
  docs/LEGAL
14
14
  docs/LGPL
15
- docs/RELATIONS
16
15
  docs/TODO
16
+ docs/USAGE
17
17
  docs/rdoc.css
18
18
  lib/i18n-inflector.rb
19
19
  lib/i18n-inflector/api.rb
data/README.rdoc CHANGED
@@ -1,6 +1,6 @@
1
1
  = Simple Inflector for I18n
2
2
 
3
- <b>i18n-inflector version <tt>2.2</tt></b> (<b><tt>Dea</tt></b>)
3
+ <b>i18n-inflector version <tt>2.3</tt></b> (<b><tt>Dogma</tt></b>)
4
4
 
5
5
 
6
6
 
@@ -11,11 +11,12 @@
11
11
 
12
12
  == Features
13
13
 
14
- * Inline inflection using patterns.
15
- * Key-based inflection using inflection keys.
14
+ * Inline inflection using patterns in translation data.
15
+ * Key-based inflection using individual inflection keys.
16
16
  * Definable inflection kinds and tokens.
17
17
  * Easy to use public API for inflection data.
18
18
  * Configurable using special scope of translation data.
19
+ * Lazily evaluated Proc and Method objects as inflection options.
19
20
  * Complex patterns support; inflection by more than one kind at a time.
20
21
  * Negative matching, aliases, default tokens, token groups and more…
21
22
 
@@ -47,9 +48,9 @@ Example translation data:
47
48
  f: "female"
48
49
  m: "male"
49
50
  n: "neuter"
50
- male: @m
51
51
  female: @f
52
- default: neuter
52
+ male: @m
53
+ default: n
53
54
 
54
55
 
55
56
  welcome: "Dear @{f:Lady|m:Sir|n:You|All}!"
@@ -120,7 +121,8 @@ you need Rails integration.
120
121
 
121
122
  Detailed example:
122
123
 
123
- ===== YAML:
124
+ *YAML:*
125
+
124
126
  en:
125
127
  i18n:
126
128
  inflections:
@@ -133,7 +135,8 @@ Detailed example:
133
135
 
134
136
  welcome: "Dear @{f:Lady|m:Sir|n:You|All}"
135
137
 
136
- ===== Code:
138
+ *Code:*
139
+
137
140
  I18n.t('welcome')
138
141
  # => "Dear You"
139
142
 
@@ -156,7 +159,7 @@ Detailed example:
156
159
 
157
160
  == More information
158
161
 
159
- * See {I18n::Inflector} module documentation for detailed information about the usage.
162
+ * See {file:USAGE} for detailed information about the usage.
160
163
  * See {I18n::Inflector::API} class documentation for detailed information about the API.
161
164
  * See {I18n::Backend::Inflector} module documentation for detailed information about the internals.
162
165
  * See {whole documentation}[http://rubydoc.info/gems/i18n-inflector/] to browse all documents.
@@ -167,6 +170,16 @@ You can run tests both with
167
170
 
168
171
  * <tt>rake test</tt> or just <tt>rake</tt>
169
172
  * run a test file directly, e.g. <tt>ruby -Ilib -Itest test/inflector_test.rb</tt>
173
+ * run <tt>rake testv4</tt> to test with version 4 of I18n
174
+
175
+ == Common rake tasks
176
+
177
+ * <tt>rake bundler:gemfile</tt> – regenerate the +Gemfile+
178
+ * <tt>rake docs</tt> – render the documentation (output in the subdirectory directory +doc+)
179
+ * <tt>rake gem</tt> – builds package (output in the subdirectory +pkg+)
180
+ * <tt>rake test</tt>, <tt>rake testv4</tt> – performs tests
181
+ * <tt>rake Manifest.txt</tt> – regenerates the +Manifest.txt+ file
182
+ * <tt>rake ChangeLog</tt> – regenerates the +ChangeLog+ file
170
183
 
171
184
  == Credits
172
185
 
@@ -14,7 +14,7 @@ Gem::Specification.new do |s|
14
14
  s.description = I18n::Inflector::DESCRIPTION
15
15
 
16
16
  s.files = Dir.glob("{ci,lib,spec,docs}/**/**") + %w(Gemfile .rspec .yardopts README.rdoc LGPL-LICENSE ChangeLog Manifest.txt)
17
- s.extra_rdoc_files = ["README.rdoc", "docs/RELATIONS", "docs/EXAMPLES", "docs/TODO", "docs/HISTORY", "docs/LEGAL", "docs/LGPL", "docs/COPYING"]
17
+ s.extra_rdoc_files = ["README.rdoc", "docs/USAGE", "docs/EXAMPLES", "docs/TODO", "docs/HISTORY", "docs/LEGAL", "docs/LGPL", "docs/COPYING"]
18
18
  s.rdoc_options = ["--main", "README.rdoc"]
19
19
  s.platform = Gem::Platform::RUBY
20
20
  s.require_path = 'lib'
data/docs/EXAMPLES CHANGED
@@ -231,7 +231,7 @@ prefixes and suffixes of words we're able make our patterns compact.
231
231
  }})
232
232
 
233
233
  I18n.backend.store_translations(:pl,
234
- :msg_receive => "@gender+tense{n+w:Otrzymano|Dosta}{m,f,n+t:jesz|m,f,n+j:niesz|f+w:łaś|m+w:łeś} wiadomość")
234
+ :msg_receive => "@gender+tense{n+w:Otrzymano|Dosta}{*+t:jesz|*+j:niesz|f+w:łaś|m+w:łeś} wiadomość")
235
235
 
236
236
  I18n.locale = :pl
237
237
 
@@ -261,7 +261,7 @@ prefixes and suffixes of words we're able make our patterns compact.
261
261
  The example above may use this YAML content instead of +store_translations+:
262
262
 
263
263
  pl:
264
- msg_receive: "@gender+tense{n+w:Otrzymano|Dosta}{m,f,n+t:jesz|m,f,n+j:niesz|f+w:łaś|m+w:łeś} wiadomość"
264
+ msg_receive: "@gender+tense{n+w:Otrzymano|Dosta}{*+t:jesz|*+j:niesz|f+w:łaś|m+w:łeś} wiadomość"
265
265
 
266
266
  i18n:
267
267
  inflections:
data/docs/HISTORY CHANGED
@@ -1,3 +1,19 @@
1
+ === 2.3.0 / 2011-02-12
2
+
3
+ * major enhancements
4
+
5
+ * Added wildcard tokens support
6
+ * Proc and Method kind of objects might be passed as inflection options
7
+
8
+ * minor enhancements
9
+
10
+ * Added I18n::Inflector::Config::Markers::STRICT_KIND (character used when passing strict kinds)
11
+ * Important documentation moved to the USAGE file
12
+
13
+ * minor bugfixes
14
+
15
+ * Fixed parsing of named patterns when :inflector_excluded_defaults is used
16
+
1
17
  === 2.2.0 / 2011-02-09
2
18
 
3
19
  * major enhancements
data/docs/TODO CHANGED
@@ -2,6 +2,6 @@
2
2
 
3
3
  == Distant future
4
4
 
5
- * add "any token" operator - will make it easier to create complex patterns - (use negative matching to non-existant, reserved value)
6
5
  * split interpolate_core and make it more reusable by raw data (e.g. pattern content)
7
6
  * allow different descriptions for aliases pointing to the same token, e.g.: now: @present ="description"
7
+