Skip to content

Commit

Permalink
add place admin action translations (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
fwolfst committed Oct 9, 2020
1 parent 2f1afeb commit d2322c6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
9 changes: 5 additions & 4 deletions app/controllers/admin/places_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def create

respond_to do |format|
if @place.save
format.html { redirect_to admin_places_path, notice: t('place.created-success') }
format.html { redirect_to admin_places_path, notice: t('admin.place.creation-success') }
else
format.html { render :new }
end
Expand All @@ -43,7 +43,7 @@ def create
def update
respond_to do |format|
if @place.update(place_params)
format.html { redirect_to admin_places_path, notice: t('place.update-success') }
format.html { redirect_to admin_places_path, notice: t('admin.place.update-success') }
else
format.html { render :edit }
end
Expand All @@ -54,7 +54,7 @@ def update
def destroy
@place.destroy
respond_to do |format|
format.html { redirect_to admin_places_url, notice: t('place.deletion-success') }
format.html { redirect_to admin_places_url, notice: t('admin.place.deletion-success') }
end
end

Expand All @@ -66,6 +66,7 @@ def set_place

# Only allow a list of trusted parameters through.
def place_params
params.require(:place).permit(:name, :building_name, :note, :pricing_note, :address, :active)
params.require(:place).permit(:name, :building_name, :note,
:pricing_note, :address, :active)
end
end
4 changes: 4 additions & 0 deletions config/locales/admin.de.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ de:
select_dow: Wochentag auswählen
select_place: Ort auswählen
select_style: Style auswählen
place:
creation-success: Ort erstellt
deletion-success: Ort gelöscht
update-success: Ort aktualisiert
places:
add_course: Kurs hinzufügen
all: Alle Orte
Expand Down

0 comments on commit d2322c6

Please sign in to comment.