translation 1.24 → 1.26
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 62e2f60b79bd08f6fc2a85ebda36669c059f9014388ba27446a6d04f25ba8533
|
4
|
+
data.tar.gz: 654efcbe79ed6771f99eb2464b0df6b810d6da7a469a77131e26b42199c12225
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d6a24b78b2dcd46883516b35c674262a966312ac60977a6a4130e26d68a91079ea5cf0572387d9ffe9be42de57c1749e1968550382f6d88a48eafe81a2e6b667
|
7
|
+
data.tar.gz: 29c8893a9d189f746063c74358f1e339bc6058b9993f4dfd45e91b0f02b3acf95f26eab3b44cbc22daf0725f91ab3df9ba576be96d15f9f030b8a79b4cc4831f
|
@@ -35,7 +35,9 @@ module TranslationIO
|
|
35
35
|
YamlEntry.from_locale?(key, target_locale) && !YamlEntry.ignored?(key)
|
36
36
|
end
|
37
37
|
|
38
|
-
yaml_data = YAMLConversion.get_yaml_data_from_flat_translations(target_flat_special_translations
|
38
|
+
yaml_data = YAMLConversion.get_yaml_data_from_flat_translations(target_flat_special_translations, **{
|
39
|
+
:force_keep_empty_keys => true # We want to keep empty keys from localization.xx.yml files (sometimes needed for delimiters!)
|
40
|
+
})
|
39
41
|
|
40
42
|
params["yaml_data_#{target_locale}"] = yaml_data
|
41
43
|
|
@@ -35,9 +35,14 @@ module TranslationIO
|
|
35
35
|
end
|
36
36
|
end
|
37
37
|
|
38
|
-
def get_yaml_data_from_flat_translations(flat_translations)
|
39
|
-
|
40
|
-
|
38
|
+
def get_yaml_data_from_flat_translations(flat_translations, force_keep_empty_keys: false)
|
39
|
+
if force_keep_empty_keys
|
40
|
+
remove_empty_keys = false
|
41
|
+
else
|
42
|
+
remove_empty_keys = TranslationIO.config.yaml_remove_empty_keys
|
43
|
+
end
|
44
|
+
|
45
|
+
translations = FlatHash.to_hash(flat_translations, remove_empty_keys)
|
41
46
|
|
42
47
|
if TranslationIO.config.yaml_line_width
|
43
48
|
data = translations.to_yaml(:line_width => TranslationIO.config.yaml_line_width)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: translation
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '1.
|
4
|
+
version: '1.26'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Hoste
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2021-
|
12
|
+
date: 2021-07-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: gettext
|