brI18n 2.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG ADDED
File without changes
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2008 [name of plugin creator]
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README ADDED
@@ -0,0 +1,8 @@
1
+ Brazilian Rails -- Tradução
2
+
3
+ Gem que sobrescreve a implementação de inflections para português, para ser
4
+ usado junto com o Rails
5
+
6
+ Para habilitar, basta:
7
+
8
+ require 'brtraducao'
data/Rakefile ADDED
@@ -0,0 +1,98 @@
1
+ require 'rubygems'
2
+ require 'rake'
3
+ require 'rake/testtask'
4
+ require 'rake/rdoctask'
5
+ require 'rake/packagetask'
6
+ require 'rake/gempackagetask'
7
+ require 'rake/contrib/sshpublisher'
8
+ require File.join(File.dirname(__FILE__), 'lib', 'brI18n', 'version')
9
+
10
+ PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
11
+ PKG_NAME = 'brI18n'
12
+ PKG_VERSION = BrI18n::VERSION::STRING + PKG_BUILD
13
+ PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
14
+
15
+ RELEASE_NAME = "REL #{PKG_VERSION}"
16
+
17
+ RUBY_FORGE_PROJECT = "brI18n"
18
+ RUBY_FORGE_USER = "tapajos"
19
+
20
+ desc "Default Task"
21
+ task :default => [ :test ]
22
+
23
+ # Run the unit tests
24
+ Rake::TestTask.new { |t|
25
+ t.libs << "test"
26
+ t.pattern = 'test/*_test.rb'
27
+ t.verbose = true
28
+ t.warning = false
29
+ }
30
+
31
+ #Generate the RDoc documentation
32
+ Rake::RDocTask.new { |rdoc|
33
+ rdoc.rdoc_dir = 'doc'
34
+ rdoc.title = "Brazilian Rails -- Tradução"
35
+ rdoc.options << '--line-numbers' << '--inline-source' << '-A cattr_accessor=object'
36
+ rdoc.options << '--charset' << 'utf-8'
37
+ rdoc.template = "#{ENV['template']}.rb" if ENV['template']
38
+ rdoc.rdoc_files.include('README', 'CHANGELOG')
39
+ rdoc.rdoc_files.include('lib/**/*')
40
+ }
41
+
42
+
43
+ # Create compressed packages
44
+ spec = Gem::Specification.new do |s|
45
+ s.platform = Gem::Platform::RUBY
46
+ s.name = PKG_NAME
47
+ s.summary = "brtraducao é uma das gems que compoem o Brazilian Rails"
48
+ s.description = %q{brtraducao é uma das gems que compoem o Brazilian Rails}
49
+ s.version = PKG_VERSION
50
+
51
+ s.authors = ["Marcos Tapajós", "Celestino Gomes", "Andre Kupkosvki", "Vinícius Teles"]
52
+ s.email = "tapajos@gmail.com"
53
+ s.rubyforge_project = "brtraducao"
54
+ s.homepage = "http://www.improveit.com.br/software_livre/brazilian_rails"
55
+
56
+ s.add_dependency('actionpack', '>= 1.4.2')
57
+ s.add_dependency('activerecord', '>= 1.15.3')
58
+ s.add_dependency('activesupport', '>= 1.4.2')
59
+
60
+ s.has_rdoc = true
61
+ s.requirements << 'none'
62
+ s.require_path = 'lib'
63
+
64
+ s.files = [ "Rakefile", "README", "CHANGELOG", "MIT-LICENSE" ]
65
+ s.files = s.files + Dir.glob( "lib/**/*" ).delete_if { |item| item.include?( "\.svn" ) }
66
+ s.files = s.files + Dir.glob( "test/**/*" ).delete_if { |item| item.include?( "\.svn" ) }
67
+ end
68
+
69
+ Rake::GemPackageTask.new(spec) do |p|
70
+ p.gem_spec = spec
71
+ p.need_tar = true
72
+ p.need_zip = true
73
+ end
74
+
75
+
76
+ # desc "Publish the API documentation"
77
+ # task :pgem => [:package] do
78
+ # Rake::SshFilePublisher.new("wrath.rubyonrails.org", "public_html/gems/gems", "pkg", "#{PKG_FILE_NAME}.gem").upload
79
+ # end
80
+ #
81
+ # desc "Publish the API documentation"
82
+ # task :pdoc => [:rdoc] do
83
+ # Rake::SshDirPublisher.new("wrath.rubyonrails.org", "public_html/am", "doc").upload
84
+ # end
85
+ #
86
+
87
+ desc "Publish the release files to RubyForge."
88
+ task :release => [ :package ] do
89
+ require 'rubyforge'
90
+ require 'rake/contrib/rubyforgepublisher'
91
+
92
+ packages = %w( gem tgz zip ).collect{ |ext| "pkg/#{PKG_NAME}-#{PKG_VERSION}.#{ext}" }
93
+
94
+ rubyforge = RubyForge.new
95
+ rubyforge.configure
96
+ rubyforge.login
97
+ rubyforge.add_release("brazilian-rails", PKG_NAME, "REL #{PKG_VERSION}", *packages)
98
+ end
@@ -0,0 +1,8 @@
1
+ module BrI18n
2
+ module VERSION #:nodoc:
3
+ MAJOR = 2
4
+ MINOR = 1
5
+ TINY = 2
6
+ STRING = "#{MAJOR}.#{MINOR}.#{TINY}"
7
+ end
8
+ end
data/lib/brI18n.rb ADDED
@@ -0,0 +1,13 @@
1
+ $:.unshift(File.dirname(__FILE__)) unless
2
+ $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
3
+
4
+ %w(version).each {|req| require File.dirname(__FILE__) + "/brI18n/#{req}"}
5
+
6
+ module BrI18n
7
+
8
+ I18N_FILES = File.expand_path(File.dirname(__FILE__) + "/files")
9
+
10
+ end
11
+
12
+ I18n.load_path = Dir.glob("#{RAILS_ROOT}/config/locales/*") + Dir.glob("#{BrI18n::I18N_FILES}/*")
13
+ I18n.default_locale = 'pt-BR'
@@ -0,0 +1,128 @@
1
+ pt-BR:
2
+ # formatos de data e hora
3
+ date:
4
+ formats:
5
+ default: "%d/%m/%Y"
6
+ short: "%d de %B"
7
+ long: "%d de %B de %Y"
8
+ only_day: "%d"
9
+
10
+ day_names: [Domingo, Segunda, Terça, Quarta, Quinta, Sexta, Sábado]
11
+ abbr_day_names: [Dom, Seg, Ter, Qua, Qui, Sex, Sáb]
12
+ month_names: [~, Janeiro, Fevereiro, Março, Abril, Maio, Junho, Julho, Agosto, Setembro, Outubro, Novembro, Dezembro]
13
+ abbr_month_names: [~, Jan, Fev, Mar, Abr, Mai, Jun, Jul, Ago, Set, Out, Nov, Dez]
14
+ order: [:day, :month, :year]
15
+
16
+ time:
17
+ formats:
18
+ default: "%A, %d de %B de %Y, %H:%M hs"
19
+ time: "%H:%M hs"
20
+ short: "%d/%m, %H:%M hs"
21
+ long: "%A, %d de %B de %Y, %H:%M hs"
22
+ only_second: "%S"
23
+ datetime:
24
+ formats:
25
+ default: "%Y-%m-%dT%H:%M:%S%Z"
26
+ am: ''
27
+ pm: ''
28
+
29
+ # date helper distanci em palavras
30
+ datetime:
31
+ distance_in_words:
32
+ half_a_minute: 'meio minuto'
33
+ less_than_x_seconds:
34
+ one: 'menos de 1 segundo'
35
+ other: 'menos de {{count}} segundos'
36
+
37
+ x_seconds:
38
+ one: '1 segundo'
39
+ other: '{{count}} segundos'
40
+
41
+ less_than_x_minutes:
42
+ one: 'menos de um minuto'
43
+ other: 'menos de {{count}} minutos'
44
+
45
+ x_minutes:
46
+ one: '1 minuto'
47
+ other: '{{count}} minutos'
48
+
49
+ about_x_hours:
50
+ one: 'aproximadamente 1 hora'
51
+ other: 'aproximadamente {{count}} horas'
52
+
53
+ x_days:
54
+ one: '1 dia'
55
+ other: '{{count}} dias'
56
+
57
+ about_x_months:
58
+ one: 'aproximadamente 1 mês'
59
+ other: 'aproximadamente {{count}} meses'
60
+
61
+ x_months:
62
+ one: '1 mês'
63
+ other: '{{count}} meses'
64
+
65
+ about_x_years:
66
+ one: 'aproximadamente 1 ano'
67
+ other: 'aproximadamente {{count}} anos'
68
+
69
+ over_x_years:
70
+ one: 'mais de 1 ano'
71
+ other: 'mais de {{count}} anos'
72
+
73
+ # numeros
74
+ number:
75
+ format:
76
+ precision: 3
77
+ separator: ','
78
+ delimiter: '.'
79
+ currency:
80
+ format:
81
+ unit: 'R$'
82
+ precision: 2
83
+ format: '%u %n'
84
+ separator: ','
85
+ delimiter: '.'
86
+ percentage:
87
+ format:
88
+ delimiter: '.'
89
+ precision:
90
+ format:
91
+ delimiter: '.'
92
+ human:
93
+ format:
94
+ precision: 1
95
+ delimiter: '.'
96
+ support:
97
+ array:
98
+ sentence_connector: "e"
99
+ skip_last_comma: true
100
+
101
+ # Active Record
102
+ activerecord:
103
+ errors:
104
+ template:
105
+ header:
106
+ one: "Nãa pôde ser salvo: 1 erro"
107
+ other: "Não pôde ser salvo: {{count}} erros."
108
+ body: "Por favor, cheque os seguintes campos:"
109
+ messages:
110
+ inclusion: "não está incluso na lista"
111
+ exclusion: "não está disponível"
112
+ invalid: "não é válido"
113
+ confirmation: "não bate com a confirmação"
114
+ accepted: "precisa ser aceito"
115
+ empty: "não pode ser vazio"
116
+ blank: "não pode ser vazio"
117
+ too_long: "é muito longo (não mais do que {{count}} caracteres)"
118
+ too_short: "é muito curto (não menos do que {{count}} caracteres)"
119
+ wrong_length: "não é do tamanho correto (precisa ter {{count}} caracteres)"
120
+ taken: "não está disponível"
121
+ not_a_number: "não é um número"
122
+ greater_than: "precisa ser maior do que {{count}}"
123
+ greater_than_or_equal_to: "precisa ser maior ou igual a {{count}}"
124
+ equal_to: "precisa ser igual a {{count}}"
125
+ less_than: "precisa ser menor do que {{count}}"
126
+ less_than_or_equal_to: "precisa ser menor ou igual a {{count}}"
127
+ odd: "precisa ser ímpar"
128
+ even: "precisa ser par"
metadata ADDED
@@ -0,0 +1,93 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: brI18n
3
+ version: !ruby/object:Gem::Version
4
+ version: 2.1.2
5
+ platform: ruby
6
+ authors:
7
+ - "Marcos Tapaj\xC3\xB3s"
8
+ - Celestino Gomes
9
+ - Andre Kupkosvki
10
+ - "Vin\xC3\xADcius Teles"
11
+ autorequire:
12
+ bindir: bin
13
+ cert_chain: []
14
+
15
+ date: 2009-03-03 00:00:00 -03:00
16
+ default_executable:
17
+ dependencies:
18
+ - !ruby/object:Gem::Dependency
19
+ name: actionpack
20
+ type: :runtime
21
+ version_requirement:
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 1.4.2
27
+ version:
28
+ - !ruby/object:Gem::Dependency
29
+ name: activerecord
30
+ type: :runtime
31
+ version_requirement:
32
+ version_requirements: !ruby/object:Gem::Requirement
33
+ requirements:
34
+ - - ">="
35
+ - !ruby/object:Gem::Version
36
+ version: 1.15.3
37
+ version:
38
+ - !ruby/object:Gem::Dependency
39
+ name: activesupport
40
+ type: :runtime
41
+ version_requirement:
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: 1.4.2
47
+ version:
48
+ description: "brtraducao \xC3\xA9 uma das gems que compoem o Brazilian Rails"
49
+ email: tapajos@gmail.com
50
+ executables: []
51
+
52
+ extensions: []
53
+
54
+ extra_rdoc_files: []
55
+
56
+ files:
57
+ - Rakefile
58
+ - README
59
+ - CHANGELOG
60
+ - MIT-LICENSE
61
+ - lib/brI18n
62
+ - lib/brI18n/version.rb
63
+ - lib/brI18n.rb
64
+ - lib/files
65
+ - lib/files/pt-BR.yml
66
+ has_rdoc: true
67
+ homepage: http://www.improveit.com.br/software_livre/brazilian_rails
68
+ post_install_message:
69
+ rdoc_options: []
70
+
71
+ require_paths:
72
+ - lib
73
+ required_ruby_version: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - ">="
76
+ - !ruby/object:Gem::Version
77
+ version: "0"
78
+ version:
79
+ required_rubygems_version: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: "0"
84
+ version:
85
+ requirements:
86
+ - none
87
+ rubyforge_project: brtraducao
88
+ rubygems_version: 1.3.1
89
+ signing_key:
90
+ specification_version: 2
91
+ summary: "brtraducao \xC3\xA9 uma das gems que compoem o Brazilian Rails"
92
+ test_files: []
93
+