sinatra-r18n 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
data/lib/sinatra/r18n.rb CHANGED
@@ -22,9 +22,11 @@ require 'rubygems'
22
22
  gem 'sinatra'
23
23
  require 'sinatra/base'
24
24
 
25
- gem 'r18n-core', '~>0.2'
25
+ gem 'r18n-core', '~>0.2.3'
26
26
  require 'r18n-core'
27
27
 
28
+ R18n.untranslated = '%2<span style="color: red">%3</span>'
29
+
28
30
  module Sinatra #::nodoc::
29
31
  module R18n #::nodoc::
30
32
  module Helpers
data/spec/app/app.rb CHANGED
@@ -15,5 +15,5 @@ get '/locale' do
15
15
  end
16
16
 
17
17
  get '/locales' do
18
- i18n.translations.map { |i| i.join(': ') }.join("; ")
18
+ i18n.translations.map { |i| i.join(': ') }.sort.join('; ')
19
19
  end
@@ -40,7 +40,7 @@ describe Sinatra::R18n do
40
40
  it "should return locales list" do
41
41
  get '/locales'
42
42
  last_response.should be_ok
43
- last_response.body.should == 'ru: Русский; en: English'
43
+ last_response.body.should == 'en: English; ru: Русский'
44
44
  end
45
45
 
46
46
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sinatra-r18n
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
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: 2009-06-25 00:00:00 +04:00
12
+ date: 2009-07-22 00:00:00 +08: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.2
23
+ version: 0.2.3
24
24
  version:
25
25
  description: A Sinatra extension that provides i18n support to translate your web application. 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
@@ -63,12 +63,12 @@ signing_key:
63
63
  specification_version: 2
64
64
  summary: A Sinatra extension that provides i18n support to translate your web application.
65
65
  test_files:
66
- - spec/spec_helper.rb
67
66
  - spec/sinatra-r18n_spec.rb
68
67
  - spec/app
69
- - spec/app/i18n
70
- - spec/app/i18n/ru.yml
71
- - spec/app/i18n/en.yml
72
- - spec/app/app.rb
73
68
  - spec/app/views
74
69
  - spec/app/views/post.erb
70
+ - spec/app/app.rb
71
+ - spec/app/i18n
72
+ - spec/app/i18n/en.yml
73
+ - spec/app/i18n/ru.yml
74
+ - spec/spec_helper.rb