Skip to content

Commit

Permalink
i18n work on admin areas #31
Browse files Browse the repository at this point in the history
  • Loading branch information
fwolfst committed Oct 9, 2020
1 parent 77fbc56 commit 3f16aae
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion app/views/admin/blog/posts/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from: @pagy.from,
to: @pagy.to,
total: @pagy.count,
item_name: t('emails'))
item_name: Blog::Post.model_name.human)
!= pagy_bulma_nav(@pagy)


Expand Down
9 changes: 5 additions & 4 deletions app/views/admin/places/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
:ruby
admin_head_locals = {
title: t('Listing Places'),
title: t('admin.places.all'),
admin: {
new: {
url: new_admin_place_path,
label: t('New Place')
label: t('admin.places.new')
}
}
}
Expand All @@ -18,8 +18,9 @@
- if @places.present?
= render partial: 'table', locals: {places: @places}
- else
= t('none')
= t('admin.items.none')
%br
%br

= link_to 'New Place', new_admin_place_path, class: 'button is-primary is-outlined'
= link_to t('admin.places.new'), new_admin_place_path,
class: 'button is-primary is-outlined'
6 changes: 3 additions & 3 deletions app/views/admin/places/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@

%p
%b
# i18n-tasks-use t('activerecord.attributes.place.name')
-# i18n-tasks-use t('activerecord.attributes.place.name')
= Place.human_attribute_name :name
\:
= @place.name
%p
# i18n-tasks-use t('activerecord.attributes.place.building_name')
-# i18n-tasks-use t('activerecord.attributes.place.building_name')
%b= Place.human_attribute_name :building_name
= @place.building_name
%p
# i18n-tasks-use t('activerecord.attributes.place.note')
-# i18n-tasks-use t('activerecord.attributes.place.note')
%b= Place.human_attribute_name :note
= @place.note

Expand Down
8 changes: 4 additions & 4 deletions app/views/admin/styles/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
:ruby
admin_head_locals = {
title: t('Listing Styles'),
title: t('admin.styles.index.listing'),
admin: {
new: {
url: new_admin_style_path,
label: t('admin.style.new')
label: t('admin.styles.new')
}
}
}
Expand Down Expand Up @@ -72,11 +72,11 @@
= link_to t('actions.edit'), edit_admin_style_path(style), class: 'button is-small'
- if !style.active?
= link_to t('actions.Destroy'), [:admin, style], method: :delete,
data: { confirm: t('Are you sure?') },
data: { confirm: t('actions.are_you_sure?') },
class: 'button is-small is-danger'

= link_to t('admin.styles.new-video'),
new_admin_style_lesson_path(style), class: 'button is-small'
%br

= link_to t('admin.style.new'), new_admin_style_path, class: 'button is-link is-outlined'
= link_to t('admin.styles.new'), new_admin_style_path, class: 'button is-link is-outlined'
2 changes: 2 additions & 0 deletions config/locales/admin.de.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ de:
select_dow: Wochentag auswählen
select_place: Ort auswählen
select_style: Style auswählen
items:
none: Keine
place:
creation-success: Ort erstellt
deletion-success: Ort gelöscht
Expand Down
1 change: 0 additions & 1 deletion config/locales/de.yml
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,6 @@ de:
users: User
videos: Videos
no-video-support: Dein Browser unterstützt keine Videos!
none: Keine
not authorized: Nicht authorisiert
pagy:
showing_from_to_total: Zeige %{item_name} %{from}-%{to} von %{total} gesamt.
Expand Down

0 comments on commit 3f16aae

Please sign in to comment.