translations_sync 0.2.7 → 0.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/Changelog +9 -0
- data/Rakefile +1 -1
- data/lib/translations_sync.rb +8 -2
- metadata +7 -7
data/Changelog
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
2011-08-19 v.0.3.0
|
2
|
+
* Fix for pluralization key removal
|
3
|
+
|
4
|
+
2011-08-19 v.0.2.9
|
5
|
+
* Versioin update due to the wrong gem push
|
6
|
+
|
7
|
+
2011-08-19 v.0.2.8
|
8
|
+
* Standard I18n Pluralization module is recognized
|
9
|
+
|
1
10
|
2011-05-24 v.0.2.7
|
2
11
|
* Bug with filename prefix fixed
|
3
12
|
|
data/Rakefile
CHANGED
data/lib/translations_sync.rb
CHANGED
@@ -68,9 +68,15 @@ class TranslationsSync
|
|
68
68
|
@list.each do |lang|
|
69
69
|
flatten_keys(lang, translations[lang] || {}, @flat)
|
70
70
|
end
|
71
|
-
|
71
|
+
rules_key = %w[i18n.plural.rule pluralize].detect do |rule|
|
72
|
+
@list.detect do |lang|
|
73
|
+
locale_pluralize = I18n.backend.send(:lookup, lang, rule) and
|
74
|
+
locale_pluralize.respond_to?(:call)
|
75
|
+
end
|
76
|
+
end
|
77
|
+
@flat.delete(rules_key.split('.').map(&:to_sym)) # we do not need this proc if it exists
|
72
78
|
@pluralize_keys = @list.inject({}) do |acc, lang|
|
73
|
-
acc[lang] = if locale_pluralize = I18n.backend.send(:lookup, lang,
|
79
|
+
acc[lang] = if locale_pluralize = I18n.backend.send(:lookup, lang, rules_key) and
|
74
80
|
locale_pluralize.respond_to?(:call)
|
75
81
|
((0..100).map do |n|
|
76
82
|
locale_pluralize.call n
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: translations_sync
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 19
|
5
|
+
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
8
|
+
- 3
|
9
|
+
- 0
|
10
|
+
version: 0.3.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Dmitri Koulikoff
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-08-19 00:00:00 +03:00
|
19
19
|
default_executable: translations_sync
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -81,7 +81,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
81
81
|
requirements: []
|
82
82
|
|
83
83
|
rubyforge_project:
|
84
|
-
rubygems_version: 1.
|
84
|
+
rubygems_version: 1.3.7
|
85
85
|
signing_key:
|
86
86
|
specification_version: 3
|
87
87
|
summary: Synchronizes the different locales represeinted in yaml, in particular, for I18n
|