zero_generators 0.0.1
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/README +38 -0
- data/generators/default_values.rb +21 -0
- data/generators/factory_scaffold/USAGE +15 -0
- data/generators/factory_scaffold/factory_scaffold_generator.rb +27 -0
- data/generators/factory_scaffold/templates/controller_spec.rb.erb +135 -0
- data/generators/factory_scaffold/templates/helper_spec.rb.erb +5 -0
- data/generators/factory_scaffold/templates/model_spec.rb.erb +8 -0
- data/generators/ferret_scaffold/USAGE +12 -0
- data/generators/ferret_scaffold/ferret_scaffold_generator.rb +92 -0
- data/generators/ferret_scaffold/templates/controller.rb.erb +128 -0
- data/generators/ferret_scaffold/templates/controller_spec.rb.erb +155 -0
- data/generators/ferret_scaffold/templates/helper.rb.erb +2 -0
- data/generators/ferret_scaffold/templates/helper_spec.rb.erb +7 -0
- data/generators/ferret_scaffold/templates/migration.rb.erb +20 -0
- data/generators/ferret_scaffold/templates/model.rb.erb +8 -0
- data/generators/ferret_scaffold/templates/model_spec.rb.erb +28 -0
- data/generators/ferret_scaffold/templates/views/_dados_busca.html.erb +11 -0
- data/generators/ferret_scaffold/templates/views/_dados_model.html.erb +8 -0
- data/generators/ferret_scaffold/templates/views/edit.html.erb +13 -0
- data/generators/ferret_scaffold/templates/views/index.html.erb +11 -0
- data/generators/ferret_scaffold/templates/views/layout.html.erb +18 -0
- data/generators/ferret_scaffold/templates/views/new.html.erb +12 -0
- data/generators/ferret_scaffold/templates/views/show.html.erb +16 -0
- data/generators/layout/USAGE +10 -0
- data/generators/layout/layout_generator.rb +22 -0
- data/generators/layout/templates/README +7 -0
- data/generators/layout/templates/layout.html.erb +26 -0
- data/generators/layout/templates/pt_BR.yml +109 -0
- data/generators/layout/templates/stylesheet.css +60 -0
- data/generators/tdd_controller/USAGE +9 -0
- data/generators/tdd_controller/tdd_controller_generator.rb +15 -0
- data/generators/tdd_controller/templates/controller_spec.rb.erb +29 -0
- data/generators/tdd_model/USAGE +10 -0
- data/generators/tdd_model/tdd_model_generator.rb +17 -0
- data/generators/tdd_model/templates/model_spec.rb.erb +24 -0
- data/generators/tdd_scaffold/USAGE +11 -0
- data/generators/tdd_scaffold/tdd_scaffold_generator.rb +32 -0
- data/generators/tdd_scaffold/templates/controller_spec.rb.erb +125 -0
- data/generators/tdd_scaffold/templates/helper_spec.rb.erb +7 -0
- data/generators/tdd_scaffold/templates/model_spec.rb.erb +28 -0
- data/generators/tdd_scaffold_stub/USAGE +17 -0
- data/generators/tdd_scaffold_stub/tdd_scaffold_stub_generator.rb +40 -0
- data/generators/tdd_scaffold_stub/templates/controller_spec.rb.erb +157 -0
- data/generators/tdd_scaffold_stub/templates/edit.html.erb_spec.rb.erb +14 -0
- data/generators/tdd_scaffold_stub/templates/helper_spec.rb.erb +7 -0
- data/generators/tdd_scaffold_stub/templates/index.html.erb_spec.rb.erb +14 -0
- data/generators/tdd_scaffold_stub/templates/model_spec.rb.erb +24 -0
- data/generators/tdd_scaffold_stub/templates/new.html.erb_spec.rb.erb +12 -0
- data/generators/tdd_scaffold_stub/templates/show.html.erb_spec.rb.erb +14 -0
- metadata +112 -0
@@ -0,0 +1,155 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
|
2
|
+
|
3
|
+
describe <%= class_plural %>Controller do
|
4
|
+
fixtures :<%= file_plural %>
|
5
|
+
integrate_views
|
6
|
+
|
7
|
+
before(:each) do
|
8
|
+
@<%= file_name %> = <%= class_name %>.first
|
9
|
+
end
|
10
|
+
|
11
|
+
describe 'respondendo por GET' do
|
12
|
+
it 'deve expor todos os registros na ação index, ou um XML no REST' do
|
13
|
+
get :index
|
14
|
+
response.should be_success
|
15
|
+
|
16
|
+
get :index, :format => 'xml'
|
17
|
+
response.body.should match(/xml version/i)
|
18
|
+
end
|
19
|
+
|
20
|
+
it 'deve buscar os dados no REST com ferret' do
|
21
|
+
<%= class_name %>.should_receive(:find_with_ferret).with(@<%= file_name %>.<%= attributes[0].name %>).and_return([@<%= file_name %>])
|
22
|
+
get :index, :format => 'xml', :busca => @<%= file_name %>.<%= attributes[0].name %>
|
23
|
+
response.body.should match(/xml version/i)
|
24
|
+
response.body.should match(/#{@<%= file_name %>.<%= attributes[0].name %>}/)
|
25
|
+
end
|
26
|
+
|
27
|
+
it 'deve expor o registro na tela edit' do
|
28
|
+
get :edit, :id => @<%= file_name %>.id
|
29
|
+
response.should be_success
|
30
|
+
end
|
31
|
+
|
32
|
+
it 'deve expor o registro na tela show, ou um XML no REST' do
|
33
|
+
get :show, :id => @<%= file_name %>.id
|
34
|
+
response.should be_success
|
35
|
+
|
36
|
+
get :show, :id => @<%= file_name %>.id, :format => 'xml'
|
37
|
+
response.body.should match(/xml version/i)
|
38
|
+
end
|
39
|
+
|
40
|
+
it 'deve expor o registro na tela new' do
|
41
|
+
get :new
|
42
|
+
response.should be_success
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
describe 'quando estiver fazendo uma busca' do
|
47
|
+
it 'deve exibir o <%= file_name %> que for encontrado' do
|
48
|
+
<%= class_name %>.should_receive(:find_with_ferret).with(@<%= file_name %>.<%= attributes[0].name %>).and_return([@<%= file_name %>])
|
49
|
+
post :buscar, :busca => @<%= file_name %>.<%= attributes[0].name %>
|
50
|
+
response.should have_text(/#{@<%= file_name %>.<%= attributes[0].name %>}/)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
describe 'respondendo ao POST ou ao PUT' do
|
55
|
+
before do
|
56
|
+
<%= class_name %>.stub!(:find).and_return(@<%= file_name %>)
|
57
|
+
<%= class_name %>.stub!(:new).and_return(@<%= file_name %>)
|
58
|
+
@params = { :<%= file_name %> => @<%= file_name %>.attributes }
|
59
|
+
end
|
60
|
+
|
61
|
+
describe 'quando tiver atributos válidos' do
|
62
|
+
it 'deve criar um novo registro e redirecionar para ele após chamar o create' do
|
63
|
+
@<%= file_name %>.should_receive(:save).and_return(true)
|
64
|
+
post :create, @params
|
65
|
+
response.should redirect_to(<%= file_name %>_url(@<%= file_name %>))
|
66
|
+
end
|
67
|
+
|
68
|
+
it 'deve criar um novo registro após chamar o create com REST' do
|
69
|
+
@<%= file_name %>.should_receive(:save).and_return(true)
|
70
|
+
post :create, @params.merge(:format => 'xml')
|
71
|
+
response.response_code.should == 201
|
72
|
+
response.body.should match(/xml version/i)
|
73
|
+
response.location.should == <%= file_name %>_url(@<%= file_name %>)
|
74
|
+
end
|
75
|
+
|
76
|
+
it 'deve atualizar um registro e redirecionar para ele após chamar o update' do
|
77
|
+
@<%= file_name %>.should_receive(:update_attributes).and_return(true)
|
78
|
+
put :update, @params
|
79
|
+
response.should redirect_to(<%= file_name %>_url(@<%= file_name %>))
|
80
|
+
end
|
81
|
+
|
82
|
+
it 'deve atualizar um registro após chamar o update com REST' do
|
83
|
+
@<%= file_name %>.should_receive(:update_attributes).and_return(true)
|
84
|
+
put :update, @params.merge(:format => 'xml')
|
85
|
+
response.should be_success
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
describe 'quando tiver atributos inválidos' do
|
90
|
+
before(:each) do
|
91
|
+
@<%= file_name %>.errors.add(:atributo, 'possui um erro')
|
92
|
+
end
|
93
|
+
|
94
|
+
it 'deve renderizar novamente a ação new, após chamar o create' do
|
95
|
+
@<%= file_name %>.should_receive(:save).and_return(false)
|
96
|
+
post :create, @params
|
97
|
+
response.should be_success
|
98
|
+
response.should render_template('new')
|
99
|
+
response.body.should match(/atributo possui um erro/i)
|
100
|
+
end
|
101
|
+
|
102
|
+
it 'deve renderizar um XML de erros após chamar o create com REST' do
|
103
|
+
@<%= file_name %>.should_receive(:save).and_return(false)
|
104
|
+
post :create, @params.merge(:format => 'xml')
|
105
|
+
response.response_code.should == 422
|
106
|
+
ActiveResource::Formats::XmlFormat.decode(response.body).should == { 'error' => 'Atributo possui um erro' }
|
107
|
+
end
|
108
|
+
|
109
|
+
it 'deve renderizar novamente a ação edit após chamar o update' do
|
110
|
+
@<%= file_name %>.should_receive(:update_attributes).and_return(false)
|
111
|
+
put :update, @params
|
112
|
+
response.should be_success
|
113
|
+
response.should render_template('edit')
|
114
|
+
end
|
115
|
+
|
116
|
+
it 'deve renderizar um XML de erros após chamar o update com REST' do
|
117
|
+
@<%= file_name %>.should_receive(:update_attributes).and_return(false)
|
118
|
+
put :update, @params.merge(:format => 'xml')
|
119
|
+
response.response_code.should == 422
|
120
|
+
ActiveResource::Formats::XmlFormat.decode(response.body).should == { 'error' => 'Atributo possui um erro' }
|
121
|
+
end
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
125
|
+
describe 'respondendo ao DELETE' do
|
126
|
+
it 'deve deletar um registro após chamar o destroy e redirecionar para a listagem de <%= file_plural %>' do
|
127
|
+
antes = <%= class_name %>.all.size
|
128
|
+
delete :destroy, :id => @<%= file_name %>.id
|
129
|
+
response.should redirect_to(<%= file_plural %>_url)
|
130
|
+
<%= class_name %>.all.size.should == antes - 1
|
131
|
+
end
|
132
|
+
|
133
|
+
it 'deve dar um erro ao tentar deletar um registro com dependências' do
|
134
|
+
<%= class_name %>.stub!(:find).and_return(@<%= file_name %>)
|
135
|
+
@<%= file_name %>.stub!(:destroy).and_return(false)
|
136
|
+
delete :destroy, :id => @<%= file_name %>.id
|
137
|
+
response.should redirect_to(<%= file_plural %>_url)
|
138
|
+
end
|
139
|
+
|
140
|
+
it 'deve deletar um registro após chamar o destroy com REST' do
|
141
|
+
antes = <%= class_name %>.all.size
|
142
|
+
delete :destroy, :id => @<%= file_name %>.id, :format => 'xml'
|
143
|
+
response.should be_success
|
144
|
+
<%= class_name %>.all.size.should == antes - 1
|
145
|
+
end
|
146
|
+
|
147
|
+
it 'deve dar um erro ao tentar deletar um registro com dependências (no REST)' do
|
148
|
+
<%= class_name %>.stub!(:find).and_return(@<%= file_name %>)
|
149
|
+
@<%= file_name %>.stub!(:destroy).and_return(false)
|
150
|
+
delete :destroy, :id => @<%= file_name %>.id, :format => 'xml'
|
151
|
+
response.response_code.should == 422
|
152
|
+
end
|
153
|
+
|
154
|
+
end
|
155
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
class <%= migration_name %> < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :<%= file_plural %> do |t|
|
4
|
+
<% for attribute in attributes -%>
|
5
|
+
t.<%= attribute.type %> :<%= attribute.name %>
|
6
|
+
<% end -%>
|
7
|
+
|
8
|
+
<% unless options[:skip_lock] -%>
|
9
|
+
t.integer :lock_version, :default => 0
|
10
|
+
<% end -%>
|
11
|
+
<% unless options[:skip_timestamps] -%>
|
12
|
+
t.timestamps
|
13
|
+
<% end -%>
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
def self.down
|
18
|
+
drop_table :<%= table_name %>
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
|
2
|
+
|
3
|
+
describe <%= class_name %> do
|
4
|
+
before(:each) do
|
5
|
+
@validos = {
|
6
|
+
<% attributes.each do |atributo|
|
7
|
+
if(atributo.type == :references) -%>
|
8
|
+
:<%= atributo.name %>_id => 1,
|
9
|
+
<% else -%>
|
10
|
+
:<%= atributo.name %> => <%= atributo.default_value %>,
|
11
|
+
<% end -%>
|
12
|
+
<% end -%>
|
13
|
+
}
|
14
|
+
end
|
15
|
+
|
16
|
+
it "deve ser criado se forem passados atributos válidos" do
|
17
|
+
<%= class_name %>.create!(@validos)
|
18
|
+
end
|
19
|
+
|
20
|
+
it 'deve validar a presença de determinados atributos' do
|
21
|
+
@<%= class_name.underscore %> = <%= class_name %>.create
|
22
|
+
|
23
|
+
#Coloque os atributos que devem ser checados no array a seguir
|
24
|
+
[].each do |atributo|
|
25
|
+
@<%= class_name.underscore %>.should have(1).error_on(atributo)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<table border='0'>
|
2
|
+
|
3
|
+
<%% @<%= file_plural %>.each do |<%= file_name %>| %>
|
4
|
+
<tr>
|
5
|
+
<th><%%= link_to h(<%= file_name %>.<%= attributes[0].name %>), <%= file_name %> %></th>
|
6
|
+
<td><%%= link_to 'Editar', edit_<%= file_name %>_path(<%= file_name %>) %></td>
|
7
|
+
<td><%%= link_to 'Deletar', <%= file_name %>, :confirm => 'Você está prestes a deletar este <%= file_name %>. Tem certeza?', :method => :delete %></td>
|
8
|
+
</tr>
|
9
|
+
<%% end %>
|
10
|
+
</table>
|
11
|
+
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<%%= f.hidden_field :lock_version %>
|
2
|
+
|
3
|
+
<% attributes.each do |atributo| -%>
|
4
|
+
<p>
|
5
|
+
<%%= f.label :<%= atributo.name %>, '<%= atributo.name.humanize %>:' %> <%= if(atributo.type == :text) then '<br />' end %>
|
6
|
+
<%%= f.<%= atributo.field_type %> :<%= atributo.name %> %>
|
7
|
+
</p>
|
8
|
+
<% end %>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<h2>Editando <%= file_name %></h2>
|
2
|
+
|
3
|
+
<%% form_for(@<%= file_name %>) do |f| %>
|
4
|
+
<%%= f.error_messages %>
|
5
|
+
|
6
|
+
<%%= render :partial => 'dados_<%= file_name %>', :locals => { :f => f } %>
|
7
|
+
<p>
|
8
|
+
<%%= f.submit 'Atualizar' %>
|
9
|
+
</p>
|
10
|
+
<%% end %>
|
11
|
+
|
12
|
+
<%%= link_to 'Mostrar <%= file_name %>', @<%= file_name %> %> |
|
13
|
+
<%%= link_to 'Voltar para a listagem de <%= file_plural %>', <%= file_plural %>_path %>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<h2><%= class_plural %></h2>
|
2
|
+
|
3
|
+
<%% form_remote_tag :url => { :action => 'buscar' }, :update => 'dados_busca' do %>
|
4
|
+
<p><b>Busca: </b><%%= text_field_tag 'busca' %> <%%= submit_tag 'Buscar' %></p>
|
5
|
+
<%% end %>
|
6
|
+
|
7
|
+
<div id='dados_busca'>
|
8
|
+
</div>
|
9
|
+
|
10
|
+
|
11
|
+
<%%= link_to 'Novo <%= file_name %>', new_<%= file_name %>_path %>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
|
4
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
5
|
+
<head>
|
6
|
+
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
|
7
|
+
<title>Alunos: <%= controller.action_name %></title>
|
8
|
+
<%= stylesheet_link_tag 'scaffold' %>
|
9
|
+
<%= javascript_include_tag :all %>
|
10
|
+
</head>
|
11
|
+
<body>
|
12
|
+
|
13
|
+
<p style="color: green"><%= flash[:notice] %></p>
|
14
|
+
|
15
|
+
<%= yield %>
|
16
|
+
|
17
|
+
</body>
|
18
|
+
</html>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<h2>Novo <%= file_name %></h2>
|
2
|
+
|
3
|
+
<%% form_for(@<%= file_name %>) do |f| %>
|
4
|
+
<%%= f.error_messages %>
|
5
|
+
|
6
|
+
<%%= render :partial => 'dados_<%= file_name %>', :locals => { :f => f } %>
|
7
|
+
<p>
|
8
|
+
<%%= f.submit 'Criar' %>
|
9
|
+
</p>
|
10
|
+
<%% end %>
|
11
|
+
|
12
|
+
<%%= link_to 'Voltar para a listagem de <%= file_plural %>', <%= file_plural %>_path %>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<% attributes.each do |atributo| -%>
|
2
|
+
<p>
|
3
|
+
<b><%= atributo.name.humanize %>:</b>
|
4
|
+
<%%=<%= case atributo.type
|
5
|
+
when :date, :datetime, :timestamp, :time
|
6
|
+
'l'
|
7
|
+
else
|
8
|
+
'h'
|
9
|
+
end
|
10
|
+
%> @<%= file_name %>.<%= atributo.name %> %>
|
11
|
+
</p>
|
12
|
+
|
13
|
+
<% end -%>
|
14
|
+
|
15
|
+
<%%= link_to 'Editar', edit_<%= file_name %>_path(@<%= file_name %>) %> |
|
16
|
+
<%%= link_to 'Voltar para a listagem', <%= file_plural %>_path %>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
Cria um layout para o rails, e altera o Environment para acertar as opções para o idioma Brasil - Padrão.
|
2
|
+
|
3
|
+
Exemplo:
|
4
|
+
script/generate layout
|
5
|
+
|
6
|
+
Isso irá gerar:
|
7
|
+
app/views/layouts/application.html.erb
|
8
|
+
public/stylesheets/scaffold.css
|
9
|
+
config/locales/pt_BR.yml
|
10
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
class LayoutGenerator < Rails::Generator::Base
|
2
|
+
def manifest
|
3
|
+
record do |m|
|
4
|
+
m.directory 'app/views'
|
5
|
+
m.directory 'app/views/layouts'
|
6
|
+
m.file 'layout.html.erb', 'app/views/layouts/application.html.erb'
|
7
|
+
|
8
|
+
m.directory 'public/stylesheets'
|
9
|
+
m.file 'stylesheet.css', 'public/stylesheets/style.css'
|
10
|
+
|
11
|
+
m.directory 'config/locales'
|
12
|
+
m.file 'pt_BR.yml', 'config/locales/pt_BR.yml'
|
13
|
+
|
14
|
+
m.readme 'README'
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
protected
|
19
|
+
def banner
|
20
|
+
"Uso: #{$0} layout"
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
Para adicionar suporte às mensagem em português e resolver problemas com as rotas,
|
4
|
+
adicione as seguintes linhas no seu environment.rb:
|
5
|
+
|
6
|
+
config.i18n.default_locale = :pt_BR
|
7
|
+
config.action_controller.resources_path_names = { :new => 'novo', :edit => 'editar' }
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml"
|
4
|
+
xml:lang="en" lang="en">
|
5
|
+
<head>
|
6
|
+
<meta http-equiv="Content-type"
|
7
|
+
content="text/html; charset=utf-8" />
|
8
|
+
<title>DEFINA SEU SISTEMA AQUI</title>
|
9
|
+
<%= stylesheet_link_tag 'style' %>
|
10
|
+
<%= javascript_include_tag :all %>
|
11
|
+
<%= javascript_include_tag :defaults %>
|
12
|
+
</head>
|
13
|
+
<body>
|
14
|
+
<p style="color: green"><%= flash[:notice] %></p>
|
15
|
+
<div id="logout">
|
16
|
+
<% if session[:usuario] %>
|
17
|
+
Logado como:
|
18
|
+
<%= session[:usuario] %>
|
19
|
+
<em><%= link_to "(deslogar)", :controller => :login, :action => :deslogar %></em>
|
20
|
+
<% end %>
|
21
|
+
</div>
|
22
|
+
<div id="conteudo">
|
23
|
+
<%= yield %>
|
24
|
+
</div>
|
25
|
+
</body>
|
26
|
+
</html>
|
@@ -0,0 +1,109 @@
|
|
1
|
+
pt_BR:
|
2
|
+
# formatos de data e hora
|
3
|
+
date:
|
4
|
+
formats:
|
5
|
+
default: "%d/%m/%Y"
|
6
|
+
short: "%d %b"
|
7
|
+
long: "%d de %B de %Y"
|
8
|
+
only_day: "%e"
|
9
|
+
day_names: [Domingo, Segunda, Terça, Quarta, Quinta, Sexta, Sábado]
|
10
|
+
abbr_day_names: [Dom, Seg, Ter, Qua, Qui, Sex, Sáb]
|
11
|
+
month_names: [~, Janeiro, Fevereiro, Março, Abril, Maio, Junho, Julho, Agosto, Setembro, Outubro, Novembro, Dezembro]
|
12
|
+
abbr_month_names: [~, Jan, Fev, Mar, Abr, Mai, Jun, Jul, Ago, Set, Out, Nov, Dez]
|
13
|
+
order: [:day, :month, :year]
|
14
|
+
|
15
|
+
time:
|
16
|
+
formats:
|
17
|
+
default: "%A, %d de %B de %Y, %H:%M"
|
18
|
+
time: "%H:%M hs"
|
19
|
+
short: "%d/%m/%Y, %H:%M hs"
|
20
|
+
long: "%A, %d de %B de %Y, %H:%M"
|
21
|
+
only_second: "%S"
|
22
|
+
am: ""
|
23
|
+
pm: ""
|
24
|
+
|
25
|
+
# date helper distanci em palavras
|
26
|
+
datetime:
|
27
|
+
distance_in_words:
|
28
|
+
half_a_minute: 'meio minuto'
|
29
|
+
less_than_x_seconds:
|
30
|
+
one: 'menos de 1 segundo'
|
31
|
+
other: 'menos de {{count}} segundos'
|
32
|
+
|
33
|
+
x_seconds:
|
34
|
+
one: '1 segundo'
|
35
|
+
other: '{{count}} segundos'
|
36
|
+
|
37
|
+
less_than_x_minutes:
|
38
|
+
one: 'menos de um minuto'
|
39
|
+
other: 'menos de {{count}} minutos'
|
40
|
+
|
41
|
+
x_minutes:
|
42
|
+
one: '1 minuto'
|
43
|
+
other: '{{count}} minutos'
|
44
|
+
|
45
|
+
about_x_hours:
|
46
|
+
one: 'aproximadamente 1 hora'
|
47
|
+
other: 'aproximadamente {{count}} horas'
|
48
|
+
|
49
|
+
x_days:
|
50
|
+
one: '1 dia'
|
51
|
+
other: '{{count}} dias'
|
52
|
+
|
53
|
+
about_x_months:
|
54
|
+
one: 'aproximadamente 1 mês'
|
55
|
+
other: 'aproximadamente {{count}} meses'
|
56
|
+
|
57
|
+
x_months:
|
58
|
+
one: '1 mês'
|
59
|
+
other: '{{count}} meses'
|
60
|
+
|
61
|
+
about_x_years:
|
62
|
+
one: 'aproximadamente 1 ano'
|
63
|
+
other: 'aproximadamente {{count}} anos'
|
64
|
+
|
65
|
+
over_x_years:
|
66
|
+
one: 'mais de 1 ano'
|
67
|
+
other: 'mais de {{count}} anos'
|
68
|
+
|
69
|
+
# numeros
|
70
|
+
number:
|
71
|
+
format:
|
72
|
+
precision: 3
|
73
|
+
separator: ','
|
74
|
+
delimiter: '.'
|
75
|
+
|
76
|
+
currency:
|
77
|
+
format:
|
78
|
+
unit: 'R$'
|
79
|
+
precision: 2
|
80
|
+
format: '%u %n'
|
81
|
+
|
82
|
+
# Active Record
|
83
|
+
activerecord:
|
84
|
+
errors:
|
85
|
+
template:
|
86
|
+
header:
|
87
|
+
one: "Seus dados não puderam ser salvos: 1 erro"
|
88
|
+
other: "Seus dados não puderam ser salvos: {{count}} erros."
|
89
|
+
body: "Por favor, cheque os seguintes campos:"
|
90
|
+
messages:
|
91
|
+
inclusion: "não está incluso na lista"
|
92
|
+
exclusion: "não está disponível"
|
93
|
+
invalid: "não é válido"
|
94
|
+
confirmation: "não bate com a confirmação"
|
95
|
+
accepted: "precisa ser aceito"
|
96
|
+
empty: "não pode estar vazio"
|
97
|
+
blank: "não pode estar em branco"
|
98
|
+
too_long: "é muito longo (não mais do que {{count}} caracteres)"
|
99
|
+
too_short: "é muito curto (não menos do que {{count}} caracteres)"
|
100
|
+
wrong_length: "não é do tamanho correto (precisa ter {{count}} caracteres)"
|
101
|
+
taken: "não está disponível"
|
102
|
+
not_a_number: "não é um número"
|
103
|
+
greater_than: "precisa ser maior do que {{count}}"
|
104
|
+
greater_than_or_equal_to: "precisa ser maior ou igual a {{count}}"
|
105
|
+
equal_to: "precisa ser igual a {{count}}"
|
106
|
+
less_than: "precisa ser menor do que {{count}}"
|
107
|
+
less_than_or_equal_to: "precisa ser menor ou igual a {{count}}"
|
108
|
+
odd: "precisa ser ímpar"
|
109
|
+
even: "precisa ser par"
|