Skip to content

Commit

Permalink
Localized the events show view
Browse files Browse the repository at this point in the history
  • Loading branch information
Arne Mayer committed Dec 11, 2014
1 parent a97aed2 commit ab2743c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 12 deletions.
24 changes: 12 additions & 12 deletions app/views/events/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,33 @@
</div>

<dl class="dl-horizontal">
<dt><strong><%= model_class.human_attribute_name(:id) %>:</strong></dt>
<dt><strong><%= t('events.show.id') %>:</strong></dt>
<dd><%= @event.id %></dd>
<dt><strong><%= model_class.human_attribute_name(:name) %>:</strong></dt>
<dt><strong><%= t('events.show.name') %>:</strong></dt>
<dd><%= @event.name %></dd>
<dt><strong><%= model_class.human_attribute_name(:description) %>:</strong></dt>
<dt><strong><%= t('events.show.description') %>:</strong></dt>
<dd><%= raw nl2br h @event.description %></dd>
<dt><strong><%= model_class.human_attribute_name(:rooms) %>:</strong></dt>
<dt><strong><%= t('events.show.rooms') %>:</strong></dt>
<dd><%= concat_rooms(@event) %></dd>
<dt><strong><%= model_class.human_attribute_name(:participant_count) %>:</strong></dt>
<dt><strong><%= t('events.show.participant_count') %>:</strong></dt>
<dd><%= @event.participant_count %></dd>
<dt><strong><%= model_class.human_attribute_name(:private) %>:</strong></dt>
<dt><strong><%= t('events.show.private') %>:</strong></dt>
<dd><%= check_box_tag 'private', 'private', @event.is_private, disabled: :disabled %></dd>
<dt><strong><%= model_class.human_attribute_name(:starts_at) %>:</strong></dt>
<dt><strong><%= t('events.show.starts_at') %>:</strong></dt>
<% if @event.starts_at %>
<dd><%= @event.starts_at.strftime("%d.%m.%Y - %H:%M") %></dd>
<% end %>
<dt><strong><%= model_class.human_attribute_name(:ends_at) %>:</strong></dt>
<dt><strong><%= t('events.show.ends_at') %>:</strong></dt>
<% if @event.ends_at%>
<dd><%= @event.ends_at.strftime("%d.%m.%Y - %H:%M") %></dd>
<% end %>
<dt><strong><%= model_class.human_attribute_name(:user) %>:</strong></dt>
<dt><strong><%= t('events.show.user') %>:</strong></dt>
<dd><%= @user %></dd>
<dt><strong><%= model_class.human_attribute_name(:created_at) %>:</strong></dt>
<dt><strong><%= t('events.show.created_at') %>:</strong></dt>
<dd><%= @event.created_at.strftime("%d.%m.%Y %T") %></dd>
<dt><strong><%= model_class.human_attribute_name(:updated_at) %>:</strong></dt>
<dt><strong><%= t('events.show.updated_at') %>:</strong></dt>
<dd><%= @event.updated_at.strftime("%d.%m.%Y %T") %></dd>
<dt><strong><%= model_class.human_attribute_name(:status) %>:</strong></dt>
<dt><strong><%= t('events.show.status') %>:</strong></dt>
<dd><%= @event.status %></dd>
</dl>

Expand Down
13 changes: 13 additions & 0 deletions config/locales/views/event.de.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,16 @@ de:
status: 'Status'
user: 'Benutzer'

show:
id: 'ID'
name: 'Name'
description: 'Beschreibung'
starts_at: 'Startet'
ends_at: 'Endet'
status: 'Status'
user: 'Benutzer'
private: 'Privat'
rooms: 'Räume'
participant_count: 'Teilnehmerzahl'
created_at: 'Erstellt'
updated_at: 'Geändert'

0 comments on commit ab2743c

Please sign in to comment.