diff --git a/app/controllers/frames_controller.rb b/app/controllers/frames_controller.rb index 0dc39d2c7..2f1a08f70 100644 --- a/app/controllers/frames_controller.rb +++ b/app/controllers/frames_controller.rb @@ -33,7 +33,7 @@ def update @frame = Frame.friendly.find(params[:id].to_s.downcase) respond_to do |format| if @frame.update(frame_params) - format.html { redirect_to room_path(@frame.room), notice: 'Le châssis a été mis à jour.' } + format.html { redirect_to room_path(@frame.room), notice: t(".flashes.updated") } format.json { render :show, status: :ok, location: @frame } else format.html { render :edit } @@ -47,7 +47,7 @@ def create respond_to do |format| if @frame.save - format.html { redirect_to frames_path, notice: 'Le châssis a été ajouté.' } + format.html { redirect_to frames_path, notice: t(".flashes.created") } format.json { render :show, status: :created, location: @frame } else format.html { render :new } @@ -71,7 +71,7 @@ def destroy @frame = Frame.friendly.find(params[:id].to_s.downcase) if @frame.destroy respond_to do |format| - format.html { redirect_to frames_url, notice: 'Frame a bien été supprimé.' } + format.html { redirect_to frames_url, notice: t(".flashes.destroyed") } format.json { head :no_content } end else @@ -97,7 +97,7 @@ def network @servers_per_frames = {} @frames.each do |frame| - islet = "Vue réseau" + islet = t(".title") @servers_per_frames[islet] ||= {} @servers_per_frames[islet][0] ||= {} @servers_per_frames[islet][0][frame.bay] ||= {} diff --git a/app/views/frames/_form.html.erb b/app/views/frames/_form.html.erb index f1514b205..6f0340c62 100644 --- a/app/views/frames/_form.html.erb +++ b/app/views/frames/_form.html.erb @@ -1,8 +1,16 @@ <%= form_for(@frame, html: { class: "form-horizontal", role: "form" }) do |f| %> <% if @frame.errors.any? %>