diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-07-25 03:51:44 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-07-25 03:51:44 +0200 |
| commit | baace1fa5df46694ddd515dc3bbca59b22df8692 (patch) | |
| tree | 6a8b587ca5d6d38377fe132b02c857f1c4149231 /app/controllers/events_controller.rb | |
| parent | ed32bc6902ab634451539770bcd910662212e01a (diff) | |
Extract flashes to i18n and stop dispatching on submit labels
Diffstat (limited to 'app/controllers/events_controller.rb')
| -rw-r--r-- | app/controllers/events_controller.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/events_controller.rb b/app/controllers/events_controller.rb index be3f5476..f2c710bd 100644 --- a/app/controllers/events_controller.rb +++ b/app/controllers/events_controller.rb | |||
| @@ -43,7 +43,7 @@ class EventsController < ApplicationController | |||
| 43 | ) | 43 | ) |
| 44 | 44 | ||
| 45 | if params[:tag_list].present? && params[:auto_tag_source].present? | 45 | if params[:tag_list].present? && params[:auto_tag_source].present? |
| 46 | flash.now[:notice] = "Tag '#{params[:tag_list]}' was pre-filled because this page is tagged '#{params[:auto_tag_source]}'. You can remove it below." | 46 | flash.now[:notice] = t("flash.events.tag_prefilled", :tag => params[:tag_list], :source => params[:auto_tag_source]) |
| 47 | end | 47 | end |
| 48 | 48 | ||
| 49 | respond_to do |format| | 49 | respond_to do |format| |
| @@ -65,7 +65,7 @@ class EventsController < ApplicationController | |||
| 65 | 65 | ||
| 66 | respond_to do |format| | 66 | respond_to do |format| |
| 67 | if @event.save | 67 | if @event.save |
| 68 | flash[:notice] = 'Event was successfully created.' | 68 | flash[:notice] = t("flash.events.created") |
| 69 | format.html { redirect_to(safe_return_to(params[:return_to] || (@event.node ? edit_node_path(@event.node) : edit_event_path(@event)))) } | 69 | format.html { redirect_to(safe_return_to(params[:return_to] || (@event.node ? edit_node_path(@event.node) : edit_event_path(@event)))) } |
| 70 | format.xml { render :xml => @event, :status => :created, :location => @event } | 70 | format.xml { render :xml => @event, :status => :created, :location => @event } |
| 71 | else | 71 | else |
| @@ -82,7 +82,7 @@ class EventsController < ApplicationController | |||
| 82 | 82 | ||
| 83 | respond_to do |format| | 83 | respond_to do |format| |
| 84 | if @event.update(event_params) | 84 | if @event.update(event_params) |
| 85 | flash[:notice] = 'Event was successfully updated.' | 85 | flash[:notice] = t("flash.events.updated") |
| 86 | format.html { redirect_to(safe_return_to(params[:return_to] || events_path)) } | 86 | format.html { redirect_to(safe_return_to(params[:return_to] || events_path)) } |
| 87 | format.xml { head :ok } | 87 | format.xml { head :ok } |
| 88 | else | 88 | else |
