fast_gettext 1.5.1 → 1.6.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.
- checksums.yaml +4 -4
- data/CHANGELOG +1 -0
- data/lib/fast_gettext/translation_repository/yaml.rb +3 -3
- data/lib/fast_gettext/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 902a77bc80c4d7a349d121874e157d902d8927a1
|
|
4
|
+
data.tar.gz: 57e2ab68b62cb0abaa8657332b381306df515aea
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c584454d8a8802e63c02f1d28d7ae4168f1f78335f9c052a077926c5f4828c70ff906df6f0fffd7603965fca9964a5c5fc82df462fd293ed78ee0b5be09cf952
|
|
7
|
+
data.tar.gz: 71f4ec7049fdfa4c0b98ffe4344ca5d929529ff580001ea816210ba0329ebe1c11dab179962c2f9cabf683425bd03d304af7327033a41e6262cf8530a49e04f4
|
data/CHANGELOG
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
1.6.0 -- Remove restrictions around yaml file names
|
|
1
2
|
1.1.0 -- translations are no longer eager loaded for improved startup performance, pass `eager_load: true` to preload for example in preforked web server
|
|
2
3
|
1.0.0 -- do not enforce attr_accessible unless ProtectedAttributes are loaded
|
|
3
4
|
0.9.0 -- reworked internals of caching to be plugable
|
|
@@ -38,8 +38,8 @@ module FastGettext
|
|
|
38
38
|
def find_and_store_files(options)
|
|
39
39
|
@files = {}
|
|
40
40
|
path = options[:path] || 'config/locales'
|
|
41
|
-
Dir["#{path}
|
|
42
|
-
locale = yaml_file.
|
|
41
|
+
Dir["#{path}/*.yml"].each do |yaml_file|
|
|
42
|
+
locale = File.basename(yaml_file, '.yml')
|
|
43
43
|
@files[locale] = load_yaml(yaml_file, locale)
|
|
44
44
|
end
|
|
45
45
|
end
|
|
@@ -51,7 +51,7 @@ module FastGettext
|
|
|
51
51
|
# Given a yaml file return a hash of key -> translation
|
|
52
52
|
def load_yaml(file, locale)
|
|
53
53
|
yaml = YAML.load_file(file)
|
|
54
|
-
yaml_hash_to_dot_notation(yaml
|
|
54
|
+
yaml_hash_to_dot_notation(yaml.fetch(locale))
|
|
55
55
|
end
|
|
56
56
|
|
|
57
57
|
def yaml_hash_to_dot_notation(yaml_hash)
|
data/lib/fast_gettext/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fast_gettext
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.6.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Michael Grosser
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-
|
|
11
|
+
date: 2017-12-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rake
|