Skip to content

Commit a176d56

Browse files
committed
Merge pull request rughh#158 from madridrb/madridrb
Madridrb label
2 parents d3ccb21 + 4bfe4e4 commit a176d56

26 files changed

+163
-34
lines changed

.ruby-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.2.0
1+
2.1.1

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ script: "CODECLIMATE_REPO_TOKEN=1c9dbc1183347accbd5a2d7ec1323ab4b0b9dea31e762940
22
bundler_args: "--without development production"
33
language: ruby
44
rvm:
5-
- 2.2.0
5+
- 2.1.1
66
branches:
77
only:
88
- master

app/assets/images/labels/madridrb.ico

31.3 KB
Binary file not shown.

app/assets/images/labels/madridrb.png

13.1 KB
Loading

app/assets/images/labels/madridrb/.gitkeep

Whitespace-only changes.
Loading
Loading
Loading
Loading
Loading
Loading

app/assets/stylesheets/application.sass

+19
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,25 @@ footer
372372
.railssupporters
373373
ol
374374
list-style: katakana
375+
.sponsors
376+
+phone
377+
width: 90%
378+
ol
379+
list-style: none
380+
margin-left: -3em
381+
+phone
382+
margin-left: 0
383+
li
384+
display: inline-block
385+
margin-right: 1em
386+
padding-bottom: 1em
387+
+phone
388+
padding-left: 0
389+
padding-right: 0
390+
margin-left: 0
391+
margin-right: 0
392+
display: block
393+
text-align: center
375394

376395
.ribbon_wrap
377396
position: absolute
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
footer section
2+
.usergroups ol,
3+
.railsgroups ol,
4+
.railssupporters ol
5+
list-style-type: square

app/models/usergroup.rb

+16-9
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,25 @@ class Usergroup
22
DELIMITER_TIME = ':'
33
DELIMITER_DATE = ' '
44
NUMBERS = %w(first second third fourth)
5-
SUPPORTED_LOCALES = [:de, :en]
65
SUPPORTED_TLDS = [:de, :at]
76

87
attr_accessor :label_id, :default_locale, :domains, :recurring, :email, :google_group, :coc
9-
attr_accessor :twitter, :organizers, :location, :imprint, :other_usergroups, :tld
8+
attr_accessor :twitter, :organizers, :location, :imprint, :other_usergroups, :tld, :sponsors
109

1110
def parse_recurring_date(date)
1211
number, day, _ = recurring.split(DELIMITER_DATE)
1312
day = Date::DAYS_INTO_WEEK[day.to_sym] + 1
14-
num = NUMBERS.index(number)
15-
d = date.at_beginning_of_month
16-
if d.wday > day
17-
d + ((num + 1) * 7 + day - d.wday).days
13+
if number == 'last' then
14+
d = date.at_end_of_month.change(hour: 0, minute: 0, second: 0)
15+
d - ((d.wday - day) % 7).days
1816
else
19-
d + (num * 7 + day - d.wday)
17+
d = date.at_beginning_of_month
18+
num = NUMBERS.index(number)
19+
if d.wday > day
20+
d + ((num + 1) * 7 + day - d.wday).days
21+
else
22+
d + (num * 7 + day - d.wday)
23+
end
2024
end
2125
end
2226

@@ -39,9 +43,11 @@ def next_event_date
3943

4044
def localized_recurring
4145
number, day, _ = recurring.split(DELIMITER_DATE)
42-
number = NUMBERS.index(number) + 1
46+
47+
ordinal = I18n.t("event.#{number}")
4348
day = I18n.t('date.day_names')[Date::DAYS_INTO_WEEK[day.to_sym] + 1]
44-
I18n.t("event.recurring", number: number, day: day)
49+
50+
I18n.t("event.recurring", ordinal: ordinal, day: day)
4551
end
4652

4753
def to_s
@@ -78,6 +84,7 @@ def self.from_name(name)
7884
it.imprint = {address: "YourStreet 1\n0815 YourTown", contributors: [{name: "Your Name", email: "[email protected]"}]}
7985
it.other_usergroups = [{name: "OtherUsergroupName", url: "http://some-domain.de/", twitter: "some_handle"}]
8086
it.coc = 'http://example.com'
87+
it.sponsors = []
8188
end
8289
end
8390

