padrino-core 0.7.6 → 0.7.7

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/VERSION CHANGED
@@ -1 +1 @@
1
- 0.7.6
1
+ 0.7.7
@@ -157,8 +157,8 @@ module Padrino
157
157
  self.register_initializers
158
158
  self.require_load_paths
159
159
  self.disable :logging # We need do that as default because Sinatra use commonlogger.
160
- I18n.locale = self.locale
161
160
  I18n.load_path += self.locale_path
161
+ I18n.reload!
162
162
  @_configured = true
163
163
  end
164
164
 
@@ -182,7 +182,6 @@ module Padrino
182
182
  set :flash, defined?(Rack::Flash)
183
183
  set :authentication, false
184
184
  # Padrino locale
185
- set :locale, :en
186
185
  set :locale_path, Proc.new { Dir[File.join(self.root, "/locale/**/*.{rb,yml}")] }
187
186
  set :auto_locale, false
188
187
  # Plugin specific
@@ -0,0 +1,30 @@
1
+ de:
2
+ date:
3
+ formats:
4
+ # Benutze die strftime Parameter f¸r die Formatierung
5
+ # Wenn keine Formate angegeben wurde, wird "default" benutzt.
6
+ # Du kannst andere Formate hier bieten, wenn Du willst.
7
+ default: "&d.&m.%Y"
8
+ short: "%b %d"
9
+ long: "%B %d, %Y"
10
+
11
+ day_names: [Sontag, Montag, Dienstag, Mittwoch, Donnerstag, Freitag, Samstag]
12
+ abbr_day_names: [Son, Mon, Die, Mit, Don, Fre, Sam]
13
+ month_names: [~, Januar, Februar, Marz, April, Mai, Juni, Juli, August, September, Oktober, November, Dezember]
14
+ abbr_month_names: [~, Jan, Feb, Mar, Apr, Mai, Jun, Jul, Aug, Sep, Okt, Nov, Dez]
15
+ order: [ day, :month, :year ]
16
+
17
+ time:
18
+ formats:
19
+ default: "%a, %d %b %Y %H:%M:%S %z"
20
+ short: "%d %b %H:%M"
21
+ long: "%B %d, %Y %H:%M"
22
+ am: "am"
23
+ pm: "pm"
24
+
25
+ # Benutzt in array.to_sentence.
26
+ support:
27
+ array:
28
+ words_connector: ", "
29
+ two_words_connector: " und "
30
+ last_word_connector: ", und "
@@ -7,14 +7,11 @@ en:
7
7
  default: "%Y-%m-%d"
8
8
  short: "%b %d"
9
9
  long: "%B %d, %Y"
10
-
10
+
11
11
  day_names: [Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday]
12
12
  abbr_day_names: [Sun, Mon, Tue, Wed, Thu, Fri, Sat]
13
-
14
- # Don't forget the nil at the beginning; there's no such thing as a 0th month
15
13
  month_names: [~, January, February, March, April, May, June, July, August, September, October, November, December]
16
14
  abbr_month_names: [~, Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec]
17
- # Used in date_select and datime_select.
18
15
  order: [ :year, :month, :day ]
19
16
 
20
17
  time:
@@ -0,0 +1,37 @@
1
+ it:
2
+ date:
3
+ formats:
4
+ # Use the strftime parameters for formats.
5
+ # When no format has been given, it uses default.
6
+ # You can provide other formats here if you like!
7
+ default: "%d-%m-%Y"
8
+ short: "%d %b"
9
+ long: "%d %B %Y"
10
+ only_day: "%e"
11
+
12
+ day_names: [Domenica, Lunedì, Martedì, Mercoledì, Giovedì, Venerdì, Sabato]
13
+ abbr_day_names: [Dom, Lun, Mar, Mer, Gio, Ven, Sab]
14
+ month_names: [~, Gennaio, Febbraio, Marzo, Aprile, Maggio, Giugno, Luglio, Agosto, Settembre, Ottobre, Novembre, Dicembre]
15
+ abbr_month_names: [~, Gen, Feb, Mar, Apr, Mag, Giu, Lug, Ago, Set, Ott, Nov, Dic]
16
+ order: [ :day, :month, :year ]
17
+
18
+ time:
19
+ formats:
20
+ default: "%a %d %b %Y, %H:%M:%S %z"
21
+ time: "%H:%M"
22
+ short: "%d %b %H:%M"
23
+ long: "%d %B %Y %H:%M"
24
+ only_second: "%S"
25
+
26
+ datetime:
27
+ formats:
28
+ default: "%d-%m-%YT%H:%M:%S%Z"
29
+
30
+ am: 'am'
31
+ pm: 'pm'
32
+
33
+ # Used in array.to_sentence.
34
+ support:
35
+ array:
36
+ sentence_connector: "e"
37
+ skip_last_comma: false
data/padrino-core.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{padrino-core}
8
- s.version = "0.7.6"
8
+ s.version = "0.7.7"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Padrino Team", "Nathan Esquenazi", "Davide D'Agostino", "Arthur Chiu"]
12
- s.date = %q{2010-02-10}
12
+ s.date = %q{2010-02-11}
13
13
  s.default_executable = %q{padrino}
14
14
  s.description = %q{The Padrino core gem required for use of this framework}
15
15
  s.email = %q{padrinorb@gmail.com}
@@ -36,7 +36,9 @@ Gem::Specification.new do |s|
36
36
  "lib/padrino-core/images/404.png",
37
37
  "lib/padrino-core/images/500.png",
38
38
  "lib/padrino-core/loader.rb",
39
+ "lib/padrino-core/locale/de.yml",
39
40
  "lib/padrino-core/locale/en.yml",
41
+ "lib/padrino-core/locale/it.yml",
40
42
  "lib/padrino-core/logger.rb",
41
43
  "lib/padrino-core/mounter.rb",
42
44
  "lib/padrino-core/reloader.rb",
@@ -150,22 +150,12 @@ class TestApplication < Test::Unit::TestCase
150
150
 
151
151
  context 'for application i18n functionality' do
152
152
 
153
- should 'have a default locale en and auto_locale disabled' do
153
+ should 'have auto_locale disabled' do
154
154
  mock_app do
155
- assert_equal :en, locale
156
155
  assert !auto_locale
157
156
  end
158
157
  end
159
158
 
160
- should 'change default locale from settings' do
161
- mock_app do
162
- set :locale, :it
163
- enable :auto_locale
164
- assert_equal :it, locale
165
- assert auto_locale
166
- end
167
- end
168
-
169
159
  should 'set locale when auto_locale is enabled' do
170
160
  mock_app do
171
161
  enable :auto_locale
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: padrino-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.6
4
+ version: 0.7.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Padrino Team
@@ -12,7 +12,7 @@ autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
14
 
15
- date: 2010-02-10 00:00:00 +01:00
15
+ date: 2010-02-11 00:00:00 +01:00
16
16
  default_executable: padrino
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
@@ -132,7 +132,9 @@ files:
132
132
  - lib/padrino-core/images/404.png
133
133
  - lib/padrino-core/images/500.png
134
134
  - lib/padrino-core/loader.rb
135
+ - lib/padrino-core/locale/de.yml
135
136
  - lib/padrino-core/locale/en.yml
137
+ - lib/padrino-core/locale/it.yml
136
138
  - lib/padrino-core/logger.rb
137
139
  - lib/padrino-core/mounter.rb
138
140
  - lib/padrino-core/reloader.rb