locamotion 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a2921c947d31171a96954af1871352674b39f582
4
- data.tar.gz: bfa8f67c27e54e70fe465a48cc997894f252dbc2
3
+ metadata.gz: ca6d7622b87191d10a52142796404965b448bf61
4
+ data.tar.gz: 22d059c61a938c6ed3086e343d090f2f485e2021
5
5
  SHA512:
6
- metadata.gz: c664211a9fffc9f7bfbebe27f31592de0f3dc7f2443c29c62744343188c1417a7f19dc5d9412da6ec266871f8619adce6179f0c185c93783326abc84faa73d51
7
- data.tar.gz: 65d7390b4d6ae4d5b44da190831905b7857fd978ab11c8d1d8d4bef457008282827dae70ee62cd7febdedbc5c3d8201ad5efc25b14483c0ff50c3c348644078d
6
+ metadata.gz: b6b56bbd3ed96e56c8eb885f752b19ea179cbda3ecd18589fa0b15844212dcb069c9f9f0eab1d15366c4045cfa00ad919da5135720f652bab312ccb93d6891f4
7
+ data.tar.gz: 08c5c4e9d6f3d926188c58eed7cde945e4bf81ee8f681738789a912529091f28d57057bd9e829c435b6656ad81513375455384d0b4665c98730a05b39ecbd589
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.3
1
+ 0.0.5
@@ -18,14 +18,14 @@ Feature: Locamotion generate
18
18
  """
19
19
  value = 3
20
20
  string = "I am localized with a value of #{value}."._
21
- item.title = NSString.stringWithFormat("Export All Contents in "%@"…"._, object.name)
21
+ field = NSString.dateTimeFieldWithVariable('filename', label: 'Filename'._)
22
22
  """
23
23
  And a file named "rm-project/resources/en.lproj/Localizable.strings" with:
24
24
  """
25
25
  "I am localized!" = "I am localized!";
26
26
  "I am also localized." = "I am also localized.";
27
27
  "I am localized with a value of #{value}." = "I am localized with a value of #{value}.";
28
- "Export All Contents in "%@"…" = "Export All Contents in "%@"…";
28
+ "Filename" = "Filename";
29
29
  """
30
30
  Given a directory named "rm-project/resources/es.lproj"
31
31
  When I cd to "rm-project"
@@ -43,7 +43,7 @@ Feature: Locamotion generate
43
43
  "I am localized!" = "I am localized!";
44
44
  "I am also localized." = "I am also localized.";
45
45
  "I am localized with a value of #{value}." = "I am localized with a value of #{value}.";
46
- "Export All Contents in "%@"…" = "Export All Contents in "%@"…";
46
+ "Filename" = "Filename";
47
47
  """
48
48
 
49
49
  Scenario: Generate Spanish and German strings
@@ -60,14 +60,14 @@ Feature: Locamotion generate
60
60
  "I am localized!" = "I am localized!";
61
61
  "I am also localized." = "I am also localized.";
62
62
  "I am localized with a value of #{value}." = "I am localized with a value of #{value}.";
63
- "Export All Contents in "%@"…" = "Export All Contents in "%@"…";
63
+ "Filename" = "Filename";
64
64
  """
65
65
  And the file "resources/de.lproj/Localizable.strings" should contain:
66
66
  """
67
67
  "I am localized!" = "I am localized!";
68
68
  "I am also localized." = "I am also localized.";
69
69
  "I am localized with a value of #{value}." = "I am localized with a value of #{value}.";
70
- "Export All Contents in "%@"…" = "Export All Contents in "%@"…";
70
+ "Filename" = "Filename";
71
71
  """
72
72
 
73
73
  Scenario: Generate Spanish and German strings with some taken strings
@@ -91,13 +91,13 @@ Feature: Locamotion generate
91
91
  And the file "resources/es.lproj/Localizable.strings" should contain:
92
92
  """
93
93
  "I am localized with a value of #{value}." = "I am localized with a value of #{value}.";
94
- "Export All Contents in "%@"…" = "Export All Contents in "%@"…";
94
+ "Filename" = "Filename";
95
95
  """
96
96
  And the file "resources/de.lproj/Localizable.strings" should contain:
