poeditor-pull 1.0.6 → 1.0.7
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/CHANGELOG +2 -1
- data/bin/poeditor-pull +0 -0
- data/lib/Configuration.rb +5 -1
- data/lib/Core.rb +11 -0
- data/lib/Version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: f119b411e825228e445bf82f10dc89618d852dd7
|
4
|
+
data.tar.gz: db30beee41758a4b77d1c7d370e5bf90191b33d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 148be41e4e961aee83ecfb98d165f0788105673a8301227631553df252ed5c77bc149be46f045d6ea48243b258ff4f95f9e8042c037dbea4c13c0645468b7728
|
7
|
+
data.tar.gz: '0157686d65a35a74e76872fdda899b4576f003b80bc7537ce0ff0c1e2133a199329ce0ebb0c97bc1339470e3d26f589ceaa2b6f421a3b4979d58c88cde1a50da'
|
data/CHANGELOG
CHANGED
@@ -9,4 +9,5 @@ List of changes introduced to source codebase:
|
|
9
9
|
5. Added: formatting paths with target/flavor name based on {TARGET_NAME} as parameter.
|
10
10
|
6. Implemented language-region combination support [Android] and Chinese language coding support
|
11
11
|
7. Implemented additional `path_copy` (next to default `path_replace`) strategy to support having both Base and source-base language `.strings` files project simultaneously [since 1.0.4, iOS specific].
|
12
|
-
8. Change '...' into elipsis symbol '…' to conform with Android Lint.
|
12
|
+
8. Change '...' into elipsis symbol '…' to conform with Android Lint.
|
13
|
+
9. Added: support for BCP-47 tags on Android translations as described here: https://developer.android.com/guide/topics/resources/providing-resources.html#LocaleQualifier.
|
data/bin/poeditor-pull
CHANGED
File without changes
|
data/lib/Configuration.rb
CHANGED
@@ -47,7 +47,11 @@ module POEditor
|
|
47
47
|
@path_replace = path_replace || {}
|
48
48
|
@path_copy = path_copy || {}
|
49
49
|
if @path_replace.any? and @path_copy.any?
|
50
|
-
|
50
|
+
@path_replace.each { |language_key, v|
|
51
|
+
if @path_copy.key?(language_key)
|
52
|
+
raise POEditor::Exception.new "'path_replace' and 'path_copy' are different strategies of one functionality and thus cannot be in use simultaneously for same language."
|
53
|
+
end
|
54
|
+
}
|
51
55
|
end
|
52
56
|
end
|
53
57
|
|
data/lib/Core.rb
CHANGED
@@ -127,10 +127,12 @@ module POEditor
|
|
127
127
|
|
128
128
|
def paths_for_language(language)
|
129
129
|
if @configuration.path_copy[language]
|
130
|
+
language = convert_to_android_bcp_47(@configuration.path_copy[language], language)
|
130
131
|
[@configuration.path_copy[language], @configuration.path.gsub("{LANGUAGE}", language)]
|
131
132
|
elsif @configuration.path_replace[language]
|
132
133
|
[@configuration.path_replace[language]]
|
133
134
|
else
|
135
|
+
language = convert_to_android_bcp_47(@configuration.path, language)
|
134
136
|
[@configuration.path.gsub("{LANGUAGE}", language)]
|
135
137
|
end
|
136
138
|
end
|
@@ -146,5 +148,14 @@ module POEditor
|
|
146
148
|
File.write(path, content)
|
147
149
|
UI.puts " #{"\xe2\x9c\x93".green} Saved at '#{path}'"
|
148
150
|
end
|
151
|
+
|
152
|
+
def convert_to_android_bcp_47(translation_path, language)
|
153
|
+
# added to follow b+ convention of BCP-47 on Android
|
154
|
+
if translation_path.include? "b+"
|
155
|
+
return language.gsub("-", "+")
|
156
|
+
end
|
157
|
+
return language
|
158
|
+
end
|
159
|
+
|
149
160
|
end
|
150
161
|
end
|
data/lib/Version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: poeditor-pull
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Suyeol Jeon
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2019-
|
13
|
+
date: 2019-11-05 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: colorize
|
@@ -62,7 +62,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
62
62
|
- !ruby/object:Gem::Version
|
63
63
|
version: '0'
|
64
64
|
requirements: []
|
65
|
-
|
65
|
+
rubyforge_project:
|
66
|
+
rubygems_version: 2.5.2.3
|
66
67
|
signing_key:
|
67
68
|
specification_version: 4
|
68
69
|
summary: POEditor Pull CLI
|