translation 1.39 → 1.40
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: e7ff12437624a9fc88ae0afe4581c25c51d816357036a917af5f5f662ab596ed
|
4
|
+
data.tar.gz: ed5a5ccfa234ba638d2b3affe2c33650d821402ec8c9876f8d6d7d70f23767fc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba3cd367d5d1d67210974ebfc3cbf79934308cbff6610e5c4afe110eba5e48cef17d9aed4a172dad370f4abd37580948f3b50e4450c3c104a7e182372402f724
|
7
|
+
data.tar.gz: 8ca2c66f2faf603eef2cff49ea6385941c57e47be5566209aeef5216c9fbf154382d3cc8e33ac54fa11dceff23cfbf37d177d8039881afe5c833529386d81262
|
@@ -20,7 +20,7 @@ module TranslationIO
|
|
20
20
|
TranslationIO.info file_path, 2, 2
|
21
21
|
file_translations = TranslationIO.yaml_load(File.read(file_path))
|
22
22
|
|
23
|
-
|
23
|
+
if file_translations.present? && file_translations.values.all? { |value| value.present? }
|
24
24
|
all_translations = all_translations.deep_merge(file_translations)
|
25
25
|
end
|
26
26
|
end
|
@@ -16,7 +16,7 @@ module TranslationIO
|
|
16
16
|
TranslationIO.info file_path, 2, 2
|
17
17
|
file_translations = TranslationIO.yaml_load(File.read(file_path))
|
18
18
|
|
19
|
-
|
19
|
+
if file_translations.present? && file_translations.values.all? { |value| value.present? }
|
20
20
|
all_translations = all_translations.deep_merge(file_translations)
|
21
21
|
end
|
22
22
|
end
|
@@ -28,7 +28,7 @@ module TranslationIO
|
|
28
28
|
def get_flat_translations_for_yaml_data(yaml_data)
|
29
29
|
translations = TranslationIO.yaml_load(yaml_data)
|
30
30
|
|
31
|
-
if translations && translations.values.all? { |value| value.present? }
|
31
|
+
if translations.present? && translations.values.all? { |value| value.present? }
|
32
32
|
return FlatHash.to_flat_hash(translations)
|
33
33
|
else # loading an empty file, or file with only the language, returns false
|
34
34
|
return {}
|