97
97
  """
98
98
  "I am localized!" = "I am localized!";
99
99
  "I am localized with a value of #{value}." = "I am localized with a value of #{value}.";
100
- "Export All Contents in "%@"…" = "Export All Contents in "%@"…";
100
+ "Filename" = "Filename";
101
101
  """
102
102
 
103
103
  Scenario: Generate Spanish and German strings with all taken strings
@@ -111,14 +111,14 @@ Feature: Locamotion generate
111
111
  "I am localized!" = "Tengo traduccion!";
112
112
  "I am also localized." = "Yo tambien tengo traduccion.";
113
113
  "I am localized with a value of #{value}." = "Tengo traduccion con el valor #{value}.";
114
- "Export All Contents in "%@"…" = "Exportar contenidos de "%@"…";
114
+ "Filename" = "Nombre de archivo";
115
115
  """
116
116
  Given a file named "resources/de.lproj/Localizable.strings" with:
117
117
  """
118
118
  "I am localized!" = "Ich bin übersetzt!";
119
119
  "I am also localized." = "Ich bin auch übersetzt.";
120
120
  "I am localized with a value of #{value}." = "Ich bin mit den wert #{value} übersetzt.";
121
- "Export All Contents in "%@"…" = "Inhalt von "%@" exportieren…";
121
+ "Filename" = "Dateiname";
122
122
  """
123
123
  When I run `locamotion generate`
124
124
  Then the output should contain "No new strings added to resources/de.lproj/Localizable.strings"
@@ -128,14 +128,14 @@ Feature: Locamotion generate
128
128
  "I am localized!" = "Tengo traduccion!";
129
129
  "I am also localized." = "Yo tambien tengo traduccion.";
130
130
  "I am localized with a value of #{value}." = "Tengo traduccion con el valor #{value}.";
131
- "Export All Contents in "%@"…" = "Exportar contenidos de "%@"…";
131
+ "Filename" = "Nombre de archivo";
132
132
  """
133
133
  And the file "resources/de.lproj/Localizable.strings" should contain:
134
134
  """
135
135
  "I am localized!" = "Ich bin übersetzt!";
136
136
  "I am also localized." = "Ich bin auch übersetzt.";
137
137
  "I am localized with a value of #{value}." = "Ich bin mit den wert #{value} übersetzt.";
138
- "Export All Contents in "%@"…" = "Inhalt von "%@" exportieren…";
138
+ "Filename" = "Dateiname";
139
139
  """
140
140
 
141
141
  Scenario: Attempt to run Locamotion where there's no RubyMotion project
@@ -18,7 +18,7 @@ Feature: Locamotion slurp
18
18
  """
19
19
  value = 3
20
20
  string = "I am localized with a value of #{value}."._
21
- item.title = NSString.stringWithFormat("Export All Contents in "%@"…"._, object.name)
21
+ field = NSString.dateTimeFieldWithVariable('filename', label: 'Filename'._)
22
22
  """
23
23
  And a file named "rm-project/app/test3.rb" with:
24
24
  """
@@ -37,7 +37,7 @@ Feature: Locamotion slurp
37
37
  "I am localized!" = "I am localized!";
38
38
  "I am also localized." = "I am also localized.";
39
39
  "I am localized with a value of #{value}." = "I am localized with a value of #{value}.";
40
- "Export All Contents in "%@"…" = "Export All Contents in "%@"…";
40
+ "Filename" = "Filename";
41
41
  "first string" = "first string";
42
42
  "second string" = "second string";
43
43
  "third string" = "third string";
@@ -49,7 +49,7 @@ Feature: Locamotion slurp
49
49
 
50
50
  Given a file named "resources/en.lproj/Localizable.strings" with:
51
51
  """
52
- "Export All Contents in "%@"…" = "Export All Contents in "%@"…";
52
+ "Filename" = "Filename";
53
53
  "I am localized!" = "I am localized!";
