Created
January 28, 2014 17:08
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
doctype html | |
html | |
head | |
meta name="viewport" content="width=device-width, initial-scale=1.0" | |
title Paporeto | |
= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true | |
= csrf_meta_tags | |
/[if lt IE 9] | |
= javascript_include_tag "html5shiv", "data-turbolinks-track" => true | |
= javascript_include_tag "respond.min", "data-turbolinks-track" => true | |
body | |
.navbar.navbar-inverse.navbar-fixed-top | |
.container | |
.navbar-header | |
= link_to 'Paporeto', root_path, class: 'navbar-brand' | |
.navbar-collapse | |
ul.nav.navbar-nav | |
li class="#{nav_status('articles')}" = link_to 'Artigos', articles_path | |
li class="#{nav_status('categories')}" = link_to 'Categorias', categories_path | |
.container | |
.pull-right = today | |
h3 = maybe_friday | |
= yield | |
= javascript_include_tag "application", "data-turbolinks-track" => true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ApplicationHelper | |
def today | |
localize Date.today, format: :today | |
end | |
def time_to_read(text) | |
time = text.split.size / 180.0 | |
distance_of_time_in_words(time.minutes) | |
end | |
def nav_status(controller) | |
if params[:controller] == controller | |
'active' | |
end | |
end | |
def maybe_friday | |
if Date.today.friday? | |
'Uhuuu!!!' | |
else | |
'É quase sexta' | |
end | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pt-BR: | |
date: | |
abbr_day_names: | |
- Dom | |
- Seg | |
- Ter | |
- Qua | |
- Qui | |
- Sex | |
- Sáb | |
abbr_month_names: | |
- | |
- Jan | |
- Fev | |
- Mar | |
- Abr | |
- Mai | |
- Jun | |
- Jul | |
- Ago | |
- Set | |
- Out | |
- Nov | |
- Dez | |
day_names: | |
- Domingo | |
- Segunda | |
- Terça | |
- Quarta | |
- Quinta | |
- Sexta | |
- Sábado | |
formats: | |
default: ! '%d/%m/%Y' | |
long: ! '%d de %B de %Y' | |
complete: ! '%A %d de %B de %Y' | |
short: ! '%d de %B' | |
today: ! '%A, %d de %B' | |
month_names: | |
- | |
- Janeiro | |
- Fevereiro | |
- Março | |
- Abril | |
- Maio | |
- Junho | |
- Julho | |
- Agosto | |
- Setembro | |
- Outubro | |
- Novembro | |
- Dezembro | |
order: | |
- :day | |
- :month | |
- :year | |
datetime: | |
distance_in_words: | |
about_x_hours: | |
one: aproximadamente 1 hora | |
other: aproximadamente %{count} horas | |
about_x_months: | |
one: aproximadamente 1 mês | |
other: aproximadamente %{count} meses | |
about_x_years: | |
one: aproximadamente 1 ano | |
other: aproximadamente %{count} anos | |
almost_x_years: | |
one: quase 1 ano | |
other: quase %{count} anos | |
half_a_minute: meio minuto | |
less_than_x_minutes: | |
one: menos de um minuto | |
other: menos de %{count} minutos | |
less_than_x_seconds: | |
one: menos de 1 segundo | |
other: menos de %{count} segundos | |
over_x_years: | |
one: mais de 1 ano | |
other: mais de %{count} anos | |
x_days: | |
one: 1 dia | |
other: ! '%{count} dias' | |
x_minutes: | |
one: 1 minuto | |
other: ! '%{count} minutos' | |
x_months: | |
one: 1 mês | |
other: ! '%{count} meses' | |
x_seconds: | |
one: 1 segundo | |
other: ! '%{count} segundos' | |
prompts: | |
day: Dia | |
hour: Hora | |
minute: Minuto | |
month: Mês | |
second: Segundo | |
year: Ano | |
errors: &errors | |
format: ! '%{attribute} %{message}' | |
messages: | |
accepted: deve ser aceito | |
blank: não pode ficar em branco | |
confirmation: não está de acordo com a confirmação | |
empty: não pode ficar vazio | |
equal_to: deve ser igual a %{count} | |
even: deve ser par | |
exclusion: não está disponível | |
greater_than: deve ser maior que %{count} | |
greater_than_or_equal_to: deve ser maior ou igual a %{count} | |
inclusion: não está incluído na lista | |
invalid: não é válido | |
less_than: deve ser menor que %{count} | |
less_than_or_equal_to: deve ser menor ou igual a %{count} | |
not_a_number: não é um número | |
not_an_integer: não é um número inteiro | |
odd: deve ser ímpar | |
record_invalid: ! 'A validação falhou: %{errors}' | |
taken: já está em uso | |
too_long: ! 'é muito longo (máximo: %{count} caracteres)' | |
too_short: ! 'é muito curto (mínimo: %{count} caracteres)' | |
wrong_length: não possui o tamanho esperado (%{count} caracteres) | |
template: | |
body: ! 'Por favor, verifique o(s) seguinte(s) campo(s):' | |
header: | |
one: ! 'Não foi possível gravar %{model}: 1 erro' | |
other: ! 'Não foi possível gravar %{model}: %{count} erros.' | |
helpers: | |
select: | |
prompt: Por favor selecione | |
submit: | |
create: Criar %{model} | |
submit: Salvar %{model} | |
update: Atualizar %{model} | |
number: | |
currency: | |
format: | |
delimiter: . | |
format: ! '%u %n' | |
precision: 2 | |
separator: ! ',' | |
significant: false | |
strip_insignificant_zeros: false | |
unit: R$ | |
format: | |
delimiter: . | |
precision: 3 | |
separator: ! ',' | |
significant: false | |
strip_insignificant_zeros: false | |
human: | |
decimal_units: | |
format: ! '%n %u' | |
units: | |
billion: | |
one: bilhão | |
other: bilhões | |
million: | |
one: milhão | |
other: milhões | |
quadrillion: | |
one: quatrilhão | |
other: quatrilhões | |
thousand: mil | |
trillion: | |
one: trilhão | |
other: trilhões | |
unit: '' | |
format: | |
delimiter: . | |
precision: 2 | |
significant: true | |
strip_insignificant_zeros: true | |
storage_units: | |
format: ! '%n %u' | |
units: | |
byte: | |
one: Byte | |
other: Bytes | |
gb: GB | |
kb: KB | |
mb: MB | |
tb: TB | |
percentage: | |
format: | |
delimiter: . | |
precision: | |
format: | |
delimiter: . | |
support: | |
array: | |
last_word_connector: ! ' e ' | |
two_words_connector: ! ' e ' | |
words_connector: ! ', ' | |
time: | |
am: '' | |
formats: | |
default: ! '%A, %d de %B de %Y às %H:%Mh' | |
long: ! '%A, %d de %B de %Y, %H:%M h' | |
complete_date: ! '%A, %d de %B de %Y' | |
short: ! '%d %b %Y, %H:%M h' | |
hour: ! "%H:%Mh" | |
day: ! "%d %b %Y" | |
pm: '' | |
# remove these aliases after 'activemodel' and 'activerecord' namespaces are removed from Rails repository | |
activemodel: | |
errors: | |
<<: *errors | |
activerecord: | |
models: | |
user: Usuário | |
attributes: | |
user: | |
name: Nome | |
errors: | |
<<: *errors | |
helpers: | |
submit: | |
user: | |
create: 'Novo %{model}' | |
update: 'Salvar' | |
views: | |
pagination: | |
first: "« Primeira" | |
last: "Última »" | |
previous: "‹ Anterior" | |
next: "Próxima ›" | |
truncate: "..." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment