gettext_i18n_rails 0.2.16 → 0.2.17

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.16
1
+ 0.2.17
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{gettext_i18n_rails}
8
- s.version = "0.2.16"
8
+ s.version = "0.2.17"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Michael Grosser"]
12
- s.date = %q{2011-02-12}
12
+ s.date = %q{2011-02-17}
13
13
  s.email = %q{grosser.michael@gmail.com}
14
14
  s.files = [
15
15
  "Rakefile",
@@ -7,11 +7,11 @@ namespace :gettext do
7
7
  desc "Create mo-files for L10n"
8
8
  task :pack do
9
9
  load_gettext
10
- GetText.create_mofiles(true, "locale", "locale")
10
+ GetText.create_mofiles(true, locale_path, locale_path)
11
11
  end
12
12
 
13
13
  desc "Update pot/po files."
14
- task :find do
14
+ task :find => :environment do
15
15
  load_gettext
16
16
  $LOAD_PATH << File.join(File.dirname(__FILE__),'..','..','lib')
17
17
  require 'gettext_i18n_rails/haml_parser'
@@ -19,8 +19,8 @@ namespace :gettext do
19
19
 
20
20
  if GetText.respond_to? :update_pofiles_org
21
21
  GetText.update_pofiles_org(
22
- text_domain(),
23
- files_to_translate(),
22
+ text_domain,
23
+ files_to_translate,
24
24
  "version 0.0.1",
25
25
  :po_root => locale_path,
26
26
  :msgmerge=>['--sort-output']
@@ -38,10 +38,10 @@ namespace :gettext do
38
38
 
39
39
  #parse files.. (models are simply parsed as ruby files)
40
40
  GetText.update_pofiles(
41
- textdomain,
42
- Dir.glob("{app,lib,config,locale}/**/*.{rb,erb,haml}"),
41
+ text_domain,
42
+ files_to_translate,
43
43
  "version 0.0.1",
44
- 'locale'
44
+ locale_path
45
45
  )
46
46
  end
47
47
  end
@@ -59,14 +59,14 @@ namespace :gettext do
59
59
  # require 'active_record'
60
60
  # gem "gettext_activerecord", '>=0.1.0' #download and install from github
61
61
  # require 'gettext_activerecord/parser'
62
- desc "write the locale/model_attributes.rb"
62
+ desc "write the model attributes to <locale_path>/model_attributes.rb"
63
63
  task :store_model_attributes => :environment do
64
64
  FastGettext.silence_errors
65
65
 
66
66
  require 'gettext_i18n_rails/model_attributes_finder'
67
67
  require 'gettext_i18n_rails/active_record'
68
68
 
69
- storage_file = 'locale/model_attributes.rb'
69
+ storage_file = "#{locale_path}/model_attributes.rb"
70
70
  puts "writing model translations to: #{storage_file}"
71
71
 
72
72
  ignore_tables = [/^sitemap_/, /_versions$/, 'schema_migrations', 'sessions', 'delayed_jobs']
@@ -115,6 +115,6 @@ namespace :gettext do
115
115
  end
116
116
 
117
117
  def files_to_translate
118
- Dir.glob("{app,lib,config,locale}/**/*.{rb,erb,haml}")
118
+ Dir.glob("{app,lib,config,#{locale_path}}/**/*.{rb,erb,haml}")
119
119
  end
120
120
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gettext_i18n_rails
3
3
  version: !ruby/object:Gem::Version
4
- hash: 55
4
+ hash: 53
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 16
10
- version: 0.2.16
9
+ - 17
10
+ version: 0.2.17
11
11
  platform: ruby
12
12
  authors:
13
13
  - Michael Grosser
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-02-12 00:00:00 +01:00
18
+ date: 2011-02-17 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency