Skip to content

Commit 17127a0

Browse files
committed
Merge pull request rughh#154 from madridrb/es-locale
Es locale
2 parents 57d2c34 + 8b3f959 commit 17127a0

File tree

9 files changed

+477
-9
lines changed

9 files changed

+477
-9
lines changed

app/concerns/locale_detection.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def switch_locale
1616
end
1717

1818
def allowed_locale?(locale)
19-
OnRuby::Application.config.available_locales.include?(:"#{locale}")
19+
I18n.available_locales.include?(:"#{locale}")
2020
end
2121

2222
def default_locale

app/views/shared/_nav.slim

+7-6
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,10 @@ nav#nav.navbar
3636
= link_to auth_path(provider: provider) do
3737
= fa_icon provider, class: 'fa-fw dropdown-list-icon'
3838
=' title
39-
- locale = I18n.locale == :de ? :en : :de
40-
- title = t("languages.#{locale}")
41-
li.locale
42-
= link_to url_for(locale: locale), title: t("switch_languages", language: title) do
43-
= fa_icon 'comment', class: 'fa-fw dropdown-list-icon'
44-
=' title
39+
40+
- (I18n.available_locales - [I18n.locale]).each do |locale|
41+
- title = t("languages.#{locale}")
42+
li.locale
43+
= link_to url_for(locale: locale), title: t("switch_languages", language: title) do
44+
= fa_icon 'comment', class: 'fa-fw dropdown-list-icon'
45+
=' title

config/application.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ class Application < Rails::Application
2727
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
2828
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
2929
config.i18n.locale = config.i18n.default_locale = :de
30-
config.available_locales = [:de, :en]
31-
config.enforce_available_locales = true
30+
config.i18n.available_locales = [:de, :en, :es]
31+
config.i18n.enforce_available_locales = true
3232

3333
# Configure the default encoding used in templates for Ruby 1.9.
3434
config.encoding = "utf-8"

config/locales/de.yml

+2
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@ de:
66
month: "%B %Y"
77
countries:
88
DE: "Deutschland"
9+
ES: "Spanien"
910
switch_languages: "Umschalten auf %{language}"
1011
languages:
1112
de: "Deutsch"
1213
en: "Englisch"
14+
es: "Spanisch"
1315
usergroups: "Usergroups"
1416
events: "Treffen"
1517
mailing_list: "Mailinglist"

config/locales/en.yml

+2
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@ en:
66
month: "%B %Y"
77
countries:
88
DE: "Germany"
9+
ES: "Spain"
910
switch_languages: "Switch to %{language}"
1011
languages:
1112
de: "German"
1213
en: "English"
14+
es: "Spanish"
1315
usergroups: "Usergroups"
1416
events: "Events"
1517
mailing_list: "Mailinglist"

config/locales/es.base.yml

