vocab 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 0.0.4
2
+
3
+ * Delete leftover cruft from tmp dir used in `vocab extract rails`
4
+
1
5
  # 0.0.3
2
6
 
3
7
  * Support multiple pending translations by changing .vocab in extract command
data/README.md CHANGED
@@ -51,7 +51,10 @@ For new language files, just put them directly under the `res` directory.
51
51
 
52
52
  ### Merging new translations into project string files
53
53
 
54
- Integrate the translations with the following command:
54
+ For new languages, you simply take the file containing the full translation and put
55
+ it in the proper directory under the `res` directory.
56
+
57
+ Integrate _partial_ the translations with the following command:
55
58
 
56
59
  cd APP_ROOT
57
60
  vocab merge android
@@ -101,6 +104,8 @@ with 'debug_' to avoid these keys being sent to translators.
101
104
 
102
105
  # TODO
103
106
 
107
+ * Better documentation (omnigraffle graphic)
108
+ * Dry run extract
104
109
  * Add .processed to each tmp/translation after success
105
110
  * Handle full translations under tmp/translations when no existing translation exists in android
106
111
  * Add iOS support
@@ -24,7 +24,7 @@ module Vocab
24
24
  def previous_strings( locales_root = nil )
25
25
  locales_root ||= "config/locales"
26
26
  tmpdir = "#{Vocab.root}/tmp/last_translation"
27
- FileUtils.rm_rf( "#{tmpdir}/*" )
27
+ `rm -rf #{tmpdir}/*`
28
28
 
29
29
  sha = Vocab.settings.last_translation
30
30
  translation_files = `git ls-tree --name-only -r #{sha}:#{locales_root}`.split( "\n" )
data/lib/vocab/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Vocab
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -58,6 +58,13 @@ describe "Vocab::Extractor::Rails" do
58
58
  File.exists?( dir ).should be_true
59
59
  end
60
60
 
61
+ it "deletes leftover files from a previous extract in the tmp dir" do
62
+ path = "#{vocab_root}/tmp/last_translation/deleteme.yml"
63
+ File.open( path, 'w' ) { |f| f.write( "leftover junk" ) }
64
+ Vocab::Extractor::Rails.previous_strings( @locales_root )
65
+ File.exists?( path ).should be_false
66
+ end
67
+
61
68
  end
62
69
 
63
70
  describe "current_strings" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vocab
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-04-16 00:00:00.000000000Z
12
+ date: 2012-05-08 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: i18n
16
- requirement: &2157421200 !ruby/object:Gem::Requirement
16
+ requirement: &2157186620 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2157421200
24
+ version_requirements: *2157186620
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: nokogiri
27
- requirement: &2157420580 !ruby/object:Gem::Requirement
27
+ requirement: &2157186180 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *2157420580
35
+ version_requirements: *2157186180
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rspec
38
- requirement: &2157419820 !ruby/object:Gem::Requirement
38
+ requirement: &2157185540 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 2.7.0
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *2157419820
46
+ version_requirements: *2157185540
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: simplecov
49
- requirement: &2157418700 !ruby/object:Gem::Requirement
49
+ requirement: &2157185000 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,7 +54,7 @@ dependencies:
54
54
  version: '0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *2157418700
57
+ version_requirements: *2157185000
58
58
  description: Export strings that need to be translated and integrate the completed
59
59
  translations
60
60
  email: