merge_strings 0.0.3 → 0.0.5

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/merge_strings.rb +4 -4
  3. metadata +6 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0cd6490e36c3e496af23934de7cee63c56531d70
4
- data.tar.gz: 0aac4d368e993f1a99f9164e7da1677196aaad52
3
+ metadata.gz: 6305a2bf1fd2660ba4af75cdd0442a707f5ddb8d
4
+ data.tar.gz: d4c20ae16bf5fd7459b12c38d5f17af0c413cd00
5
5
  SHA512:
6
- metadata.gz: 2e22e664b6ffb6140f6549e06935088a3158e52c79a6aa6f43b46f149a01a77796dddf370f7b4310c5254577d759cceef7194037bf7691c3ed86955d9b8d5326
7
- data.tar.gz: dbd0fd37a0cf690b975297fad9c6555de1cf4dbe06430012038ed55f28e3215f0d7db014e29edef82cd8a71f34e5929c83df1f8c908e750c9f21261358a2c53b
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($3)
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($3)
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.3
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: 2013-10-21 00:00:00.000000000 Z
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.0.3
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: