xlocalize 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +5 -5
- data/CHANGELOG.md +4 -0
- data/lib/xlocalize/executor.rb +14 -8
- data/lib/xlocalize/helper.rb +16 -0
- data/lib/xlocalize/version.rb +1 -1
- data/lib/xlocalize/xliff.rb +1 -0
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f18a1267e6b51f35e4ed9744bb3d0fb93aa19350
|
4
|
+
data.tar.gz: d5761da399cbc9057322506902fb6aabe797de8b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e7239c52d390a97c8dd1b0e9ff0e9943e05a059e7186919b399a6a50aadcb15d3b4272470ad8114d006ce76869ab0e0d85a9bebacaf294771e6b526305188114
|
7
|
+
data.tar.gz: ce3ca40f1c3285255afb7c397994fe47fa69eab9dab68752f3e2cb0509d48fe26a81e15a39916ad8e3550eaf1e398ed4d239f8c659d8e9b9d399913f44b1b4c5
|
data/.travis.yml
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
language: ruby
|
2
2
|
cache: bundler
|
3
|
-
rvm: 2.
|
4
|
-
|
3
|
+
rvm: 2.2
|
4
|
+
matrix:
|
5
|
+
include:
|
6
|
+
- {os: osx, osx_image: xcode8.3}
|
7
|
+
- {os: osx, osx_image: xcode9.2}
|
5
8
|
git:
|
6
9
|
depth: 1
|
7
|
-
before_install: gem install bundler
|
8
|
-
install: bundle install
|
9
10
|
script: bundle exec rspec -f d -c
|
10
|
-
os: osx
|
11
11
|
addons:
|
12
12
|
code_climate:
|
13
13
|
repo_token: b4206ed2b9443314c998e8909dfa31f0ed476ea5ab460b98e102cd20508ff564
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,4 @@
|
|
1
|
+
## [v0.3.1](https://github.com/viktorasl/xlocalize/releases/tag/0.3.1)
|
2
|
+
|
3
|
+
* [7eb4563](https://github.com/viktorasl/xlocalize/commit/7eb4563456932b72fab0b3579a9d9ed1d5b97f0c) Fixes plurals export on Xcode9 and later
|
4
|
+
* [758ef1e](https://github.com/viktorasl/xlocalize/commit/758ef1eae39ec5cc15d58b39eda93cc423f1dfa8) Tests on multiple Xcode versions
|
data/lib/xlocalize/executor.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'xlocalize/webtranslateit'
|
2
2
|
require 'xlocalize/xliff'
|
3
|
+
require 'xlocalize/helper'
|
3
4
|
require 'colorize'
|
4
5
|
require 'nokogiri'
|
5
6
|
require 'yaml'
|
@@ -17,15 +18,20 @@ module Xlocalize
|
|
17
18
|
|
18
19
|
def export_master(wti, project, targets, excl_prefix, master_lang)
|
19
20
|
master_file_name = locale_file_name(master_lang)
|
20
|
-
|
21
|
-
# hacky way to finish xcodebuild -exportLocalizations script, because
|
22
|
-
# since Xcode7.3 & OS X Sierra script hangs even though it produces
|
23
|
-
# xliff output
|
24
|
-
# http://www.openradar.me/25857436
|
21
|
+
|
25
22
|
File.delete(master_file_name) if File.exist?(master_file_name)
|
26
|
-
|
27
|
-
|
28
|
-
|
23
|
+
|
24
|
+
if Helper.xcode_at_least?(9)
|
25
|
+
system "xcodebuild -exportLocalizations -localizationPath ./ -project #{project}"
|
26
|
+
else
|
27
|
+
# hacky way to finish xcodebuild -exportLocalizations script, because
|
28
|
+
# since Xcode7.3 & OS X Sierra script hangs even though it produces
|
29
|
+
# xliff output
|
30
|
+
# http://www.openradar.me/25857436
|
31
|
+
system "xcodebuild -exportLocalizations -localizationPath ./ -project #{project} & sleep 0"
|
32
|
+
while !File.exist?(master_file_name) do
|
33
|
+
sleep(1)
|
34
|
+
end
|
29
35
|
end
|
30
36
|
|
31
37
|
purelyze(master_lang, targets, excl_prefix, project)
|
@@ -0,0 +1,16 @@
|
|
1
|
+
|
2
|
+
module Xlocalize
|
3
|
+
|
4
|
+
class Helper
|
5
|
+
|
6
|
+
def self.xcode_version
|
7
|
+
output = `xcodebuild -version`
|
8
|
+
output.split("\n").first.split(' ')[1]
|
9
|
+
end
|
10
|
+
|
11
|
+
def self.xcode_at_least?(version)
|
12
|
+
v = xcode_version
|
13
|
+
Gem::Version.new(v) >= Gem::Version.new(version)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data/lib/xlocalize/version.rb
CHANGED
data/lib/xlocalize/xliff.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xlocalize
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Viktoras Laukevičius
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-02-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -148,6 +148,7 @@ extra_rdoc_files: []
|
|
148
148
|
files:
|
149
149
|
- ".gitignore"
|
150
150
|
- ".travis.yml"
|
151
|
+
- CHANGELOG.md
|
151
152
|
- CODE_OF_CONDUCT.md
|
152
153
|
- Gemfile
|
153
154
|
- LICENSE.txt
|
@@ -158,6 +159,7 @@ files:
|
|
158
159
|
- bin/xlocalize
|
159
160
|
- lib/xlocalize.rb
|
160
161
|
- lib/xlocalize/executor.rb
|
162
|
+
- lib/xlocalize/helper.rb
|
161
163
|
- lib/xlocalize/version.rb
|
162
164
|
- lib/xlocalize/webtranslateit.rb
|
163
165
|
- lib/xlocalize/xliff.rb
|
@@ -187,3 +189,4 @@ signing_key:
|
|
187
189
|
specification_version: 4
|
188
190
|
summary: Xcode localizations import/export helper tool
|
189
191
|
test_files: []
|
192
|
+
has_rdoc:
|