ios_polyglot_cli 2.7.1 → 2.7.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/ios_polyglot_cli/api/language.rb +4 -0
- data/lib/ios_polyglot_cli/commands/pull.rb +2 -2
- data/lib/ios_polyglot_cli/serializers/sources/sources_serializer_swift.rb +3 -1
- data/lib/ios_polyglot_cli/serializers/sources/swift_helpers/translation_enum.rb +4 -4
- data/lib/ios_polyglot_cli/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2c3f5f451aad61270e152edb7e0e104ce17bd653874f1e17a69b6ed3b15ffcfd
|
4
|
+
data.tar.gz: ef3a215374315b8b6df0711d58b6d908ee3d85ffbd1f23b4861ba16c648ed04d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e2a1184ca447875f1565ed2f1dde11c8faf1e9462973f89af226b7fe4358a4202f840514f628ce03cccd7fb71d816976b6ef4fb2b2210590ab50bb91f586bd6
|
7
|
+
data.tar.gz: 03aa40f87fbcb2b78c40c6a99e9ced29343eeefcd54ee7ded19ac3976ad860976e1b79aa5d92c0b1fcc3ef93068ab0d6fe295c94c3dfa9da4fa1ae427205b3cc
|
data/Gemfile.lock
CHANGED
@@ -104,12 +104,12 @@ module PolyglotIos
|
|
104
104
|
def find_default_language(default_language, languages)
|
105
105
|
#find default language
|
106
106
|
prompt.say("Find default_language with id: = #{default_language}")
|
107
|
-
language = languages.find { |language| language[:id] == default_language }
|
107
|
+
language = languages.find { |language| language[:id].to_i == default_language }
|
108
108
|
if language.nil?
|
109
109
|
prompt.say('Default language not found using first language')
|
110
110
|
# use first language
|
111
111
|
language = languages[0]
|
112
|
-
prompt.say(
|
112
|
+
prompt.say("Using first language #{language[:id]}")
|
113
113
|
else
|
114
114
|
prompt.say('Using default language')
|
115
115
|
end
|
@@ -61,7 +61,9 @@ TEMPLATE
|
|
61
61
|
next if key_name.nil?
|
62
62
|
components = key_name.split(".")
|
63
63
|
translation = @translations[key_name]
|
64
|
-
|
64
|
+
if components && key_name && translation
|
65
|
+
root_enum.insert(components, key_name, translation)
|
66
|
+
end
|
65
67
|
end
|
66
68
|
|
67
69
|
return root_enum
|
@@ -17,7 +17,7 @@ module PolyglotIos
|
|
17
17
|
|
18
18
|
def insert(components, key_name, translation)
|
19
19
|
if components.count > 1
|
20
|
-
insert_to_nested_enum(components, key_name)
|
20
|
+
insert_to_nested_enum(components, key_name, translation)
|
21
21
|
elsif components.count == 1
|
22
22
|
translation_case = TranslationCase.new(components.first, key_name, translation)
|
23
23
|
translations.push(translation_case)
|
@@ -61,17 +61,17 @@ module PolyglotIos
|
|
61
61
|
|
62
62
|
private
|
63
63
|
|
64
|
-
def insert_to_nested_enum(components, key_name)
|
64
|
+
def insert_to_nested_enum(components, key_name, translation)
|
65
65
|
_components = components.clone
|
66
66
|
|
67
67
|
enum_name = _components.shift
|
68
68
|
nested_enum = nested_enum_with_name(enum_name)
|
69
69
|
|
70
70
|
if !nested_enum.nil?
|
71
|
-
nested_enum.insert(_components, key_name)
|
71
|
+
nested_enum.insert(_components, key_name, translation)
|
72
72
|
else
|
73
73
|
child = TranslationEnum.new(enum_name)
|
74
|
-
child.insert(_components, key_name)
|
74
|
+
child.insert(_components, key_name, translation)
|
75
75
|
@child_enums.push(child)
|
76
76
|
end
|
77
77
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ios_polyglot_cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.7.
|
4
|
+
version: 2.7.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Filip Gulan
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|