r18n-desktop 0.2 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/lib/r18n-desktop.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  =begin
2
3
  I18n support for desktop application.
3
4
 
@@ -36,7 +37,7 @@ module R18n
36
37
  # Get user locale from system environment and load I18n object with locale
37
38
  # information and translations from +translations_dir+. If user set locale
38
39
  # +manual+ put it as last argument.
39
- def from_env(translations_dir, manual = nil)
40
+ def from_env(translations_dir = nil, manual = nil)
40
41
  locales = Array(R18n::I18n.system_locale)
41
42
  locales.insert(0, manual) if not manual.nil?
42
43
  self.set I18n.new(locales, translations_dir)
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  =begin
2
3
  I18n support for JRuby.
3
4
 
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  =begin
2
3
  I18n support for UNIX-like OS.
3
4
 
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  =begin
2
3
  I18n support for Windows.
3
4
 
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  require File.join(File.dirname(__FILE__), 'spec_helper')
2
3
 
3
4
  describe "r18n-desktop" do
data/spec/spec_helper.rb CHANGED
@@ -1 +1,2 @@
1
+ # encoding: utf-8
1
2
  require File.join(File.dirname(__FILE__), '../lib/r18n-desktop')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: r18n-desktop
3
3
  version: !ruby/object:Gem::Version
4
- version: "0.2"
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrey "A.I." Sitnik
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-12-06 00:00:00 +03:00
12
+ date: 2009-02-18 00:00:00 +03:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -20,7 +20,7 @@ dependencies:
20
20
  requirements:
21
21
  - - "="
22
22
  - !ruby/object:Gem::Version
23
- version: "0.2"
23
+ version: 0.2.1
24
24
  version:
25
25
  description: A tool to translate your desktop application in several languages. It is just a wrap for R18n core library. It can format numbers and time to the rules of the user locale, has translation for common words, storage translation in YAML format with pluralization and procedures and has special support for countries with two official languages.
26
26
  email: andrey@sitnik.ru
@@ -38,7 +38,6 @@ files:
38
38
  - lib/r18n-desktop/win32.rb
39
39
  - lib/r18n-desktop.rb
40
40
  - LICENSE
41
- - Rakefile
42
41
  - README.rdoc
43
42
  has_rdoc: true
44
43
  homepage: http://r18n.rubyforge.org/
data/Rakefile DELETED
@@ -1,88 +0,0 @@
1
- require 'rubygems'
2
- require 'rake/rdoctask'
3
- require 'rake/gempackagetask'
4
- require 'spec/rake/spectask'
5
-
6
- PKG_NAME = 'r18n-desktop'
7
- gem 'r18n-core'
8
- require 'r18n-core/version'
9
-
10
- ##############################################################################
11
- # Tests
12
- ##############################################################################
13
-
14
- desc 'Run all specs'
15
- Spec::Rake::SpecTask.new('specs') do |t|
16
- t.spec_opts = ['--format', 'specdoc', '--colour']
17
- t.spec_files = Dir['spec/**/*_spec.rb'].sort
18
- end
19
-
20
- desc 'Run a specific spec with TASK=xxxx'
21
- Spec::Rake::SpecTask.new('spec') do |t|
22
- t.spec_opts = ['--format', 'specdoc', '--colour']
23
- t.libs = ['lib']
24
- t.spec_files = ["spec/**/#{ENV['TASK']}_spec.rb"]
25
- end
26
-
27
- desc 'Run all specs output html'
28
- Spec::Rake::SpecTask.new('specs_html') do |t|
29
- t.spec_opts = ['--format', 'html']
30
- t.libs = ['lib']
31
- t.spec_files = Dir['spec/**/*_spec.rb'].sort
32
- end
33
-
34
- ##############################################################################
35
- # Documentation and distribution
36
- ##############################################################################
37
-
38
- Rake::RDocTask.new do |rdoc|
39
- rdoc.main = 'README.rdoc'
40
- rdoc.rdoc_files.include('README.rdoc', 'LICENSE', 'lib/**/*.rb')
41
- rdoc.title = 'R18n Desktop Documentation'
42
- rdoc.rdoc_dir = 'doc'
43
- rdoc.options << '-c utf-8'
44
- rdoc.options << '--all'
45
- end
46
-
47
- spec = Gem::Specification.new do |s|
48
- s.platform = Gem::Platform::RUBY
49
- s.name = PKG_NAME
50
- s.version = R18n::VERSION
51
- s.summary = 'A tool to translate your Ruby desktop application.'
52
- s.description = <<-EOF
53
- A tool to translate your desktop application in several languages.
54
- It is just a wrap for R18n core library.
55
- It can format numbers and time to the rules of the user locale,
56
- has translation for common words, storage translation in YAML format with
57
- pluralization and procedures and has special support for countries
58
- with two official languages.
59
- EOF
60
-
61
- s.files = FileList[
62
- 'lib/**/*',
63
- 'LICENSE',
64
- 'Rakefile',
65
- 'README.rdoc']
66
- s.test_files = FileList[
67
- 'spec/**/*']
68
- s.extra_rdoc_files = ['README.rdoc', 'LICENSE']
69
- s.require_path = 'lib'
70
- s.has_rdoc = true
71
-
72
- s.add_dependency 'r18n-core', R18n::VERSION
73
-
74
- s.author = 'Andrey "A.I." Sitnik'
75
- s.email = 'andrey@sitnik.ru'
76
- s.homepage = 'http://r18n.rubyforge.org/'
77
- s.rubyforge_project = PKG_NAME
78
- end
79
-
80
- Rake::GemPackageTask.new(spec) do |pkg|
81
- pkg.gem_spec = spec
82
- end
83
-
84
- desc 'Install as a gem'
85
- task :install => [:package] do
86
- sudo = RUBY_PLATFORM =~ /win32/ ? '' : 'sudo'
87
- sh %{#{sudo} gem install pkg/#{PKG_NAME}-#{R18n::VERSION}}
88
- end