app/views/home/_topics.slim

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
= section_box :topics do
22
p
33
strong=> I18n.tw("home.like_to_talk")
4-
== t("home.send_us_an_email", mail_to: mail_to(Whitelabel[:email], "E-Mail", title: "E-Mail"))
4+
== t("home.send_us_an_email",
5+
mail_to: mail_to(Whitelabel[:email], "E-Mail", title: "E-Mail"),
6+
twitter_link: link_to_twitter(Whitelabel[:twitter]))
57
= render 'users/list', users: organizers
68
p== I18n.tw("home.engage")
79
= button_to t("home.add_topic"), new_topic_path, method: :get

app/views/layouts/application.slim

+4-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ html
2222
= render 'shared/hint'
2323
= yield
2424
footer
25-
= render 'shared/footer', imprint: Whitelabel[:imprint], other_usergroups: Whitelabel[:other_usergroups]
25+
= render( 'shared/footer',
26+
imprint: Whitelabel[:imprint],
27+
sponsors: Whitelabel[:sponsors],
28+
other_usergroups: Whitelabel[:other_usergroups] )
2629
= render 'peek/bar'
2730
= render 'shared/info'
2831
= javascript_include_tag :application, "//maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"

app/views/shared/_footer.slim

+10
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
11
section.clearfix
2+
- if sponsors.present?
3+
.info.clearfix.hr
4+
.sponsors.block
5+
h2= I18n.tw("footer.sponsored_by")
6+
ol
7+
- sponsors.each do |sp|
8+
li
9+
=> link_to sp[:url], title: sp[:name] do
10+
=> image_tag("labels/#{Whitelabel[:label_id]}/sponsors/#{sp[:banner]}", alt: sp[:name])
11+
212
.info.clearfix.hr
313
.contact.block
414
h2= t("footer.contact")

config/locales/de.label.yml

+6-2
Original file line numberDiff line numberDiff line change
@@ -101,5 +101,9 @@ de:
101101
:title: Innsbruck.rb
102102
:subtitle: Ruby User Group Innsbruck
103103
:meta_desc: Ruby User Group Innsbruck
104-
profile:
105-
freelancer: Freelancer
104+
madridrb:
105+
:city: Madrid
106+
:name: Madrid.rb
107+
:title: Madrid.rb
108+
:subtitle: Madrid Ruby User Group
109+
:meta_desc: Madrid Ruby User Group

config/locales/de.yml

+8-2
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ de:
3434
imprint: "Impressum"
3535
contact: "Kontakt"
3636
links: "Links"
37+
sponsored_by: "Gesponsert von"
3738
other_usergroups: "Weitere Usergroups"
3839
ruby_usergroups: "Weitere Ruby Gruppen"
3940
ruby_supporters: "Ruby Support"
@@ -52,7 +53,7 @@ de:
5253
home:
5354
the_usergroup: "Die <strong>%{usergroup}</strong> ist eine Benutzergruppe, Anwendergruppe, Interessengemeinschaft oder auch einfach nur ein Haufen Leute, die Spaß an der Programmiersprache Ruby haben. Tausch dich mit uns aus und komm zu unserem nächsten Treffen! Neue Gesichter sind immer gerne gesehen."
5455
like_to_talk: "Möchtest du einen Vortrag auf der Ruby Usergroup halten oder hast du zusätzliche Themenvorschläge?"
55-
send_us_an_email: "Dann schicke uns einfach eine %{mail_to} oder spreche uns persönlich an:"
56+
send_us_an_email: "Dann schicke uns einfach eine %{mail_to} oder spreche uns persönlich an: %{twitter_link}"
5657
engage: "Usergroups leben von Vorträgen und dem Engagement der Teilnehmer. Wenn du ein Thema vermisst, oder nähre Informationen zu speziellen Bereichen suchst, dann <strong>kannst du hier gerne etwas in die Wunschliste eintragen</strong>. Solltest du schon eine Idee zu einem Vortrag oder ähnlichem haben, dann <strong>kannst du ihn hier eintragen</strong>, um Feedback von der Ruby / Rails Community zu bekommen."
5758
add_topic: "Eigenes Thema eintragen"
5859
new_topics: "Themenvorschläge"
@@ -115,8 +116,13 @@ de:
115116
enquiry: "%{user} würde gerne mehr zu diesem Thema erfahren"
116117
event:
117118
twitter_message: "%{name} am %{date} %{url}"
118-
recurring: "jeden %{number}. %{day} im Monat"
119+
recurring: "jeden %{ordinal} %{day} im Monat"
119120
subscribe: "meine Events abonieren"
121+
first: "1."
122+
second: "2."
123+
third: "3."
124+
fourth: "4."
125+
last: "letzten"
120126
flash:
121127
duplicate_nick: "Der Nickname '%{name}' ist bereits vergeben! Wenn Du Dich schon über einen anderen Provider angemeldet hast, dann trage bitte in Deinem Profil die entsprechenden Handles ein!"
122128
only_admins: "Hoppala, da dürfen nur Admins hin!"

