diff --git a/app/controllers/stacks_controller.rb b/app/controllers/stacks_controller.rb
index f59be88ea..9fa05d614 100644
--- a/app/controllers/stacks_controller.rb
+++ b/app/controllers/stacks_controller.rb
@@ -28,7 +28,7 @@ def create
respond_to do |format|
if @stack.save
- format.html { redirect_to stacks_path, notice: 'Stack was successfully created.' }
+ format.html { redirect_to stacks_path, notice: t(".flashes.created") }
format.json { render :show, status: :created, location: @stack }
else
format.html { render :new }
@@ -42,7 +42,7 @@ def create
def update
respond_to do |format|
if @stack.update(stack_params)
- format.html { redirect_to stacks_path, notice: 'Stack was successfully updated.' }
+ format.html { redirect_to stacks_path, notice: t(".flashes.updated") }
format.json { render :show, status: :ok, location: @stack }
else
format.html { render :edit }
@@ -56,7 +56,7 @@ def update
def destroy
if @stack.destroy
respond_to do |format|
- format.html { redirect_to stacks_url, notice: 'Stack a bien été supprimé.' }
+ format.html { redirect_to stacks_url, notice: t(".flashes.destroyed") }
format.json { head :no_content }
end
else
diff --git a/app/views/stacks/_form.html.erb b/app/views/stacks/_form.html.erb
index d334f5407..780c5d1dc 100644
--- a/app/views/stacks/_form.html.erb
+++ b/app/views/stacks/_form.html.erb
@@ -1,8 +1,12 @@
<%= form_for(@stack, html: { class: "form-horizontal", role: "form" }) do |f| %>
<% if @stack.errors.any? %>
-
× Close
-
<%= pluralize(@stack.errors.count, "erreur", "erreurs") %> lors de la sauvegarde :
+
×
+ <%= t("action.close") %>
+
+
+ <%= t("form.errors.title", count: @stack.errors.count) %>
+
<% @stack.errors.full_messages.each do |msg| %>
@@ -13,20 +17,20 @@
<% end %>
<% end %>
diff --git a/app/views/stacks/edit.html.erb b/app/views/stacks/edit.html.erb
index fbd1bbcf1..6149c0dee 100644
--- a/app/views/stacks/edit.html.erb
+++ b/app/views/stacks/edit.html.erb
@@ -1,7 +1,7 @@
diff --git a/app/views/stacks/index.html.erb b/app/views/stacks/index.html.erb
index 92405949c..e65d6597f 100644
--- a/app/views/stacks/index.html.erb
+++ b/app/views/stacks/index.html.erb
@@ -1,4 +1,7 @@
-<%= render 'layouts/breadcrumb', breadcrumb_variables: {'Paramètres' => modeles_url, 'Salles' => ''} %>
+<%= render 'layouts/breadcrumb', breadcrumb_variables: {
+ t("breadcrumb.settings") => modeles_url,
+ t("breadcrumb.rooms") => "" }
+%>
@@ -13,17 +16,23 @@
- Nom
- Couleur
+
+ <%= Stack.human_attribute_name(:name) %>
+
+
+ <%= Stack.human_attribute_name(:color) %>
+
@@ -34,13 +43,13 @@
<%= content_tag_for(:tr, @stacks) do |stack| %>
<%= stack.name %>
<%= stack.color %>
- <%= pluralize stack.servers.count, 'machine' %>
- <%= link_to 'Modifier', edit_stack_path(stack), class: 'btn btn-default' %>
+ <%= Stack.human_attribute_name(:servers, count: stack.servers.count) %>
+ <%= link_to t("action.edit"), edit_stack_path(stack), class: 'btn btn-default' %>
- <%= link_to 'Supprimer',
+ <%= link_to t("action.delete"),
stack,
method: :delete,
- data: { confirm: 'Ce stack ne pourra pas être supprimé tant qu\'il sera associé à au moins un serveur. Voulez-vous continuer ?' },
+ data: { confirm: t(".delete_confirmation") },
class: 'btn btn-danger' %>
<% end %>
diff --git a/app/views/stacks/new.html.erb b/app/views/stacks/new.html.erb
index b1cd59e3d..0541baed0 100644
--- a/app/views/stacks/new.html.erb
+++ b/app/views/stacks/new.html.erb
@@ -1,9 +1,11 @@
<%= render 'form' %>
diff --git a/app/views/stacks/show.html.erb b/app/views/stacks/show.html.erb
index 0c40e40e4..37f44e4d8 100644
--- a/app/views/stacks/show.html.erb
+++ b/app/views/stacks/show.html.erb
@@ -1,21 +1,27 @@
- Nom :
+
+ <%= Stack.human_attribute_name(:name) %> :
+
<%= @stack %>
- Couleur :
+
+ <%= Stack.human_attribute_name(:color) %> :
+
<%= @stack.color %>
diff --git a/config/locales/activerecord.fr.yml b/config/locales/activerecord.fr.yml
index 44246dc21..9fcbc2676 100644
--- a/config/locales/activerecord.fr.yml
+++ b/config/locales/activerecord.fr.yml
@@ -54,6 +54,12 @@ fr:
errors_count:
one: 1 erreur
other: "%{count} erreurs"
+ stack:
+ name: Nom
+ color: Couleur
+ servers:
+ one: "%{count} machine"
+ other: "%{count} machines"
errors:
models:
user:
diff --git a/config/locales/fr.yml b/config/locales/fr.yml
index 79eb70858..a12627412 100644
--- a/config/locales/fr.yml
+++ b/config/locales/fr.yml
@@ -7,8 +7,10 @@ fr:
edit: Modifier
delete: Supprimer
back: Retour
+ close: Fermer
breadcrumb:
settings: Paramètres
+ rooms: Salles
pages:
params_menu:
location:
@@ -37,6 +39,26 @@ fr:
destroy:
flashes:
destroyed: Site a bien été supprimé.
+ stacks:
+ index:
+ new_stack: Ajouter un stack
+ title: Stacks
+ delete_confirmation: Ce stack ne pourra pas être supprimé tant qu'il sera associé à au moins un serveur. Voulez-vous continuer ?
+ show:
+ title: Stack
+ new:
+ title: Nouvelle stack
+ create:
+ flashes:
+ created: Stack was successfully created.
+ edit:
+ title: Modifier une stack
+ update:
+ flashes:
+ updated: Stack was successully updated.
+ destroy:
+ flashes:
+ destroyed: Stack a bien été supprimé.
devise:
registrations: