neeto-translate-cli 0.2.1 → 0.2.6
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: d922fc3775bd0a0978906c7708d87f471924dfb7dc5c2aae6d2f30b834ab7fb9
|
|
4
|
+
data.tar.gz: 42e12a05f52b40db7696078c8d084bf5b34e5e113461f111879a55d24db1059f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 43f3a5bc321b6573be46fb98c435e755bc5592187e13dca42809f3d2427fdcd642e688dbc1ff0ca7e9d02590277b48099321c9d5a1148169e4863b83b5bbc635
|
|
7
|
+
data.tar.gz: 907191c3f1713826fcb0fde9a87efd923e7a9f7dc483606bdcebec746007749bff248879e5374677034f8744e0d9dc3b9e4f8717ea0a926ae85dd2767e555ebd
|
|
@@ -16,7 +16,7 @@ module NeetoTranslateCli
|
|
|
16
16
|
def process!
|
|
17
17
|
{
|
|
18
18
|
frontend: {
|
|
19
|
-
en:
|
|
19
|
+
en: flatten_hash_with_prefix(frontend_translations[:en]),
|
|
20
20
|
missing_keys: find_missing_keys
|
|
21
21
|
},
|
|
22
22
|
metadata: {
|
|
@@ -74,7 +74,7 @@ module NeetoTranslateCli
|
|
|
74
74
|
lang_keys = File.file?(lang_file_path) ? flatten_hash(load_json(lang_file_path)).keys : []
|
|
75
75
|
|
|
76
76
|
missing_in_file = (base_keys - lang_keys).uniq
|
|
77
|
-
missing_keys[lang].concat(missing_in_file.map { |key| "#{base_file_path}
|
|
77
|
+
missing_keys[lang].concat(missing_in_file.map { |key| "#{base_file_path}::#{key}" })
|
|
78
78
|
end
|
|
79
79
|
end
|
|
80
80
|
|
|
@@ -112,10 +112,10 @@ module NeetoTranslateCli
|
|
|
112
112
|
end
|
|
113
113
|
end
|
|
114
114
|
|
|
115
|
-
def
|
|
115
|
+
def flatten_hash_with_prefix(hash)
|
|
116
116
|
hash.flat_map do |file_key, file_content|
|
|
117
117
|
flatten_hash(file_content).map do |translation_key, translation_value|
|
|
118
|
-
["#{file_key}
|
|
118
|
+
["#{file_key}::#{translation_key}", translation_value]
|
|
119
119
|
end
|
|
120
120
|
end.to_h
|
|
121
121
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: neeto-translate-cli
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Abhay V Ashokan
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-09-
|
|
11
|
+
date: 2025-09-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|