config/locales/en.label.yml

+6
Original file line numberDiff line numberDiff line change
@@ -98,3 +98,9 @@ en:
9898
:title: Innsbruck.rb
9999
:subtitle: Ruby User Group Innsbruck
100100
:meta_desc: Ruby User Group Innsbruck
101+
madridrb:
102+
:city: Madrid
103+
:name: Madrid.rb
104+
:title: Madrid.rb
105+
:subtitle: Madrid Ruby User Group
106+
:meta_desc: Madrid Ruby User Group

config/locales/en.yml

+9-3
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ en:
3535
imprint: "Imprint"
3636
contact: "Contact"
3737
links: "Links"
38+
sponsored_by: "Sponsored by"
3839
other_usergroups: "Other Usergroups"
3940
ruby_usergroups: "Other Ruby Groups"
4041
ruby_supporters: "Ruby Supporters"
@@ -51,14 +52,14 @@ en:
5152
home:
5253
the_usergroup: "The <strong>%{usergroup}</strong> is a usergroup, group of interest or just a bunch of people loving Ruby. Get in contact with us at our next meetup! Newbees are always welcome."
5354
like_to_talk: "Do you want to give a Talk at the Ruby Usergroup or do you have additional Topics to talk about?"
54-
send_us_an_email: "Then send us an %{mail_to} or ping us on Twitter:"
55+
send_us_an_email: "Then send us an %{mail_to} or ping us on Twitter: %{twitter_link}"
5556
engage: "Usergroups need engaging People. If you think some Topic is missing, or you want to have more Infos on something, <strong>you are encouraged to add it to our Wishlist</strong>. If you have an Idea for a Talk or anything else <strong>add it here</strong> to get instant Feedback of the Ruby / Rails Community."
5657
add_topic: "Add a Topic"
5758
new_topics: "Proposals"
5859
old_topics: "Recent Topics"
5960
company_workers: "A lot of the Members of the Ruby Usergroup are working there too and we love to see new faces around."
6061
company_missing: "If you think that a Company is missing, send us an %{email_link} or Direct-Message to %{twitter_link}"
61-
next_possible_meetup_recurring: "There is no Event planned right now, the Usergroup usually meets on %{recurring}."
62+
next_possible_meetup_recurring: "There is no Event planned right now, the Usergroup usually meets %{recurring}."
6263
next_possible_meetup: "The next Ruby / Rails Meeting is supposed to be on %{event_date}."
6364
next_meetup: "The next meetup"
6465
takes_place: "is taking place on %{event_date} at %{location_link}!"
@@ -114,8 +115,13 @@ en:
114115
enquiry: "%{user} would love to hear somebody talking about this topic"
115116
event:
116117
twitter_message: "%{name} at %{date} %{url}"
117-
recurring: "every %{number}. %{day} a Month"
118+
recurring: "every %{ordinal} %{day} of the month"
118119
subscribe: "subscribe my Events"
120+
first: "first"
121+
second: "second"
122+
third: "third"
123+
fourth: "fourth"
124+
last: "last"
119125
flash:
120126
only_admins: "Ups, only admins allowed!"
121127
not_authenticated: "Ups, you are not allowed to visit this page!"