+192
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,192 @@
1+
es:
2+
date:
3+
abbr_day_names:
4+
- dom
5+
- lun
6+
- mar
7+
- mié
8+
- jue
9+
- vie
10+
- sáb
11+
abbr_month_names:
12+
-
13+
- ene
14+
- feb
15+
- mar
16+
- abr
17+
- may
18+
- jun
19+
- jul
20+
- ago
21+
- sep
22+
- oct
23+
- nov
24+
- dic
25+
day_names:
26+
- domingo
27+
- lunes
28+
- martes
29+
- miércoles
30+
- jueves
31+
- viernes
32+
- sábado
33+
formats:
34+
default: ! '%d/%m/%Y'
35+
long: ! '%d de %B de %Y'
36+
short: ! '%d de %b'
37+
month_names:
38+
-
39+
- enero
40+
- febrero
41+
- marzo
42+
- abril
43+
- mayo
44+
- junio
45+
- julio
46+
- agosto
47+
- septiembre
48+
- octubre
49+
- noviembre
50+
- diciembre
51+
order:
52+
- :day
53+
- :month
54+
- :year
55+
datetime:
56+
distance_in_words:
57+
about_x_hours:
58+
one: alrededor de 1 hora
59+
other: alrededor de %{count} horas
60+
about_x_months:
61+
one: alrededor de 1 mes
62+
other: alrededor de %{count} meses
63+
about_x_years:
64+
one: alrededor de 1 año
65+
other: alrededor de %{count} años
66+
almost_x_years:
67+
one: casi 1 año
68+
other: casi %{count} años
69+
half_a_minute: medio minuto
70+
less_than_x_minutes:
71+
one: menos de 1 minuto
72+
other: menos de %{count} minutos
73+
less_than_x_seconds:
74+
one: menos de 1 segundo
75+
other: menos de %{count} segundos
76+
over_x_years:
77+
one: más de 1 año
78+
other: más de %{count} años
79+
x_days:
80+
one: 1 día
81+
other: ! '%{count} días'
82+
x_minutes:
83+
one: 1 minuto
84+
other: ! '%{count} minutos'
85+
x_months:
86+
one: 1 mes
87+
other: ! '%{count} meses'
88+
x_seconds:
89+
one: 1 segundo
90+
other: ! '%{count} segundos'
91+
prompts:
92+
day: Día
93+
hour: Hora
94+
minute: Minutos
95+
month: Mes
96+
second: Segundos
97+
year: Año
98+
errors:
99+
format: ! '%{attribute} %{message}'
100+
messages:
101+
accepted: debe ser aceptado
102+
blank: no puede estar en blanco
103+
confirmation: no coincide
104+
empty: no puede estar vacío
105+
equal_to: debe ser igual a %{count}
106+
even: debe ser par
107+
exclusion: está reservado
108+
greater_than: debe ser mayor que %{count}
109+
greater_than_or_equal_to: debe ser mayor que o igual a %{count}
110+
inclusion: no está incluido en la lista
111+
invalid: no es válido
112+
less_than: debe ser menor que %{count}
113+
less_than_or_equal_to: debe ser menor que o igual a %{count}
114+
not_a_number: no es un número
115+
not_an_integer: debe ser un entero
116+
odd: debe ser impar
117+
record_invalid: ! 'La validación falló: %{errors}'
118+
taken: ya está en uso
119+
too_long: es demasiado largo (%{count} caracteres máximo)
120+
too_short: es demasiado corto (%{count} caracteres mínimo)
121+
wrong_length: no tiene la longitud correcta (%{count} caracteres exactos)
122+
template:
123+
body: ! 'Se encontraron problemas con los siguientes campos:'
124+
header:
125+
one: No se pudo guardar este/a %{model} porque se encontró 1 error
126+
other: No se pudo guardar este/a %{model} porque se encontraron %{count} errores
127+
helpers:
128+
select:
129+
prompt: Por favor seleccione
130+
submit:
131+
create: Crear %{model}
132+
submit: Guardar %{model}
133+
update: Actualizar %{model}
134+
number:
135+
currency:
136+
format:
137+
delimiter: .
138+
format: ! '%n %u'
139+
precision: 2
140+
separator: ! ','
141+
significant: false
142+
strip_insignificant_zeros: false
143+
unit:
144+
format:
145+
delimiter: .
146+
precision: 3
147+
separator: ! ','
148+
significant: false
149+
strip_insignificant_zeros: false
150+
human:
151+
decimal_units:
152+
format: ! '%n %u'
153+
units:
154+
billion: mil millones
155+
million: millón
156+
quadrillion: mil billones
157+
thousand: mil
158+
trillion: billón
159+
unit: ''
160+
format:
161+
delimiter: ''
162+
precision: 1
163+
significant: true
164+
strip_insignificant_zeros: true
165+
storage_units:
166+
format: ! '%n %u'
167+
units:
168+
byte:
169+
one: Byte
170+
other: Bytes
171+
gb: GB
172+
kb: KB
173+
mb: MB
174+
tb: TB
175+
percentage:
176+
format:
177+
delimiter: ''
178+
precision:
179+
format:
180+
delimiter: ''
181+
support:
182+
array:
183+
last_word_connector: ! ', y '
184+
two_words_connector: ! ' y '
185+
words_connector: ! ', '
186+
time:
187+
am: am
188+
formats:
189+
default: ! '%A, %d de %B de %Y %H:%M:%S %z'
190+
long: ! '%d de %B de %Y %H:%M'
191+
short: ! '%d de %b %H:%M'
192+
pm: pm

config/locales/es.formtastic.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
es:
2+
formtastic:
3+
labels:
4+
topic:
5+
name: 'Tu tema'
6+
proposal_type: 'Tipo de propuesta'
7+
description: 'Descripción'
8+
user:
9+
hide_jobs: 'Ocultar trabajos'
10+
available: 'Actualmente estoy buscando trabajos/proyectos'
11+
placeholders:
12+
github: 'Nombre de usuario en GitHub'
13+
actions:
14+
topic:
15+
create: 'Añadir'
16+
user:
17+
update: 'Actualizar'

config/locales/es.label.yml

