r18n-desktop 0.4.3 → 0.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/r18n-desktop.rb CHANGED
@@ -43,28 +43,4 @@ module R18n
43
43
  self.set I18n.new(locales, translations_places)
44
44
  end
45
45
  end
46
-
47
- # Useful aliases. Set I18n object before use them:
48
- #
49
- # R18n.from_env('./i18n/')
50
- #
51
- # t.ok #=> "OK"
52
- # l Time.now, :human #=> "now"
53
- module Helpers
54
- # Get current I18n object.
55
- def r18n
56
- R18n.get
57
- end
58
- alias i18n r18n
59
-
60
- # Translate message. Alias for <tt>r18n.t</tt>.
61
- def t(*params)
62
- R18n.get.t(*params)
63
- end
64
-
65
- # Localize object. Alias for <tt>r18n.l</tt>.
66
- def l(*params)
67
- R18n.get.l(*params)
68
- end
69
- end
70
46
  end
@@ -4,6 +4,10 @@ require File.join(File.dirname(__FILE__), 'spec_helper')
4
4
  describe "r18n-desktop" do
5
5
  include R18n::Helpers
6
6
 
7
+ before(:each) do
8
+ R18n.reset
9
+ end
10
+
7
11
  it "should return array of system locales" do
8
12
  locale = R18n::I18n.system_locale
9
13
  locale.class.should == String
@@ -14,10 +18,12 @@ describe "r18n-desktop" do
14
18
  R18n.from_env
15
19
  r18n.class.should == R18n::I18n
16
20
  r18n.locale.should_not be_empty if String == r18n.locale.class
17
-
21
+ R18n.get.should == r18n
22
+ end
23
+
24
+ it "should load i18n from system environment using specified order" do
18
25
  R18n.from_env(nil, 'en')
19
26
  r18n.locale.should == R18n::Locale.load('en')
20
-
21
27
  R18n.get.should == r18n
22
28
  end
23
29
 
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.4.3
4
+ version: 0.4.4
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: 2010-02-26 00:00:00 +03:00
12
+ date: 2010-03-29 00:00:00 +04: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.4.3
23
+ version: 0.4.4
24
24
  version:
25
25
  description: " A i18n tool to translate your desktop application in several languages.\n It is just a wrapper for R18n core library.\n It has nice Ruby-style syntax, filters, flexible locales, custom loaders,\n translation support for any classes, time and number localization, several\n user language support, agnostic core package with out-of-box support for\n Rails, Sinatra, Merb and desktop applications.\n"
26
26
  email: andrey@sitnik.ru