config/locales/es.label.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ es:
9898
:title: Innsbruck.rb
9999
:subtitle: Ruby User Group Innsbruck
100100
:meta_desc: Ruby User Group Innsbruck
101-
madrid-rb:
101+
madridrb:
102102
city: Madrid
103103
name: Madrid.rb
104104
title: Madrid.rb

config/locales/es.yml

+10-4
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ es:
2525
edit_profile: "Editar perfil"
2626
logout: "Salir"
2727
twitter_login: "Login con Twitter"
28-
github_login: "Login con Githug"
28+
github_login: "Login con Github"
2929
hint:
3030
close: "Cerrar"
3131
attention: "Atención:"
@@ -36,6 +36,7 @@ es:
3636
imprint: "Responsable"
3737
contact: "Contacto"
3838
links: "Enlaces"
39+
sponsored_by: "Patrocinado por"
3940
other_usergroups: "Otros grupos de usuarios"
4041
ruby_usergroups: "Grupos de usuarios de ruby"
4142
ruby_supporters: "Grupos de apoyo a ruby"
@@ -52,15 +53,15 @@ es:
5253
home:
5354
the_usergroup: "<strong>%{usergroup}</strong> es un grupo de usuarios, grupo de interés o simplemente de personas interesadas en Ruby. Contacta con nosotros en la siguiente reunión! Todo el mundo es bienvenido, incluso si no tienes mucha experiencia con Ruby."
5455
like_to_talk: "Quieres dar una charla en el grupo, o quieres proponer un tema para una?"
55-
send_us_an_email: "Envíanos un %{mail_to} o un tweet:"
56+
send_us_an_email: "Envíanos un %{mail_to} o un tweet: %{twitter_link}"
5657
engage: "Los grupos de usuarios necesitan interacción. Si crees que estaría bien dar una charla sobre un Tema, o quieres profundizar sobre alguno, <strong>por favor añádelo en nuestra Wishlist</strong>. Si tienes una idea para una charla o actividad <strong>proponla aquí</strong> para obtener feedback de la comunidad de Ruby/Rails."
5758
add_topic: "Proponer un Tema"
5859
new_topics: "Propuestas"
5960
old_topics: "Temas recientes"
6061
company_workers: "En ocasiones serán lugares de trabajo de los miembros del Grupo de Usuarios; esto es normal, y les encanta ver caras nuevas."
6162
company_missing: "Si crees que falta una compañía, envíanos un %{email_link} o un tweet a %{twitter_link}"
6263
next_possible_meetup_recurring: "De momento no hay ningún evento planeado, el grupo normalmente se reúne %{recurring}."
63-
next_possible_meetup: "La siguiente reunión debería tenerl lugar el %{event_date}."
64+
next_possible_meetup: "La siguiente reunión debería tener lugar el %{event_date}."
6465
next_meetup: "La siguiente reunión"
6566
takes_place: "será el %{event_date} en %{location_link}!"
6667
takes_place_no_location: "será el %{event_date}, ¡pero <a href='%{none_url}'>todavía no tenemos sitio!</a>!"
@@ -116,8 +117,13 @@ es:
116117
enquiry: "%{user} propuso este tema para que otra persona hablara de él."
117118
event:
118119
twitter_message: "%{name} - %{date} %{url}"
119-
recurring: "cada %{number}er %{day} del mes"
120+
recurring: "el %{ordinal} %{day} del mes"
120121
subscribe: "Subscribirse a todos los eventos"
122+
first: "primer"
123+
second: "segundo"
124+
third: "tercer"
125+
fourth: "cuarto"
126+
last: "último"
121127
flash:
122128
only_admins: "Solamente los administradores pueden entrar ahí"
123129
not_authenticated: "Por favor autentifícate antes de entrar"

0 commit comments

Comments
 (0)