+106
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
---
2+
es:
3+
label:
4+
default:
5+
name: onruby
6+
title: OnRuby - Plataforma de grupos de usuarios de Ruby y Rails
7+
subtitle: Comunidades de Ruby / Rails
8+
meta_desc: Comunidades de Ruby / Rails
9+
hamburg:
10+
city: Hamburgo
11+
name: Ruby Usergroup Hamburg
12+
title: Hamburg on Ruby
13+
subtitle: Harbor of Hamburg's Ruby Community
14+
meta_desc: Ruby / Rails Usergroup Hamburg
15+
berlin:
16+
city: Berlín
17+
name: Ruby Usergroup Berlin
18+
title: RUG::B
19+
subtitle: Ruby User Group Berlin
20+
meta_desc: RUG::B—Ruby User Group Berlin
21+
bremen:
22+
city: Bremen
23+
name: HackHB
24+
title: HackHB
25+
subtitle: Hack and Snack
26+
meta_desc: 'Hacking Usergroup Bremen: Ruby / Rails / JavaScript / HTML5 / Objective-C'
27+
cologne:
28+
city: Colonia
29+
name: Kölsch.rb
30+
title: Cologne.rb
31+
subtitle: Ruby User Group Cologne
32+
meta_desc: Ruby / Rails User Group Cologne
33+
saar:
34+
city: Saarland
35+
name: RUGSaar
36+
title: RUGSaar
37+
subtitle: Ruby User Group Saar
38+
meta_desc: Ruby User Group Saarland
39+
munich:
40+
city: Munich
41+
name: Munich Ruby User Group
42+
title: Munich Ruby
43+
subtitle: Munich Ruby User Group
44+
meta_desc: Munich Ruby User Group
45+
karlsruhe:
46+
city: Karlsruhe
47+
name: Ruby Usergroup Karlsruhe
48+
title: Karlsruhe.rb
49+
subtitle: Ruby User Group Karlsruhe
50+
meta_desc: Ruby / Rails User Group Karlsruhe
51+
leipzig:
52+
city: Leipzig
53+
name: LoR
54+
title: Leipzig on Rails
55+
subtitle: Ruby / Rails User Group Leipzig
56+
meta_desc: Ruby / Rails User Group Leipzig
57+
dresden:
58+
city: Dresden
59+
name: Ruby Usergroup Dresden
60+
title: Dresden on Ruby
61+
subtitle: Ruby User Group Dresden
62+
meta_desc: Ruby / Rails User Group Dresden
63+
railsgirlshh:
64+
:city: Hamburgo
65+
:name: Railsgirls Hamburg
66+
:title: Railsgirls Hamburg
67+
:subtitle: Meetup
68+
:meta_desc: Railsgirls Hamburg Meetup
69+
:footer:
70+
:other_usergroups: Railsgirls in Germany
71+
:home:
72+
:the_usergroup: Join us for our monthly meetup open to former and future participants,
73+
coaches and everyon interested in <strong>Railsgirls Hamburg</strong>. You
74+
can learn more about our events on our <a href='http://railsgirls.com/hamburg'>Railsgirls
75+
Hamburg website</a>.
76+
:like_to_talk: Do you want to give a talk at the meetup, or would you like
77+
to suggest a topic?
78+
:engage: If you would like to suggest a topic for our meetup, <strong>add
79+
it to our wishlist</strong>.
80+
:company_workers: ''
81+
:company_missing: ''
82+
:next_possible_meetup_recurring: There is no meetup scheduleed right now,
83+
but we usually meet on %{recurring}.
84+
:next_possible_meetup: The next meetup is supposed to be on %{event_date}.
85+
:usergroup_locations: The %{location_link} where our meetup usually takes
86+
place.
87+
:mailing_list: Stay up to date about upcoming events and learning groups or
88+
join a discussion about programming and Ruby on Rails
89+
bonn:
90+
:city: Bonn
91+
:name: bonn.rb
92+
:title: bonn.rb
93+
:subtitle: Ruby User Group Bonn
94+
:meta_desc: Ruby User Group Bonn
95+
innsbruck:
96+
:city: Innsbruck
97+
:name: Innsbruck.rb
98+
:title: Innsbruck.rb
99+
:subtitle: Ruby User Group Innsbruck
100+
:meta_desc: Ruby User Group Innsbruck
101+
madrid-rb:
102+
city: Madrid
103+
name: Madrid.rb
104+
title: Madrid.rb
105+
subtitle: Grupo de usuarios de Ruby de Madrid
106+
meta_desc: Grupo de usuarios de Ruby de Madrid

0 commit comments

Comments
 (0)