54
54
  """
55
55
  When I run `locamotion slurp`
@@ -72,7 +72,7 @@ Feature: Locamotion slurp
72
72
  "I am localized!" = "I am localized!";
73
73
  "I am also localized." = "I am also localized.";
74
74
  "I am localized with a value of #{value}." = "I am localized with a value of #{value}.";
75
- "Export All Contents in "%@"…" = "Export All Contents in "%@"…";
75
+ "Filename" = "Filename";
76
76
  "first string" = "first string";
77
77
  "second string" = "second string";
78
78
  "third string" = "third string";
@@ -84,7 +84,7 @@ Feature: Locamotion slurp
84
84
  "I am localized!" = "I am localized!";
85
85
  "I am also localized." = "I am also localized.";
86
86
  "I am localized with a value of #{value}." = "I am localized with a value of #{value}.";
87
- "Export All Contents in "%@"…" = "Export All Contents in "%@"…";
87
+ "Filename" = "Filename";
88
88
  "first string" = "first string";
89
89
  "second string" = "second string";
90
90
  "third string" = "third string";
@@ -27,7 +27,7 @@ module Locamotion
27
27
  desc "--version, -v", "print the version"
28
28
 
29
29
  def __print_version
30
- puts '0.0.3'
30
+ puts '0.0.5'
31
31
  end
32
32
 
33
33
  no_commands {
@@ -70,8 +70,8 @@ module Locamotion
70
70
  matches = []
71
71
  Dir.glob(path) do |ruby_file|
72
72
  File.open(ruby_file).each do |line|
73
- matches += line.scan(/"(.*?)"\._/)
74
- matches += line.scan(/'(.*?)'\._/)
73
+ matches += line.scan(/"((?:(?!(?<!\\)").)*?)"\._/)
74
+ matches += line.scan(/'((?:(?!(?<!\\)').)*?)'\._/)
75
75
  end
76
76
  end
77
77
  matches.flatten
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: locamotion 0.0.3 ruby lib
5
+ # stub: locamotion 0.0.5 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "locamotion"
9
- s.version = "0.0.3"
9
+ s.version = "0.0.5"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
13
13
  s.authors = ["Ramon Huidobro"]
14
- s.date = "2016-02-27"
14
+ s.date = "2016-02-29"
15
15
  s.description = "Locamotion (Localization Motion) is a Command Line tool to generate localizable files in RubyMotion projects. It parses the 'app' directory for SugarCube (https://github.com/rubymotion/sugarcube) strings, ending in '._'. It also transfers the english localized files into others."
16
16
  s.email = "ramon.martin.huidobro@gmail.com"
17
17
  s.executables = ["locamotion"]
@@ -43,7 +43,7 @@ Gem::Specification.new do |s|
43
43
  ]
44
44
  s.homepage = "http://github.com/incbee/locamotion"
45
45
  s.licenses = ["MIT"]
46
- s.rubygems_version = "2.4.8"
46
+ s.rubygems_version = "2.5.1"
47
47
  s.summary = "CLI tool to generate localizable files in RubyMotion projects"
48
48
 
49
49
  if s.respond_to? :specification_version then
@@ -7,7 +7,7 @@ describe "Slurp" do
7
7
  content = <<-eos
8
8
  "I am localized!"._
9
9
  "I am also localized."._
10
- "Export \"%@\" Object…"._
10
+ field = NSString.dateTimeFieldWithVariable('filename', label: 'Filename'._)
11
11
  eos
12
12
  File.open('/tmp/rm_project/app/test1.rb', 'a+') { |f| f.write(content) }
13
13
  File.open('/tmp/rm_project/app/test2.rb', 'a+') { |f| f.write("\"I am to be localized\"._") }
@@ -19,7 +19,7 @@ describe "Slurp" do
19
19
  end
20
20
 
21
21
  it "gets all localizable strings" do
22
- expect(@app.parse_rubymotion_app('/tmp/rm_project/app/**/*.rb')).to match_array(["I am localized!", "I am also localized.", "I am to be localized", "Export \"%@\" Object…"])
22
+ expect(@app.parse_rubymotion_app('/tmp/rm_project/app/**/*.rb')).to match_array(["I am localized!", "I am also localized.", "I am to be localized", "Filename"])
23
23
  end
24
24
 
25
25
  it "announces 4 finished strings" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: locamotion
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
  - Ramon Huidobro
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-27 00:00:00.000000000 Z
11
+ date: 2016-02-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -173,7 +173,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
173
173
  version: '0'
174
174
  requirements: []
175
175
  rubyforge_project:
176
- rubygems_version: 2.4.8
176
+ rubygems_version: 2.5.1
177
177
  signing_key:
178
178
  specification_version: 4
179
179
  summary: CLI tool to generate localizable files in RubyMotion projects