i18n_screwdriver 0.1.4 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -6,6 +6,12 @@ is that you have to use keys for every string to translate.
6
6
  That is one too many abstraction layers - I love the gettext syntax but I want to
7
7
  stick to the rails standard libraries. Therefor I created this small toolbox.
8
8
 
9
+ == Installation
10
+
11
+ First run the generator that copies the translation rake task to your application task dir.
12
+
13
+ rails g screwdriver
14
+
9
15
  == Usage
10
16
 
11
17
  Set these constants to make i18n screwdriver aware of the languages you are using
@@ -18,7 +24,7 @@ In your views, helpers and controllers use the convenient underscore helper meth
18
24
  _("your translation")
19
25
 
20
26
  When you are done you have 2 helper rake tasks. The first one scans all your views, controllers and
21
- helpers for translation. It removes unused translation strings and creates an application.<lang>.yml file
27
+ helpers for translations. It removes unused translation strings and creates an application.<lang>.yml file
22
28
  for each of your APPLICATION_LANGUAGES.
23
29
 
24
30
  rake i18n:update
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.4
1
+ 0.2.0
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{i18n_screwdriver}
8
- s.version = "0.1.4"
8
+ s.version = "0.2.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Tobias Miesel"]
12
- s.date = %q{2010-11-19}
12
+ s.date = %q{2010-11-23}
13
13
  s.email = %q{agileapplications@gmail.com}
14
14
  s.extra_rdoc_files = [
15
15
  "README.rdoc"
@@ -22,9 +22,9 @@ Gem::Specification.new do |s|
22
22
  "Rakefile",
23
23
  "VERSION",
24
24
  "i18n_screwdriver.gemspec",
25
+ "lib/generators/screwdriver_generator.rb",
25
26
  "lib/i18n_screwdriver.rb",
26
27
  "lib/tasks/i18n.rake",
27
- "rails/init.rb",
28
28
  "test/helper.rb",
29
29
  "test/test_i18n_screwdriver.rb"
30
30
  ]
@@ -0,0 +1,5 @@
1
+ class ScrewdriverGenerator < Rails::Generators::Base
2
+ def generate_screwdriver
3
+ copy_file "#{File.expand_path('../../tasks', __FILE__)}/i18n.rake", "lib/tasks/i18n.rake"
4
+ end
5
+ end
@@ -12,4 +12,7 @@ module I18n
12
12
  end
13
13
  end
14
14
  end
15
- end
15
+ end
16
+
17
+ ActionView::Base.send :include, I18n::Screwdriver
18
+ ActionController::Base.send :include, I18n::Screwdriver
data/lib/tasks/i18n.rake CHANGED
@@ -57,7 +57,7 @@ namespace :i18n do
57
57
  if input == ":q"
58
58
  break
59
59
  else
60
- existing_translations[key] =
60
+ existing_translations[key] = input
61
61
  end
62
62
  end
63
63
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: i18n_screwdriver
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 23
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 1
9
- - 4
10
- version: 0.1.4
8
+ - 2
9
+ - 0
10
+ version: 0.2.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Tobias Miesel
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-11-19 00:00:00 +01:00
18
+ date: 2010-11-23 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -140,9 +140,9 @@ files:
140
140
  - Rakefile
141
141
  - VERSION
142
142
  - i18n_screwdriver.gemspec
143
+ - lib/generators/screwdriver_generator.rb
143
144
  - lib/i18n_screwdriver.rb
144
145
  - lib/tasks/i18n.rake
145
- - rails/init.rb
146
146
  - test/helper.rb
147
147
  - test/test_i18n_screwdriver.rb
148
148
  has_rdoc: true
data/rails/init.rb DELETED
@@ -1,4 +0,0 @@
1
- require 'i18n_screwdriver'
2
-
3
- ActionView::Base.send :include, I18n::Screwdriver
4
- ActionController::Base.send :include, I18n::Screwdriver