merge_strings 0.0.3 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/merge_strings.rb +4 -4
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6305a2bf1fd2660ba4af75cdd0442a707f5ddb8d
|
4
|
+
data.tar.gz: d4c20ae16bf5fd7459b12c38d5f17af0c413cd00
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c7c280d525d62d2f7a2f9846a439e5c52a58da688b5977e6198465cca8f772951a02464df3ade5da55898fceb9e7b5ca3fe473ec31d20e4682b41c3df65b16a8
|
7
|
+
data.tar.gz: f74bd3edbe25b06e76e8e69e8d3d7c69128e79165a2e84d035c4f348138c7c7bba504427ff2532736a06e415dea6fab1b971fed8c6c246f491a6c2ba29f52eee
|
data/bin/merge_strings.rb
CHANGED
@@ -30,8 +30,8 @@ translation_required = ARGV[2] || "TRANSLATION REQUIRED"
|
|
30
30
|
# Extract values of other strings
|
31
31
|
other_strings = {} #=> {"key": {val: "...", comments: ["...", "..."]}, ...}
|
32
32
|
File.read(other_strings_path).each_line do |line|
|
33
|
-
if match = line.match(/"([^"]*)"\s*=\s*"([^"]*)"\s*;(.*)$/)
|
34
|
-
key, val, comments = $1, $2, extract_comments($
|
33
|
+
if match = line.match(/"([^"]*)"\s*=\s*"(([^"]|\")*)"\s*;(.*)$/)
|
34
|
+
key, val, comments = $1, $2, extract_comments($4)
|
35
35
|
# puts "#{key} = #{val}"
|
36
36
|
other_strings[key] = {:val => val, :comments => comments}
|
37
37
|
end
|
@@ -39,8 +39,8 @@ end
|
|
39
39
|
# Copy base strings file then replace values with other_strings
|
40
40
|
File.open(other_strings_path, "w+") do |other_strings_file|
|
41
41
|
File.read(base_strings_path).each_line do |line|
|
42
|
-
line.sub!(/"([^"]*)"\s*=\s*"([^"]*)"\s*;(.*)$/) do |m|
|
43
|
-
key, val, comments = $1, $2, extract_comments($
|
42
|
+
line.sub!(/"([^"]*)"\s*=\s*"(([^"]|\")*)"\s*;(.*)$/) do |m|
|
43
|
+
key, val, comments = $1, $2, extract_comments($4)
|
44
44
|
#puts "#{key} : #{comments}"
|
45
45
|
if other = other_strings[key]
|
46
46
|
key_value_line(key, other[:val], comments | other[:comments])
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: merge_strings
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hiroshi Saito
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-09-08 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A scirpt to help maintaining Localizable.strings.
|
14
14
|
email: hiroshi3110@gmail.com
|
@@ -28,18 +28,19 @@ require_paths:
|
|
28
28
|
- lib
|
29
29
|
required_ruby_version: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
35
35
|
requirements:
|
36
|
-
- -
|
36
|
+
- - ">="
|
37
37
|
- !ruby/object:Gem::Version
|
38
38
|
version: '0'
|
39
39
|
requirements: []
|
40
40
|
rubyforge_project:
|
41
|
-
rubygems_version: 2.
|
41
|
+
rubygems_version: 2.2.2
|
42
42
|
signing_key:
|
43
43
|
specification_version: 4
|
44
44
|
summary: merge_strings.rb en.lproj/Localizable.strings ja.lproj/Localizable.strings
|
45
45
|
test_files: []
|
46
|
+
has_rdoc:
|