fast_gettext 1.6.0 → 1.7.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 +5 -5
- data/Readme.md +4 -0
- data/lib/fast_gettext/translation_repository/yaml.rb +6 -2
- data/lib/fast_gettext/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: c9a6fd429b84982391cfe86946711c30917ebe18f16ab3ddc46451c6be82bebf
|
|
4
|
+
data.tar.gz: 2bfe28224366ece306f0f1e59c7f3110b5ad32543c44936a48821d958e04d0f3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
-
|
|
43
|
-
|
|
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
|
|
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.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:
|
|
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.
|
|
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
|