valvat 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES.md CHANGED
@@ -1,6 +1,13 @@
1
1
  ### dev
2
2
 
3
- [full changelog](http://github.com/yolk/valvat/compare/v0.3.1...master)
3
+ [full changelog](http://github.com/yolk/valvat/compare/v0.3.2...master)
4
+
5
+ ### 0.3.2 / 2011-01-14
6
+
7
+ [full changelog](http://github.com/yolk/valvat/compare/v0.3,1...v0.3.2)
8
+
9
+ * Fixed localization strings (en/de)
10
+ * Moved locales folder to lib/valvat/locales
4
11
 
5
12
  ### 0.3.1 / 2011-01-12
6
13
 
@@ -40,5 +40,5 @@ module ActiveModel
40
40
  end
41
41
 
42
42
  %w(en de).each do |locale|
43
- I18n.load_path << "#{File.dirname(__FILE__)}/../locale/#{locale}.yml"
43
+ I18n.load_path << "#{File.dirname(__FILE__)}/locales/#{locale}.yml"
44
44
  end
@@ -12,8 +12,8 @@ de:
12
12
  cz: tschechische
13
13
  de: deutsche
14
14
  dk: dänische
15
- ee: estnisch
16
- es: spanisch
15
+ ee: estnische
16
+ es: spanische
17
17
  fi: finnische
18
18
  fr: französische
19
19
  gb: britische
@@ -21,10 +21,10 @@ de:
21
21
  hu: ungarische
22
22
  ie: irische
23
23
  it: italienische
24
- lt: litauisch
25
- lu: luxemburgisch
24
+ lt: litauische
25
+ lu: luxemburgische
26
26
  lv: lettische
27
- mt: malteser
27
+ mt: maltesische
28
28
  nl: niederländische
29
29
  pl: polnische
30
30
  pt: portugiesische
@@ -0,0 +1,34 @@
1
+ en:
2
+ errors:
3
+ messages:
4
+ invalid_vat: is not a valid %{country_adjective} vat number
5
+ valvat:
6
+ country_adjectives:
7
+ eu: European
8
+ at: Austrian
9
+ be: Belgian
10
+ bg: Bulgarian
11
+ cy: Cypriot
12
+ cz: Czech
13
+ de: German
14
+ dk: Danish
15
+ ee: Estonian
16
+ es: Spanish
17
+ fi: Finnish
18
+ fr: French
19
+ gb: British
20
+ gr: Greek
21
+ hu: Hungarian
22
+ ie: Irish
23
+ it: Italian
24
+ lt: Lithuanian
25
+ lu: Luxembourg
26
+ lv: Latvian
27
+ mt: Maltese
28
+ nl: Dutch
29
+ pl: Polish
30
+ pt: Portuguese
31
+ ro: Rumanian
32
+ se: Swedish
33
+ si: Slovenian
34
+ sk: Slovakian
@@ -1,3 +1,3 @@
1
1
  class Valvat
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.2"
3
3
  end
@@ -52,7 +52,7 @@ describe Invoice do
52
52
 
53
53
  it "should add default (country specific) error message" do
54
54
  invoice.valid?
55
- invoice.errors[:vat_number].should eql(["is not a valid german vat number"])
55
+ invoice.errors[:vat_number].should eql(["is not a valid German vat number"])
56
56
  end
57
57
 
58
58
  context "with i18n translation in place" do
@@ -82,13 +82,13 @@ describe Invoice do
82
82
  it "should replace country adjective placeholder" do
83
83
  invoice = Invoice.new(:vat_number => "IE123")
84
84
  invoice.valid?
85
- invoice.errors[:vat_number].should eql(["is not a irish vat"])
85
+ invoice.errors[:vat_number].should eql(["is not a Irish vat"])
86
86
  end
87
87
 
88
- it "should fall back to 'european' if country is missing" do
88
+ it "should fall back to 'European' if country is missing" do
89
89
  invoice = Invoice.new(:vat_number => "XX123")
90
90
  invoice.valid?
91
- invoice.errors[:vat_number].should eql(["is not a european vat"])
91
+ invoice.errors[:vat_number].should eql(["is not a European vat"])
92
92
  end
93
93
  end
94
94
  end
@@ -192,13 +192,13 @@ describe InvoiceCheckCountry do
192
192
  it "should give back error message with country from :country_match" do
193
193
  invoice = InvoiceCheckCountry.new(:country => "FR", :vat_number => "DE259597697")
194
194
  invoice.valid?
195
- invoice.errors[:vat_number].should eql(["is not a valid french vat number"])
195
+ invoice.errors[:vat_number].should eql(["is not a valid French vat number"])
196
196
  end
197
197
 
198
198
  it "should give back error message with country from :country_match even on invalid vat number" do
199
199
  invoice = InvoiceCheckCountry.new(:country => "FR", :vat_number => "DE259597697123")
200
200
  invoice.valid?
201
- invoice.errors[:vat_number].should eql(["is not a valid french vat number"])
201
+ invoice.errors[:vat_number].should eql(["is not a valid French vat number"])
202
202
  end
203
203
  end
204
204
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 3
8
- - 1
9
- version: 0.3.1
8
+ - 2
9
+ version: 0.3.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Sebastian Munz
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-01-12 00:00:00 +01:00
17
+ date: 2011-01-14 00:00:00 +01:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -139,10 +139,10 @@ files:
139
139
  - MIT-LICENSE
140
140
  - README.md
141
141
  - Rakefile
142
- - lib/locale/de.yml
143
- - lib/locale/en.yml
144
142
  - lib/valvat.rb
145
143
  - lib/valvat/active_model.rb
144
+ - lib/valvat/locales/de.yml
145
+ - lib/valvat/locales/en.yml
146
146
  - lib/valvat/lookup.rb
147
147
  - lib/valvat/syntax.rb
148
148
  - lib/valvat/utils.rb
data/lib/locale/en.yml DELETED
@@ -1,34 +0,0 @@
1
- en:
2
- errors:
3
- messages:
4
- invalid_vat: is not a valid %{country_adjective} vat number
5
- valvat:
6
- country_adjectives:
7
- eu: european
8
- at: austrian
9
- be: belgian
10
- bg: bulgarian
11
- cy: cypriot
12
- cz: czech
13
- de: german
14
- dk: danish
15
- ee: estonian
16
- es: spanish
17
- fi: finnish
18
- fr: french
19
- gb: british
20
- gr: greek
21
- hu: hungarian
22
- ie: irish
23
- it: italian
24
- lt: lithuanian
25
- lu: luxembourg
26
- lv: latvian
27
- mt: maltese
28
- nl: dutch
29
- pl: polish
30
- pt: portuguese
31
- ro: rumanian
32
- se: swedish
33
- si: slovenian
34
- sk: slovakian