fast_gettext 1.6.0 → 1.7.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 902a77bc80c4d7a349d121874e157d902d8927a1
4
- data.tar.gz: 57e2ab68b62cb0abaa8657332b381306df515aea
2
+ SHA256:
3
+ metadata.gz: c9a6fd429b84982391cfe86946711c30917ebe18f16ab3ddc46451c6be82bebf
4
+ data.tar.gz: 2bfe28224366ece306f0f1e59c7f3110b5ad32543c44936a48821d958e04d0f3
5
5
  SHA512:
6
- metadata.gz: c584454d8a8802e63c02f1d28d7ae4168f1f78335f9c052a077926c5f4828c70ff906df6f0fffd7603965fca9964a5c5fc82df462fd293ed78ee0b5be09cf952
7
- data.tar.gz: 71f4ec7049fdfa4c0b98ffe4344ca5d929529ff580001ea816210ba0329ebe1c11dab179962c2f9cabf683425bd03d304af7327033a41e6262cf8530a49e04f4
6
+ metadata.gz: 04cec4fcfe53564b22bd7ae6a033b22e10748f5b2bf62adf9ca0f0b47def05639ddbec58436de080c04b5438a09fe5767718396f01c54543b014d72636c67aba
7
+ data.tar.gz: d08d5673cec61679b142147449d95374788925ef60e608e1bb89dcfce3f665ab8ffe9fe5e3d5771cba3b064ec18ae5997af98c7a4c25df303f364e79f85db214
data/Readme.md CHANGED
@@ -67,6 +67,8 @@ FastGettext.add_text_domain('my_app', path: 'locale', type: :po)
67
67
  Or yaml files (use I18n syntax/indentation)
68
68
 
69
69
  ```Ruby
70
+ # A single locale can be segmented in multiple yaml files but they all should be
71
+ # named with a `qq.yml` suffix, where `qq` is the locale name.
70
72
  FastGettext.add_text_domain('my_app', path: 'config/locales', type: :yaml)
71
73
  ```
72
74
 
@@ -323,6 +325,8 @@ Mo/Po-file parsing from Masao Mutoh, see vendor/README
323
325
  - [Dominic Cleal](https://github.com/domcleal)
324
326
  - [Tomas Strachota](https://github.com/tstrachota)
325
327
  - [Martin Meier](https://github.com/mameier)
328
+ - [morcoteg](https://github.com/morcoteg)
329
+ - [Daniel Schepers](https://github.com/tall-dan)
326
330
 
327
331
  [Michael Grosser](http://grosser.it)<br/>
328
332
  michael@grosser.it<br/>
@@ -39,8 +39,12 @@ module FastGettext
39
39
  @files = {}
40
40
  path = options[:path] || 'config/locales'
41
41
  Dir["#{path}/*.yml"].each do |yaml_file|
42
- locale = File.basename(yaml_file, '.yml')
43
- @files[locale] = load_yaml(yaml_file, locale)
42
+ # Only take into account the last dot separeted part of the file name,
43
+ # excluding the extension file name
44
+ # that is, we suppose it to be named `qq.yml` or `foo.qq.yml` where
45
+ # `qq` stands for a locale name
46
+ locale = File.basename(yaml_file, '.yml').split('.').last
47
+ (@files[locale] ||= {}).merge! load_yaml(yaml_file, locale)
44
48
  end
45
49
  end
46
50
 
@@ -1,3 +1,3 @@
1
1
  module FastGettext
2
- VERSION = Version = '1.6.0'
2
+ VERSION = Version = '1.7.0'
3
3
  end
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.6.0
4
+ version: 1.7.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-12-02 00:00:00.000000000 Z
11
+ date: 2018-06-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -161,7 +161,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
161
161
  version: '0'
162
162
  requirements: []
163
163
  rubyforge_project:
164
- rubygems_version: 2.5.1
164
+ rubygems_version: 2.7.6
165
165
  signing_key:
166
166
  specification_version: 4
167
167
  summary: A simple, fast, memory-efficient and threadsafe implementation of GetText